Skip to content

Commit 72ab5b6

Browse files
authored
build(deps): migrate from grpc to @grpc/grpc-js and make it a prod dependency (#182)
1 parent 3215805 commit 72ab5b6

File tree

9 files changed

+3875
-2691
lines changed

9 files changed

+3875
-2691
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ yarn-error.log*
1717
*.ntvs*
1818
*.njsproj
1919
*.sln
20-
*.sw*
20+
*.sw*
21+
.yarn/

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ With node.js you should create connection to iroha by using `QueryService` and `
3333
**IROHA_ADDRESS** - Address of iroha grpc (usually ends on 50051) Ex. `http://localhost:50051`
3434

3535
``` javascript
36-
import grpc from 'grpc'
36+
import grpc from '@grpc/grpc-js'
3737
import {
3838
QueryService_v1Client as QueryService,
3939
CommandService_v1Client as CommandService

example/chain.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-console */
22

3-
import grpc from 'grpc'
3+
import grpc from '@grpc/grpc-js'
44
import {
55
QueryService_v1Client as QueryService,
66
CommandService_v1Client as CommandService

example/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

33
// for usage with grpc package use endpoint_grpc_pb file
4-
import grpc from 'grpc'
4+
import grpc from '@grpc/grpc-js'
55
import {
66
QueryService_v1Client as QueryService,
77
CommandService_v1Client as CommandService

example/tls.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-console */
22

3-
import grpc from 'grpc'
3+
import grpc from '@grpc/grpc-js'
44

55
import {
66
QueryService_v1Client as QueryService

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
}
3434
},
3535
"dependencies": {
36+
"@grpc/grpc-js": "1.9.12",
3637
"@improbable-eng/grpc-web": "^0.12.0",
3738
"babel-preset-minify": "^0.5.1",
3839
"buffer": "^5.4.0",
@@ -48,17 +49,16 @@
4849
"tweetnacl": "^1.0.3"
4950
},
5051
"devDependencies": {
52+
"@types/keccak": "^3.0.1",
5153
"@types/node": "^12.7.2",
5254
"@typescript-eslint/eslint-plugin": "^2.0.0",
5355
"@typescript-eslint/parser": "^2.0.0",
54-
"@types/keccak": "^3.0.1",
5556
"eslint": "^6.1.0",
5657
"eslint-config-standard": "^13.0.1",
5758
"eslint-plugin-import": "^2.18.2",
5859
"eslint-plugin-node": "^9.1.0",
5960
"eslint-plugin-promise": "^4.2.1",
6061
"eslint-plugin-standard": "^4.0.0",
61-
"grpc": "^1.22.2",
6262
"husky": "^3.0.3",
6363
"keccak": "^3.0.2",
6464
"shx": "^0.3.2",

src/proto/endpoint_grpc_pb.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// SPDX-License-Identifier: Apache-2.0
77
//
88
'use strict';
9-
var grpc = require('grpc');
9+
var grpc = require('@grpc/grpc-js');
1010
var endpoint_pb = require('./endpoint_pb.js');
1111
var transaction_pb = require('./transaction_pb.js');
1212
var queries_pb = require('./queries_pb.js');

0 commit comments

Comments
 (0)