Skip to content

Commit

Permalink
build(deps): migrate from grpc to @grpc/grpc-js and make it a prod de…
Browse files Browse the repository at this point in the history
…pendency (#182)
  • Loading branch information
petermetz committed Dec 2, 2023
1 parent 3215805 commit 72ab5b6
Show file tree
Hide file tree
Showing 9 changed files with 3,875 additions and 2,691 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ yarn-error.log*
*.ntvs*
*.njsproj
*.sln
*.sw*
*.sw*
.yarn/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ With node.js you should create connection to iroha by using `QueryService` and `
**IROHA_ADDRESS** - Address of iroha grpc (usually ends on 50051) Ex. `http://localhost:50051`

``` javascript
import grpc from 'grpc'
import grpc from '@grpc/grpc-js'
import {
QueryService_v1Client as QueryService,
CommandService_v1Client as CommandService
Expand Down
2 changes: 1 addition & 1 deletion example/chain.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */

import grpc from 'grpc'
import grpc from '@grpc/grpc-js'
import {
QueryService_v1Client as QueryService,
CommandService_v1Client as CommandService
Expand Down
2 changes: 1 addition & 1 deletion example/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-console */

// for usage with grpc package use endpoint_grpc_pb file
import grpc from 'grpc'
import grpc from '@grpc/grpc-js'
import {
QueryService_v1Client as QueryService,
CommandService_v1Client as CommandService
Expand Down
2 changes: 1 addition & 1 deletion example/tls.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */

import grpc from 'grpc'
import grpc from '@grpc/grpc-js'

import {
QueryService_v1Client as QueryService
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
}
},
"dependencies": {
"@grpc/grpc-js": "1.9.12",
"@improbable-eng/grpc-web": "^0.12.0",
"babel-preset-minify": "^0.5.1",
"buffer": "^5.4.0",
Expand All @@ -48,17 +49,16 @@
"tweetnacl": "^1.0.3"
},
"devDependencies": {
"@types/keccak": "^3.0.1",
"@types/node": "^12.7.2",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"@types/keccak": "^3.0.1",
"eslint": "^6.1.0",
"eslint-config-standard": "^13.0.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"grpc": "^1.22.2",
"husky": "^3.0.3",
"keccak": "^3.0.2",
"shx": "^0.3.2",
Expand Down
2 changes: 1 addition & 1 deletion src/proto/endpoint_grpc_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// SPDX-License-Identifier: Apache-2.0
//
'use strict';
var grpc = require('grpc');
var grpc = require('@grpc/grpc-js');
var endpoint_pb = require('./endpoint_pb.js');
var transaction_pb = require('./transaction_pb.js');
var queries_pb = require('./queries_pb.js');
Expand Down
Loading

0 comments on commit 72ab5b6

Please sign in to comment.