Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Node 6 / Replace grpc w/ @grpc/grpc-js #2856

Merged
merged 10 commits into from
Apr 6, 2020
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Apr 2, 2020

  • Adds engine field to match requirements for @grpc/grpc-js
  • Removes grpc, replaces all usages with @grpc/grpc-js
  • Updates @types/node, which is required to make @grpc/grpc-js compile. This also adds finally to the Promise API, which requires a small code change.

Note that there are currently two version of @grpc/grpc-js in our repo, which should go away once firebase/firebase-tools#2093 is released.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 2, 2020

Binary Size Report

Affected SDKs

SDKTypeBase (5b90965)Head (340e493)Diff
@firebase/firestore/memorybrowser212492.00212219.00-273.00 (-0.13%)
module210858.00210585.00-273.00 (-0.13%)
esm2017169548.00169273.00-275.00 (-0.16%)
main376232.00376290.00+58.00 (+0.02%)
@firebase/firestorebrowser268827.00268534.00-293.00 (-0.11%)
module266798.00266505.00-293.00 (-0.11%)
esm2017215260.00214967.00-293.00 (-0.14%)
main486884.00486942.00+58.00 (+0.01%)
firebasefirebase-installations.js19436.0019157.00-279.00 (-1.44%)
firebase-storage.js41411.0040971.00-440.00 (-1.06%)
firebase-messaging.js39611.0039120.00-491.00 (-1.24%)
firebase-auth.js175057.00173406.00-1651.00 (-0.94%)
firebase.js846043.00842217.00-3826.00 (-0.45%)
9 more entries not displayed here ...
@firebase/testingmain6598.006607.00+9.00 (+0.14%)
Metric Unit: byte

Test Logs

Copy link
Member

@yuchenshi yuchenshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval for @firebase/testing.

package.json Outdated Show resolved Hide resolved
packages/firestore/src/platform_node/grpc_connection.ts Outdated Show resolved Hide resolved
@@ -20,7 +23,7 @@
"@firebase/logger": "0.2.1",
"@firebase/util": "0.2.44",
"@types/request": "2.48.4",
"grpc": "1.24.2",
"firebase": "7.13.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is redundant. firebase is already a dependency.
Was grpc a redundant dependency anyway regardless of this change?

@@ -25,8 +25,7 @@ import {
import firebase from '@firebase/app';
const SDK_VERSION = firebase.SDK_VERSION;

// eslint-disable-next-line @typescript-eslint/no-require-imports
const grpcVersion = require('@grpc/grpc-js/package.json').version;
const grpcVersion = import('@grpc/grpc-js/package.json').version;
Copy link
Member

@Feiyang1 Feiyang1 Apr 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also use a normal import, then add a plugin in the rollup.config.js.

import { version } from '@grpc/grpc-js/package.json'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use this build setting, but since we don't use rollup for our unit tests, this breaks the unit test.

@schmidt-sebastian schmidt-sebastian merged commit 5a63738 into master Apr 6, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/grpcjs branch April 6, 2020 19:25
@firebase firebase locked and limited conversation to collaborators May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants