Skip to content

Commit

Permalink
build(deps): fix npm (grpc) build on NodeJS v20.4.0
Browse files Browse the repository at this point in the history
WORK IN PROGRESS
--------------

1. Eliminates all uses of the old `grpc` dependency from the codebase.
1.1. Upgraded all outdated fabirc-network, fabric-client and fabric-ca-client
dependencies to the latest stable 2.2.x version which is 2.2.18 at the time.
1.2. Also outrighted swapped `grpc` declarations with `@grpc/grpc-js`.
The rest of the diff is due to the incompatibility of the two mentioned.

Fixes https://github.com/hyperledger/cacti/issues/2562
Fixes https://github.com/hyperledger/cacti/issues/1507

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Jul 22, 2023
1 parent 1b643df commit 6db9daf
Show file tree
Hide file tree
Showing 20 changed files with 95 additions and 325 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@openzeppelin/contracts": "4.9.2",
"@openzeppelin/contracts-upgradeable": "4.9.2",
"async-exit-hook": "2.0.1",
"fabric-network": "2.2.10",
"fabric-network": "2.2.18",
"fs-extra": "10.0.0",
"openapi-types": "9.1.0",
"typescript-optional": "2.0.1",
Expand Down
4 changes: 1 addition & 3 deletions examples/cactus-example-discounted-asset-trade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
"ethereumjs-common": "1.5.2",
"ethereumjs-tx": "2.1.2",
"express": "4.16.4",
"fabric-ca-client": "1.4.19",
"fabric-client": "1.4.19",
"fabric-network": "1.4.19",
"fabric-network": "2.2.18",
"http-errors": "1.6.3",
"jsonwebtoken": "9.0.0",
"jsrsasign": "10.5.25",
Expand Down
3 changes: 1 addition & 2 deletions examples/cactus-example-electricity-trade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"ethereumjs-common": "1.5.2",
"ethereumjs-tx": "2.1.2",
"express": "4.16.4",
"fabric-ca-client": "2.2.10",
"fabric-network": "2.2.10",
"fabric-network": "2.2.18",
"http-errors": "1.6.3",
"js-yaml": "3.14.1",
"jsonwebtoken": "9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/cactus-example-supply-chain-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"dotenv": "16.0.0",
"express": "4.17.3",
"express-jwt": "8.4.1",
"fabric-network": "2.2.10",
"fabric-network": "2.2.18",
"jose": "4.9.2",
"openapi-types": "9.1.0",
"solc": "0.8.6",
Expand Down
3 changes: 1 addition & 2 deletions examples/cactus-example-tcs-huawei/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"ethereumjs-common": "1.5.2",
"ethereumjs-tx": "2.1.2",
"express": "4.16.4",
"fabric-ca-client": "2.2.10",
"fabric-network": "2.2.10",
"fabric-network": "2.2.18",
"http-errors": "1.6.3",
"js-yaml": "3.14.1",
"jsonwebtoken": "8.5.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/test-run-transaction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"ethereumjs-common": "1.5.2",
"ethereumjs-tx": "2.1.2",
"express": "4.16.4",
"fabric-ca-client": "2.2.10",
"fabric-network": "2.2.10",
"fabric-network": "2.2.18",
"fabric-network": "2.2.18",
"http-errors": "1.6.3",
"jsonwebtoken": "8.5.1",
"log4js": "6.4.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/cactus-cmd-socketio-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"ethereumjs-common": "1.5.2",
"ethereumjs-tx": "2.1.2",
"express": "4.16.4",
"fabric-ca-client": "1.4.19",
"fabric-network": "1.4.19",
"fabric-network": "2.2.18",
"http-errors": "1.6.3",
"js-yaml": "3.14.1",
"jsonwebtoken": "9.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@
"prepare-docker-build": "cp -af ../../yarn.lock ./dist/yarn.lock"
},
"dependencies": {
"@grpc/grpc-js": "1.8.18",
"@hyperledger/cactus-cmd-socketio-server": "2.0.0-alpha.1",
"@hyperledger/cactus-common": "2.0.0-alpha.1",
"@types/node": "14.17.32",
"body-parser": "1.17.2",
"cookie-parser": "1.4.6",
"debug": "3.1.0",
"express": "4.17.3",
"fabric-ca-client": "1.4.19",
"fabric-client": "1.4.19",
"fabric-network": "1.4.19",
"fabric-network": "2.2.18",
"fs-extra": "10.0.0",
"grpc": "1.24.11",
"js-yaml": "3.14.1",
"jsonwebtoken": "9.0.0",
"lodash": "4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"config": "1.31.0",
"socket.io-client": "4.5.4",
"ts-node": "9.1.1",
"fabric-ca-client": "2.2.10",
"fabric-network": "2.2.10",
"fabric-network": "2.2.18",
"fabric-network": "2.2.18",
"shelljs": "0.8.5"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-ledger-connector-iroha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
},
"dependencies": {
"@grpc/grpc-js": "1.8.18",
"@hyperledger/cactus-common": "2.0.0-alpha.1",
"@hyperledger/cactus-core": "2.0.0-alpha.1",
"@hyperledger/cactus-core-api": "2.0.0-alpha.1",
"@types/google-protobuf": "3.15.5",
"axios": "0.21.4",
"express": "4.17.1",
"fast-safe-stringify": "2.1.1",
"grpc": "1.24.11",
"iroha-helpers": "1.5.0",
"key-encoder": "2.0.3",
"openapi-types": "7.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from "./generated/openapi/typescript-axios";

import { RuntimeError } from "run-time-error";
import * as grpc from "grpc";
import * as grpc from "@grpc/grpc-js";

import {
GrantablePermission,
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-odap-hermes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@types/express": "4.17.8",
"@types/tape": "4.13.0",
"crypto-js": "4.0.0",
"fabric-network": "2.2.10",
"fabric-network": "2.2.18",
"ipfs-http-client": "51.0.1",
"typescript": "4.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-persistence-fabric/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@types/uuid": "8.3.1",
"body-parser": "1.19.0",
"express": "4.17.1",
"fabric-network": "1.4.19",
"fabric-network": "2.2.18",
"uuid": "8.3.2"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "Hyperledger",
"license": "Apache-2.0",
"dependencies": {
"fabric-ca-client": "1.4.19",
"fabric-network": "1.4.19"
"fabric-network": "2.2.18",
"fabric-network": "2.2.18"
}
}
3 changes: 1 addition & 2 deletions weaver/common/protos-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
"js"
],
"dependencies": {
"@grpc/grpc-js": "^1.1.3",
"@grpc/grpc-js": "1.8.18",
"@grpc/proto-loader": "^0.5.5",
"google-protobuf": "^3.21.2",
"grpc": "^1.24.3",
"grpc-tools": "^1.9.1"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions weaver/core/drivers/fabric-driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"dotenv": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"fabric-ca-client": "^2.2.8",
"fabric-network": "^2.2.8",
"fabric-network": "2.2.18",
"level": "^8.0.0",
"winston": "^3.3.3"
},
Expand Down
3 changes: 1 addition & 2 deletions weaver/core/identity-management/iin-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
"dotenv": "^8.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"fabric-ca-client": "^2.2.8",
"fabric-common": "^2.2.8",
"fabric-network": "^2.2.8"
"fabric-network": "2.2.18"
},
"devDependencies": {
"@types/node": "^14.0.14",
Expand Down
3 changes: 1 addition & 2 deletions weaver/samples/fabric/fabric-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"dotenv": "^8.2.0",
"elliptic": "^6.5.4",
"express": "^4.18.1",
"fabric-ca-client": "^2.2.8",
"fabric-network": "^2.2.8",
"fabric-network": "2.2.18",
"gluegun": "latest",
"grpc-tools": "1.9.1",
"ini": "^1.3.6",
Expand Down
2 changes: 1 addition & 1 deletion weaver/sdks/fabric/interoperation-node-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@hyperledger/cacti-weaver-protos-js": "2.0.0-alpha.1",
"elliptic": "^6.2.3",
"fabric-common": "^2.2.8",
"fabric-network": "^2.2.8",
"fabric-network": "2.2.18",
"fabric-protos": "^2.2.8",
"js-sha3": "^0.7.0",
"jsrsasign": "^10.5.25",
Expand Down
Loading

0 comments on commit 6db9daf

Please sign in to comment.