diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index f2568612..cacbecc9 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -10,9 +10,9 @@ This table shows the summary of the compatibility of the Node modules at version | | Peer Connectivity v1.4 | NodeJS | Peer Connectivity v2.x | | --------------------- | ---------------------- | ------ | ---------------------- | | Node modules **v1.4** | Yes | 8 | Yes | -| Node modules **v2.x** | Yes | 10 | Yes | +| Node modules **v2.x** | Yes | 12 | Yes | -By default a Fabric Peer v1.4 will create a Nodejs v8 runtime, and a Fabric Peer v2.x will create a Nodejs v10 runtime. Whilst this is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_NODE_RUNTIME` on the peer to the name of the docker image. For example `CORE_CHAINCODE_NODE_RUNTIME=example/customNodeRuntime:latest` +By default a Fabric Peer v1.4 will create a Nodejs v8 runtime, and a Fabric Peer v2.x will create a Nodejs 12 runtime. Whilst this is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_NODE_RUNTIME` on the peer to the name of the docker image. For example `CORE_CHAINCODE_NODE_RUNTIME=example/customNodeRuntime:latest` The Node modules will connect to the peer whilst running; this is referred to as 'Fabric Peer Connectivity' in the table. For example, whilst the Fabric Peer v1.4 will create a Nodejs 8 runtime, if a Nodejs 12 runtime was configured, the node modules at v2.x still function when connecting to the Fabric Peer v1.4. @@ -32,7 +32,7 @@ Node modules that are produced are `fabric-contract-api`, `fabric-shim`, `fabric ### Supported Runtimes -v2.x Node modules are supported running in Nodejs 10.15+, with the x86_64 architecture. +v2.x Node modules are supported running in Nodejs 12.16.1, with the x86_64 architecture. v1.4.x Node modules are supported running Nodejs 8.16.1 with the x86_64 architecture. @@ -40,7 +40,7 @@ Architecture Support: all docker images, runtimes, tools are tested under x86_6 ### Default Peer Runtime selection -When using Fabric 2.x, the default docker image that is used to run the Node chaincode is node:10.15.2-alpine  +When using Fabric 2.x, the default docker image that is used to run the Node chaincode is node:12.16.1-alpine  *Note:* With the default docker image used by Fabric 2.x, the packaged code will be installed with npm. If a `package-lock.json` or a `npm-shrinkwrap.json` file is present, `npm ci --only=production` will be used. Otherwise `npm install --production` will be used.  diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dfc25947..257c6e34 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ The following [Rush categories](https://rushjs.io/pages/maintainer/add_to_repo/) ### Pre-requisites -* node v10.15.2 (npm v6.4.1) => recommend to use [nvm](https://github.com/nvm-sh/nvm) +* node v12.16.1 (npm v6.4.1) => recommend to use [nvm](https://github.com/nvm-sh/nvm) * rush => `npm install -g @microsoft/rush` > Note that npm v6 has some bugs that mean adding new dependencies etc are not properly picked up. Longer term we should consider moving to yarn or pnpm. However in practice this isn't a serious problem and has been possible to be worked around by issuing `rm ./common/config/rush/npm-shrinkwrap.json` and then `rush update` @@ -33,7 +33,7 @@ They also need to have the `nodeenv` image present - this is build as part of th ## Using the repo -* Clone the repo, and ensure you are using node v10, and have rush installed +* Clone the repo, and ensure you are using node v12, and have rush installed * `rush update` is needed to ensure everything is correctly linked and updated. At this point the repo is fully ready for use and running tests, etc. A full sequence of build-test that is equivalent to the CI pipeline is diff --git a/TUTORIAL.md b/TUTORIAL.md index 792e60bd..9e65da52 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -15,8 +15,8 @@ The dependencies of `fabric-chaincode-api` and `fabric-shim` will be required. "name": "chaincode", "description": "My first exciting chaincode implemented in node.js", "engines": { - "node": "^10.15.2", - "npm": "^6.4.1" + "node": "^12.16.1", + "npm": "^6.13.4" }, "scripts": { "test":"mocha..... diff --git a/apis/fabric-contract-api/README.md b/apis/fabric-contract-api/README.md index cb9f2da2..8368bf0a 100644 --- a/apis/fabric-contract-api/README.md +++ b/apis/fabric-contract-api/README.md @@ -129,7 +129,7 @@ Visit [fabric-shim.github.io](https://fabric-shim.github.io/) and click on "Clas ## Support -Tested with node.js 8.9, and also the v10 LTS release. +Tested with Node v12 LTS release. ## License diff --git a/apis/fabric-contract-api/package.json b/apis/fabric-contract-api/package.json index a551ef88..ed05548b 100644 --- a/apis/fabric-contract-api/package.json +++ b/apis/fabric-contract-api/package.json @@ -22,7 +22,7 @@ "Fabric Shim" ], "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": "^6.4.1" }, "license": "Apache-2.0", diff --git a/apis/fabric-shim-api/package.json b/apis/fabric-shim-api/package.json index cb143063..e4ff830f 100644 --- a/apis/fabric-shim-api/package.json +++ b/apis/fabric-shim-api/package.json @@ -17,7 +17,7 @@ "Fabric Shim" ], "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": "^6.4.1", "eslint": "6.6.0" }, diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 7fd7813f..c0110506 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -41,7 +41,7 @@ variables: - name: pipeline value: ci - name: node_version_spec - value: '10.x' + value: '12.16.1' # Build on Ubuntu pool: @@ -64,7 +64,7 @@ stages: steps: - task: NodeTool@0 inputs: - versionSpec: $(node_version_spec) + versionSpec: 12.15.0 - script: | set -ev node common/scripts/install-run-rush.js install @@ -141,8 +141,8 @@ stages: node common/scripts/install-run-rush.js start-fabric node common/scripts/install-run-rush.js start-verdaccio # script will check for the ci variable and use built images docker images | grep hyperledger && docker ps -a - node common/scripts/install-run-rush.js test:fv - node common/scripts/install-run-rush.js test:e2e + node common/scripts/install-run-rush.js test:fv --verbose + node common/scripts/install-run-rush.js test:e2e --verbose displayName: 'FV Tests' - task: PublishTestResults@2 diff --git a/libraries/fabric-shim-crypto/package.json b/libraries/fabric-shim-crypto/package.json index df212c6b..86d67edf 100644 --- a/libraries/fabric-shim-crypto/package.json +++ b/libraries/fabric-shim-crypto/package.json @@ -20,7 +20,7 @@ "Fabric Shim" ], "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": "^6.4.1" }, "license": "Apache-2.0", diff --git a/libraries/fabric-shim/package.json b/libraries/fabric-shim/package.json index 8a646631..f4e1b208 100644 --- a/libraries/fabric-shim/package.json +++ b/libraries/fabric-shim/package.json @@ -29,7 +29,7 @@ "Fabric Shim" ], "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": "^6.4.1" }, "yargs": { diff --git a/rush.json b/rush.json index 4c7f2915..35a8dc0c 100644 --- a/rush.json +++ b/rush.json @@ -62,7 +62,7 @@ * Specify a SemVer range to ensure developers use a Node.js version that is appropriate * for your repo. */ - "nodeSupportedVersionRange": ">=10.13.0 <13.0.0", + "nodeSupportedVersionRange": ">=12.15.0 <13.0.0", /** * Odd-numbered major versions of Node.js are experimental. Even-numbered releases * spend six months in a stabilization period before the first Long Term Support (LTS) version. diff --git a/test/chaincodes/annotations/package.json b/test/chaincodes/annotations/package.json index a1569758..23e64d85 100644 --- a/test/chaincodes/annotations/package.json +++ b/test/chaincodes/annotations/package.json @@ -2,7 +2,7 @@ "name": "ts_chaincode", "description": "Chaincode testing typescript functionality and annotations", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/clientidentity/package.json b/test/chaincodes/clientidentity/package.json index 8b37df2f..5bc958cf 100644 --- a/test/chaincodes/clientidentity/package.json +++ b/test/chaincodes/clientidentity/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "Chaincode testing ClientIdentity functionality", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/crosschaincode/package.json b/test/chaincodes/crosschaincode/package.json index 6a5f10b3..51922129 100644 --- a/test/chaincodes/crosschaincode/package.json +++ b/test/chaincodes/crosschaincode/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "Chaincode testing cross chaincode functionality", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/crosschaincode2/package.json b/test/chaincodes/crosschaincode2/package.json index edccc4aa..7480cca1 100644 --- a/test/chaincodes/crosschaincode2/package.json +++ b/test/chaincodes/crosschaincode2/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "Chaincode testing cross chaincode functionality", "engines": { - "node":"^10.15.2", + "node":"^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/crud/package.json b/test/chaincodes/crud/package.json index 10026753..d6e9039e 100644 --- a/test/chaincodes/crud/package.json +++ b/test/chaincodes/crud/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "Chaincode testing crud functionality", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/encryption/package.json b/test/chaincodes/encryption/package.json index 11e619f1..eec9cc26 100644 --- a/test/chaincodes/encryption/package.json +++ b/test/chaincodes/encryption/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "Chaincode testing encryption functionality", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/events/package.json b/test/chaincodes/events/package.json index 5eab7a36..8ff655f3 100644 --- a/test/chaincodes/events/package.json +++ b/test/chaincodes/events/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "Chaincode testing events functionality", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/query/package.json b/test/chaincodes/query/package.json index 8d9db575..1724579f 100644 --- a/test/chaincodes/query/package.json +++ b/test/chaincodes/query/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "Chaincode testing query functionality", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/chaincodes/scenario/package.json b/test/chaincodes/scenario/package.json index 479ba50e..9ed5b460 100644 --- a/test/chaincodes/scenario/package.json +++ b/test/chaincodes/scenario/package.json @@ -2,7 +2,7 @@ "name": "chaincode", "description": "My first exciting chaincode implemented in node.js", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": ">=5.3.0" }, "scripts": { diff --git a/test/fv/package.json b/test/fv/package.json index 206aca7d..40a7656d 100644 --- a/test/fv/package.json +++ b/test/fv/package.json @@ -6,7 +6,7 @@ "testFabricThirdParty": "0.4.15", "docsLatestVersion": "release-1.4", "engines": { - "node": "^10.15.2", + "node": "^12.16.1", "npm": "^6.4.1" }, "engineStrict": true, diff --git a/test/fv/utils.js b/test/fv/utils.js index 1f92b36c..d2e11987 100755 --- a/test/fv/utils.js +++ b/test/fv/utils.js @@ -33,7 +33,7 @@ async function install(ccName) { try { fs.writeFileSync(npmrc, `registry=http://${ip.address()}:4873`); const folderName = '/opt/gopath/src/github.com/chaincode/' + ccName; - const cmd = `docker exec %s peer chaincode install -l node -n ${ccName} -v v0 -p ${folderName} --connTimeout 60s`; + const cmd = `docker exec %s peer chaincode install -l node -n ${ccName} -v v0 -p ${folderName} --connTimeout 180s`; await exec(util.format(cmd, 'org1_cli')); await exec(util.format(cmd, 'org2_cli')); @@ -44,7 +44,7 @@ async function install(ccName) { async function instantiate(ccName, func, args) { const cmd = `docker exec org1_cli peer chaincode instantiate ${getTLSArgs()} -o orderer.example.com:7050 -l node -C mychannel -n ${ccName} -v v0 -c '${printArgs(func, args)}' -P 'OR ("Org1MSP.member")'`; - console.log(cmd) + console.log(cmd); const res = await exec(cmd); await new Promise(resolve => setTimeout(resolve, 5000)); return res;