From 8dade07869d619a5364e6e249c0e82ae84838adc Mon Sep 17 00:00:00 2001 From: Simon Stone Date: Thu, 5 Sep 2019 10:52:44 +0100 Subject: [PATCH] [FAB-16521] Move Node.js chaincode to Node.js v12 Update the Node.js chaincode to Node.js v12, which will likely be the current LTS when Fabric v2.0 is released. Signed-off-by: Simon Stone Change-Id: If93fa27b38b453f22621d975d004745a356653bf --- build/docker.js | 2 +- fabric-nodeenv/Dockerfile | 2 +- fabric-shim/package-lock.json | 69 +++++++++++++++++++++------------- fabric-shim/package.json | 8 ++-- package-lock.json | 71 +++++++++++++++++++++-------------- 5 files changed, 91 insertions(+), 61 deletions(-) diff --git a/build/docker.js b/build/docker.js index 3fb7e319..fdbee541 100644 --- a/build/docker.js +++ b/build/docker.js @@ -15,7 +15,7 @@ const shell = require('gulp-shell'); const util = require('util'); const version = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'))).version; -const node_version = process.env.NODE_VERSION || '10.15.2'; +const node_version = process.env.NODE_VERSION || '12.9.1'; const build_dir = path.join(__dirname, '..', 'fabric-nodeenv'); const tag = version + '-' + git.short(); diff --git a/fabric-nodeenv/Dockerfile b/fabric-nodeenv/Dockerfile index cdb0902c..bf91ebd8 100644 --- a/fabric-nodeenv/Dockerfile +++ b/fabric-nodeenv/Dockerfile @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -ARG NODE_VER=10.15.2 +ARG NODE_VER=12.9.1 FROM node:${NODE_VER}-alpine RUN apk add --no-cache \ make \ diff --git a/fabric-shim/package-lock.json b/fabric-shim/package-lock.json index 496401f8..895d4f7f 100644 --- a/fabric-shim/package-lock.json +++ b/fabric-shim/package-lock.json @@ -142,11 +142,25 @@ "tweetnacl": "^1.0.1" } }, + "@types/bytebuffer": { + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", + "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", + "requires": { + "@types/long": "*", + "@types/node": "*" + } + }, "@types/google-protobuf": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.7.1.tgz", "integrity": "sha512-kiLxbqoi2C7NmkGj1ZpkSDyIqj4vqDEIjx7wX+O0GXV6bLX6u/oLz49CwefD0c0vzaKeBdOqmUtI8bC0bBRr0w==" }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, "@types/node": { "version": "8.10.53", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.53.tgz", @@ -574,14 +588,15 @@ "dev": true }, "grpc": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.19.0.tgz", - "integrity": "sha512-xX+jZ1M3YXjngsRj/gTxB4EwM0WoWUr54DmyNq9xTeg1oSuVaTPD/PK9wnZKOJWTt1pkeFspXqwJPhddZNxHOA==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz", + "integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==", "requires": { + "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", - "nan": "^2.0.0", - "node-pre-gyp": "^0.12.0", + "nan": "^2.13.2", + "node-pre-gyp": "^0.13.0", "protobufjs": "^5.0.3" }, "dependencies": { @@ -618,7 +633,7 @@ } }, "chownr": { - "version": "1.1.1", + "version": "1.1.2", "bundled": true }, "code-point-at": { @@ -638,10 +653,10 @@ "bundled": true }, "debug": { - "version": "2.6.9", + "version": "3.2.6", "bundled": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deep-extend": { @@ -657,7 +672,7 @@ "bundled": true }, "fs-minipass": { - "version": "1.2.5", + "version": "1.2.6", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -682,7 +697,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.4", "bundled": true, "requires": { "fs.realpath": "^1.0.0", @@ -698,7 +713,7 @@ "bundled": true }, "iconv-lite": { - "version": "0.4.23", + "version": "0.4.24", "bundled": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -720,7 +735,7 @@ } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true }, "ini": { @@ -758,7 +773,7 @@ } }, "minizlib": { - "version": "1.1.1", + "version": "1.2.1", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -778,20 +793,20 @@ } }, "ms": { - "version": "2.0.0", + "version": "2.1.2", "bundled": true }, "needle": { - "version": "2.2.4", + "version": "2.4.0", "bundled": true, "requires": { - "debug": "^2.1.2", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.12.0", + "version": "0.13.0", "bundled": true, "requires": { "detect-libc": "^1.0.2", @@ -815,11 +830,11 @@ } }, "npm-bundled": { - "version": "1.0.5", + "version": "1.0.6", "bundled": true }, "npm-packlist": { - "version": "1.1.12", + "version": "1.4.4", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -872,7 +887,7 @@ "bundled": true }, "process-nextick-args": { - "version": "2.0.0", + "version": "2.0.1", "bundled": true }, "rc": { @@ -899,10 +914,10 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.7.1", "bundled": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { @@ -918,7 +933,7 @@ "bundled": true }, "semver": { - "version": "5.6.0", + "version": "5.7.1", "bundled": true }, "set-blocking": { @@ -957,16 +972,16 @@ "bundled": true }, "tar": { - "version": "4.4.8", + "version": "4.4.10", "bundled": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { diff --git a/fabric-shim/package.json b/fabric-shim/package.json index 38549e95..562f9bec 100644 --- a/fabric-shim/package.json +++ b/fabric-shim/package.json @@ -31,18 +31,18 @@ "types": "./types/index.d.ts", "license": "Apache-2.0", "dependencies": { - "@types/google-protobuf": "^3.2.7", "@fidm/x509": "^1.2.1", + "@types/google-protobuf": "^3.2.7", "@types/node": "^8.9.4", "ajv": "^6.5.5", "fabric-contract-api": "unstable", "fs-extra": "^7.0.1", - "grpc": "1.19.0", + "grpc": "^1.23.3", + "protobufjs": "5.0.3", "reflect-metadata": "^0.1.12", "winston": "^2.4.1", "yargs": "^10.0.2", - "yargs-parser": "^11.0.0", - "protobufjs": "5.0.3" + "yargs-parser": "^11.0.0" }, "devDependencies": { "mocha": "5.2.0", diff --git a/package-lock.json b/package-lock.json index 21897689..69f42cf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,11 +68,25 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@types/bytebuffer": { + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", + "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", + "requires": { + "@types/long": "*", + "@types/node": "*" + } + }, "@types/google-protobuf": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.7.1.tgz", "integrity": "sha512-kiLxbqoi2C7NmkGj1ZpkSDyIqj4vqDEIjx7wX+O0GXV6bLX6u/oLz49CwefD0c0vzaKeBdOqmUtI8bC0bBRr0w==" }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, "@types/node": { "version": "8.10.53", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.53.tgz", @@ -1859,7 +1873,7 @@ "ajv": "^6.5.5", "fabric-contract-api": "^2.0.0-snapshot.91", "fs-extra": "^7.0.1", - "grpc": "1.19.0", + "grpc": "^1.23.3", "protobufjs": "5.0.3", "reflect-metadata": "^0.1.12", "winston": "^2.4.1", @@ -2929,14 +2943,15 @@ "dev": true }, "grpc": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.19.0.tgz", - "integrity": "sha512-xX+jZ1M3YXjngsRj/gTxB4EwM0WoWUr54DmyNq9xTeg1oSuVaTPD/PK9wnZKOJWTt1pkeFspXqwJPhddZNxHOA==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz", + "integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==", "requires": { + "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", - "nan": "^2.0.0", - "node-pre-gyp": "^0.12.0", + "nan": "^2.13.2", + "node-pre-gyp": "^0.13.0", "protobufjs": "^5.0.3" }, "dependencies": { @@ -2973,7 +2988,7 @@ } }, "chownr": { - "version": "1.1.1", + "version": "1.1.2", "bundled": true }, "code-point-at": { @@ -2993,10 +3008,10 @@ "bundled": true }, "debug": { - "version": "2.6.9", + "version": "3.2.6", "bundled": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deep-extend": { @@ -3012,7 +3027,7 @@ "bundled": true }, "fs-minipass": { - "version": "1.2.5", + "version": "1.2.6", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -3037,7 +3052,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.4", "bundled": true, "requires": { "fs.realpath": "^1.0.0", @@ -3053,7 +3068,7 @@ "bundled": true }, "iconv-lite": { - "version": "0.4.23", + "version": "0.4.24", "bundled": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -3075,7 +3090,7 @@ } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true }, "ini": { @@ -3113,7 +3128,7 @@ } }, "minizlib": { - "version": "1.1.1", + "version": "1.2.1", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -3133,20 +3148,20 @@ } }, "ms": { - "version": "2.0.0", + "version": "2.1.2", "bundled": true }, "needle": { - "version": "2.2.4", + "version": "2.4.0", "bundled": true, "requires": { - "debug": "^2.1.2", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.12.0", + "version": "0.13.0", "bundled": true, "requires": { "detect-libc": "^1.0.2", @@ -3170,11 +3185,11 @@ } }, "npm-bundled": { - "version": "1.0.5", + "version": "1.0.6", "bundled": true }, "npm-packlist": { - "version": "1.1.12", + "version": "1.4.4", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -3227,7 +3242,7 @@ "bundled": true }, "process-nextick-args": { - "version": "2.0.0", + "version": "2.0.1", "bundled": true }, "rc": { @@ -3254,10 +3269,10 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.7.1", "bundled": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { @@ -3273,7 +3288,7 @@ "bundled": true }, "semver": { - "version": "5.6.0", + "version": "5.7.1", "bundled": true }, "set-blocking": { @@ -3312,16 +3327,16 @@ "bundled": true }, "tar": { - "version": "4.4.8", + "version": "4.4.10", "bundled": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": {