diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 8ee91582..00365773 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -12,7 +12,7 @@ This table shows the summary of the compatibility of the Node modules at version | Node modules **v1.4** | Yes | 8 | Yes | | Node modules **v2.0** | Yes | 10 | Yes | -By default a Fabric Peer v1.4 will create a Nodejs v8 , and a Fabric Peer v2.0 will create a Nodejs v12 runtime. Whilst 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.0 will create a Nodejs v10 runtime. Whilst 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.0.0 still function when connecting to the Fabric Peer v1.4. @@ -32,15 +32,15 @@ Node modules that are produced are `fabric-contract-api`, `fabric-shim`, `fabric ### Supported Runtimes -v1.4.x and v2.0.0 Node modules are supported running in Nodejs 12.13 with the x86_64 architecture. Later Nodejs 12 versions are supported but are not tested. +v2.0.0 Node modules are supported running in Nodejs 10.15+, with the x86_64 architecture. -v1.4.x Node modules are supported running Nodejs 8.16.1 with the  x86_64 architecture. Later Nodejs 8 versions are supported but are not tested. +v1.4.x Node modules are supported running Nodejs 8.16.1 with the x86_64 architecture. Architecture Support: all docker images, runtimes, tools are tested under x86_64 ONLY ### Default Peer Runtime selection -When using Fabric 2.0.0, the default docker image that is used to run the Node chaincode is node:12.13.0-alpine  +When using Fabric 2.0.0, the default docker image that is used to run the Node chaincode is node:10.15.2-alpine  *Note:* With the default docker image used by Fabric 2.0.0 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/TUTORIAL.md b/TUTORIAL.md index bf0ad6b7..792e60bd 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": ">=8.4.0", - "npm": ">=5.3.0" + "node": "^10.15.2", + "npm": "^6.4.1" }, "scripts": { "test":"mocha..... @@ -28,8 +28,8 @@ The dependencies of `fabric-chaincode-api` and `fabric-shim` will be required. "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-chaincode-api": "^1.4.0", - "fabric-shim": "^1.4.0" + "fabric-chaincode-api": "2.1.0-unstable", + "fabric-shim": "2.1.0-unstable" } } diff --git a/docker/fabric-nodeenv/Dockerfile b/docker/fabric-nodeenv/Dockerfile index 252632c9..6b1dbcc0 100644 --- a/docker/fabric-nodeenv/Dockerfile +++ b/docker/fabric-nodeenv/Dockerfile @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -ARG NODE_VER=12.13.0 +ARG NODE_VER=10.15.2 FROM node:${NODE_VER}-alpine RUN apk add --no-cache \ make \ diff --git a/docker/fabric-nodeenv/docker.js b/docker/fabric-nodeenv/docker.js index 7c56d7aa..617dfc55 100644 --- a/docker/fabric-nodeenv/docker.js +++ b/docker/fabric-nodeenv/docker.js @@ -16,7 +16,7 @@ const util = require('util'); const { shell: runcmds } = require('toolchain'); const version = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'package.json'))).version; -const node_version = process.env.NODE_VERSION || '12.9.1'; +const node_version = process.env.NODE_VERSION || '10.15.2'; const build_dir = path.join(__dirname); const tag = version + '-' + git.short(); diff --git a/docs/_jsdoc/tutorials/using-chaincodeinterface.md b/docs/_jsdoc/tutorials/using-chaincodeinterface.md index fd718e69..b1df0abb 100644 --- a/docs/_jsdoc/tutorials/using-chaincodeinterface.md +++ b/docs/_jsdoc/tutorials/using-chaincodeinterface.md @@ -60,8 +60,8 @@ Finally, update the "start" script in package.json to "node mychaincode.js": "version": "1.0.0", "description": "My first exciting chaincode implemented in node.js", "engines": { - "node": ">=8.4.0", - "npm": ">=5.3.0" + "node": "^10.15.2", + "npm": "^6.4.1" }, "scripts": { "start" : "node mychaincode.js" }, "engine-strict": true, diff --git a/docs/_jsdoc/tutorials/using-contractinterface.md b/docs/_jsdoc/tutorials/using-contractinterface.md index b63bc196..4bd2f92d 100644 --- a/docs/_jsdoc/tutorials/using-contractinterface.md +++ b/docs/_jsdoc/tutorials/using-contractinterface.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": ">=8.4.0", - "npm": ">=5.3.0" + "node": "^10.15.2", + "npm": "^6.4.1" }, "scripts": { "test":"mocha..... @@ -28,8 +28,8 @@ The dependencies of `fabric-chaincode-api` and `fabric-shim` will be required. "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-chaincode-api": "^1.4.0", - "fabric-shim": "^1.4.0" + "fabric-chaincode-api": "2.1.0-unstable", + "fabric-shim": "2.1.0-unstable" } }