mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-21 17:15:10 +00:00
Avoid explicit import of grpc-js or fabric-protos in TypeScript apps
Rely on the dependencies of @hyperledger/fabric-gateway making these packages transitively available. Having explicit dependency versions in the application can cause type conflicts due to private member changes in the gRPC Client class across versions. Also fix some missing or incorrect Node types and engines version contraints. Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
This commit is contained in:
parent
cb886be466
commit
10e9377555
20 changed files with 61 additions and 13732 deletions
|
|
@ -19,7 +19,6 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.7.2",
|
|
||||||
"@hyperledger/fabric-gateway": "^1.1.1"
|
"@hyperledger/fabric-gateway": "^1.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
"fabric-network": "^2.2.8"
|
"fabric-network": "^2.2.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^12.20.55",
|
||||||
"tslint": "^5.11.0",
|
"tslint": "^5.11.0",
|
||||||
"typescript": "^3.1.6"
|
"typescript": "^3.1.6"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
"fabric-network": "^2.2.4"
|
"fabric-network": "^2.2.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^12.20.55",
|
||||||
"tslint": "^5.11.0",
|
"tslint": "^5.11.0",
|
||||||
"typescript": "^3.1.6"
|
"typescript": "^3.1.6"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -34,7 +34,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.1.7",
|
"@types/chai": "^4.1.7",
|
||||||
"@types/mocha": "^5.2.5",
|
"@types/mocha": "^5.2.5",
|
||||||
"@types/node": "^10.12.10",
|
"@types/node": "^12.20.55",
|
||||||
"@types/sinon": "^5.0.7",
|
"@types/sinon": "^5.0.7",
|
||||||
"@types/sinon-chai": "^3.2.1",
|
"@types/sinon-chai": "^3.2.1",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
|
|
|
||||||
7760
asset-transfer-basic/rest-api-typescript/package-lock.json
generated
7760
asset-transfer-basic/rest-api-typescript/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -29,7 +29,7 @@
|
||||||
"@types/express": "^4.17.12",
|
"@types/express": "^4.17.12",
|
||||||
"@types/ioredis": "^4.26.4",
|
"@types/ioredis": "^4.26.4",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/node": "^15.14.7",
|
"@types/node": "^12.20.55",
|
||||||
"@types/passport": "^1.0.7",
|
"@types/passport": "^1.0.7",
|
||||||
"@types/pino": "^6.3.8",
|
"@types/pino": "^6.3.8",
|
||||||
"@types/pino-http": "^5.4.1",
|
"@types/pino-http": "^5.4.1",
|
||||||
|
|
@ -66,4 +66,4 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.7.2",
|
|
||||||
"@hyperledger/fabric-gateway": "^1.1.1"
|
"@hyperledger/fabric-gateway": "^1.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.7.2",
|
|
||||||
"@hyperledger/fabric-gateway": "^1.1.1"
|
"@hyperledger/fabric-gateway": "^1.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8",
|
"node": ">=12"
|
||||||
"npm": ">=5"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "tslint -c tslint.json 'src/**/*.ts'",
|
"lint": "tslint -c tslint.json 'src/**/*.ts'",
|
||||||
|
|
@ -29,7 +28,7 @@
|
||||||
"@types/chai": "^4.2.11",
|
"@types/chai": "^4.2.11",
|
||||||
"@types/chai-as-promised": "^7.1.2",
|
"@types/chai-as-promised": "^7.1.2",
|
||||||
"@types/mocha": "^7.0.2",
|
"@types/mocha": "^7.0.2",
|
||||||
"@types/node": "^13.9.3",
|
"@types/node": "^12.20.55",
|
||||||
"@types/sinon": "^7.5.2",
|
"@types/sinon": "^7.5.2",
|
||||||
"@types/sinon-chai": "^3.2.3",
|
"@types/sinon-chai": "^3.2.3",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hyperledger/fabric-gateway": "^1.1.1",
|
"@hyperledger/fabric-gateway": "^1.1.1"
|
||||||
"@grpc/grpc-js": "^1.7.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node14": "^1.0.1",
|
"@tsconfig/node14": "^1.0.1",
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8",
|
"node": ">=12"
|
||||||
"npm": ">=5"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "tslint -c tslint.json 'src/**/*.ts'",
|
"lint": "tslint -c tslint.json 'src/**/*.ts'",
|
||||||
|
|
@ -27,7 +26,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.1.7",
|
"@types/chai": "^4.1.7",
|
||||||
"@types/mocha": "^5.2.5",
|
"@types/mocha": "^5.2.5",
|
||||||
"@types/node": "^10.12.10",
|
"@types/node": "^12.20.55",
|
||||||
"@types/sinon": "^5.0.7",
|
"@types/sinon": "^5.0.7",
|
||||||
"@types/sinon-chai": "^3.2.1",
|
"@types/sinon-chai": "^3.2.1",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "FabCar application implemented in TypeScript",
|
"description": "FabCar application implemented in TypeScript",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8",
|
"node": ">=12"
|
||||||
"npm": ">=5"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "tslint -c tslint.json 'src/**/*.ts'",
|
"lint": "tslint -c tslint.json 'src/**/*.ts'",
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,7 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.6.7",
|
|
||||||
"@hyperledger/fabric-gateway": "^1.1.0",
|
"@hyperledger/fabric-gateway": "^1.1.0",
|
||||||
"@hyperledger/fabric-protos": "^0.1.0-dev.2300102001.1",
|
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"source-map-support": "^0.5.21"
|
"source-map-support": "^0.5.21"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.6.7",
|
|
||||||
"@hyperledger/fabric-gateway": "^1.1.0",
|
"@hyperledger/fabric-gateway": "^1.1.0",
|
||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.1",
|
||||||
"env-var": "^7.1.1",
|
"env-var": "^7.1.1",
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"dev": "ts-node ./src/server.ts",
|
"dev": "ts-node ./src/server.ts",
|
||||||
|
|
@ -14,9 +17,7 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grpc/grpc-js": "~1.6.7",
|
|
||||||
"@hyperledger/fabric-gateway": "^1.1.0",
|
"@hyperledger/fabric-gateway": "^1.1.0",
|
||||||
"@hyperledger/fabric-protos": "^0.1.0-dev.2300102001.1",
|
|
||||||
"@tsconfig/node14": "^1.0.3",
|
"@tsconfig/node14": "^1.0.3",
|
||||||
"@types/body-parser": "^1.17.0",
|
"@types/body-parser": "^1.17.0",
|
||||||
"@types/express": "^4.16.0",
|
"@types/express": "^4.16.0",
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,7 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.6.7",
|
"@hyperledger/fabric-gateway": "^1.1.0"
|
||||||
"@hyperledger/fabric-gateway": "^1.1.0",
|
|
||||||
"@hyperledger/fabric-protos": "^0.1.0-dev.2300102001.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node16": "^1.0.3",
|
"@tsconfig/node16": "^1.0.3",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=16"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint ./src --ext .ts",
|
"lint": "eslint ./src --ext .ts",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/hsm-sample.js",
|
"main": "dist/hsm-sample.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.15.0 || ^16.13.0"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.7.2",
|
|
||||||
"@hyperledger/fabric-gateway": "^1.1.1",
|
"@hyperledger/fabric-gateway": "^1.1.1",
|
||||||
"jsrsasign": "^10.3.0"
|
"jsrsasign": "^10.3.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,7 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.7.2",
|
"@hyperledger/fabric-gateway": "^1.1.1"
|
||||||
"@hyperledger/fabric-gateway": "^1.1.1",
|
|
||||||
"@hyperledger/fabric-protos": "^0.1.5"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node14": "^1.0.3",
|
"@tsconfig/node14": "^1.0.3",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue