Skip to content

Commit 4771184

Browse files
author
Michael Lehenbauer
authored
Switch from 'grpc' to '@grpc/grpc-js' dependency. (#1804)
Fixes #1783, reduces package size, and should ease compatibility issues with Electron, etc.
1 parent 1811518 commit 4771184

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

packages/firestore/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"@firebase/firestore-types": "1.3.0",
3232
"@firebase/logger": "0.1.14",
3333
"@firebase/webchannel-wrapper": "0.2.20",
34+
"@grpc/grpc-js": "0.4.0",
3435
"@grpc/proto-loader": "^0.5.0",
35-
"grpc": "1.20.3",
3636
"tslib": "1.9.3"
3737
},
3838
"peerDependencies": {

packages/firestore/src/platform_node/grpc_connection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
* limitations under the License.
1616
*/
1717

18-
import * as grpc from 'grpc';
18+
import * as grpc from '@grpc/grpc-js';
1919

2020
import firebase from '@firebase/app';
2121
const SDK_VERSION = firebase.SDK_VERSION;
2222

23-
const grpcVersion = require('grpc/package.json').version;
23+
const grpcVersion = require('@grpc/grpc-js/package.json').version;
2424

2525
import { Token } from '../api/credentials';
2626
import { DatabaseInfo } from '../core/database_info';

packages/firestore/src/platform_node/load_protos.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
import * as grpc from '@grpc/grpc-js';
1819
import * as protoLoader from '@grpc/proto-loader';
19-
import * as grpc from 'grpc';
2020
import * as path from 'path';
2121
import * as ProtobufJS from 'protobufjs';
2222

yarn.lock

+7-11
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,13 @@
893893
through2 "^2.0.0"
894894
xdg-basedir "^3.0.0"
895895

896+
897+
version "0.4.0"
898+
resolved "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-0.4.0.tgz#b20a6abf1346ce7fd696a042f83d10c94e143881"
899+
integrity sha512-UbGDPnstJamJrSiHzCSwSavIX260IfLOZLRJYDqRKJA/jmVZa3hPMWDjhFrcCKDq2MLc/O/nauFED3r4khcZrA==
900+
dependencies:
901+
semver "^6.0.0"
902+
896903
"@grpc/proto-loader@^0.5.0":
897904
version "0.5.0"
898905
resolved "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.0.tgz#6d21930530db6089ed68a90f10a22b76fdc3387d"
@@ -6901,17 +6908,6 @@ [email protected]:
69016908
node-pre-gyp "^0.13.0"
69026909
protobufjs "^5.0.3"
69036910

6904-
6905-
version "1.20.3"
6906-
resolved "https://registry.npmjs.org/grpc/-/grpc-1.20.3.tgz#a74d36718f1e89c4a64f2fb9441199c3c8f78978"
6907-
integrity sha512-GsEsi0NVj6usS/xor8pF/xDbDiwZQR59aZl5NUZ59Sy2bdPQFZ3UePr5wevZjHboirRCIQCKRI1cCgvSWUe2ag==
6908-
dependencies:
6909-
lodash.camelcase "^4.3.0"
6910-
lodash.clone "^4.5.0"
6911-
nan "^2.13.2"
6912-
node-pre-gyp "^0.13.0"
6913-
protobufjs "^5.0.3"
6914-
69156911
gtoken@^1.2.1, gtoken@^1.2.3:
69166912
version "1.2.3"
69176913
resolved "https://registry.npmjs.org/gtoken/-/gtoken-1.2.3.tgz#5509571b8afd4322e124cf66cf68115284c476d8"

0 commit comments

Comments
 (0)