Skip to content

Commit

Permalink
FAB-5879 Add support for node 8 in addition to 6
Browse files Browse the repository at this point in the history
we want to introduce support for node 8, in addition to 6 (until
6 goes end of life). we don't want to cut over to node 8
outright yet because it has not yet entered LTS status, which
is estimated to be in October

Change-Id: Icbc10f36b56e52e8c933ce85567a5f21a118e365
Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
  • Loading branch information
jimthematrix committed Aug 30, 2017
1 parent 244e2fe commit a7d1e06
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fabric-ca-client/lib/protos/*
fabric-ca-client/lib/hash.js
fabric-ca-client/lib/impl/*
npm-shrinkwrap.json
package-lock.json
npm-debug.log
tmp
.project
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The following section targets a current or future contributor to this project it

### Build and Test
To build and test, the following pre-requisites must be installed first:
* node runtime version 6.9.x, note that 7.0 is not supported at this point
* npm tool version 3.10.x
* node runtime version 6.9.x or higher, and 8.4.0 or higher ( __Node v7+ is not supported__ )
* npm tool version 3.10.x or higher
* gulp command (must be installed globaly with `npm install -g gulp`)
* docker (not required if you only want to run the headless tests with `npm test`, see below)

Expand Down
29 changes: 18 additions & 11 deletions build/tasks/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@
#
# SPDX-License-Identifier: Apache-2.0
*/
var gulp = require('gulp'),
let gulp = require('gulp'),
watch = require('gulp-watch'),
debug = require('gulp-debug'),
fs = require('fs'),
ca = require('./ca.js');

gulp.task('watch', function () {
watch(ca.DEPS, { ignoreInitial: false, base: 'fabric-client/' })
.pipe(debug())
.pipe(gulp.dest('fabric-ca-client/'));

watch([
'fabric-client/index.js',
'fabric-client/config/**/*',
'fabric-client/lib/**/*',
'fabric-ca-client/index.js',
'fabric-ca-client/config/**/*',
'fabric-ca-client/lib/**/*'
], { ignoreInitial: false, base: './' })
.pipe(debug())
.pipe(gulp.dest('node_modules'));
// only do the following if node_modules/fabric-client and
// node_modules/fabric-ca-client are NOT created as sym links
let statsA = lstatSync('node_modules/fabric-client');
let statsB = lstatSync('node_modules/fabric-ca-client');
if (!statsA.isSymbolicLink() && !statsB.isSymbolicLink()) {
watch([
'fabric-client/index.js',
'fabric-client/config/**/*',
'fabric-client/lib/**/*',
'fabric-ca-client/index.js',
'fabric-ca-client/config/**/*',
'fabric-ca-client/lib/**/*'
], { ignoreInitial: false, base: './' })
.pipe(debug())
.pipe(gulp.dest('node_modules'));
}
});
2 changes: 1 addition & 1 deletion docs/tutorials/app-dev-env-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ is responsible for managing the user certificates.
You will need the following software:
* [Docker and Docker Compose](http://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#docker-and-docker-compose) - see Hyperledger Fabric for details
* [Nodejs](https://nodejs.org/en/download/)
v6.2.0 - 6.10.0 ( __Node v7+ is not supported__ )
v6.2.0 - 6.10.0, 8.4.0+ ( __Node v7+ is not supported__ )

## Prepare crypto materials

Expand Down
4 changes: 1 addition & 3 deletions fabric-ca-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
"url": "http://gerrit.hyperledger.org/r/fabric-sdk-node"
},
"engines": {
"node": ">=6.9.0 <7.0",
"node": ">=6.9.0",
"npm": ">=3.10.0"
},
"engine-strict": true,
"engineStrict": true,
"dependencies": {
"bn.js": "^4.11.3",
"elliptic": "^6.2.3",
Expand Down
4 changes: 1 addition & 3 deletions fabric-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
"test": "node test/unit/headless-tests.js"
},
"engines": {
"node": ">=6.9.0 <7.0",
"node": ">=6.9.0",
"npm": ">=3.10.0"
},
"engine-strict": true,
"engineStrict": true,
"dependencies": {
"bn.js": "^4.11.3",
"callsite": "^1.0.0",
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@
"scripts": {
"test": "gulp test-headless"
},
"engines": {
"node": ">=4.5.0",
"npm": ">=2.15.9"
},
"engine-strict": true,
"engineStrict": true,
"devDependencies": {
"bn.js": "^4.11.6",
"bn.js": "^4.11.8",
"bunyan": "^1.8.10",
"cloudant": "^1.7.0",
"del": "^2.2.2",
Expand All @@ -37,7 +31,7 @@
"intercept-stdout": "^0.1.2",
"jsrsasign": "6.2.2",
"log4js": "^0.6.38",
"mock-couch": "https://github.com/jimthematrix/mock-couch.git",
"mock-couch": "git+https://github.com/jimthematrix/mock-couch.git",
"nano": "^6.2.0",
"require-dir": "^0.3.0",
"rewire": "^2.5.2",
Expand Down

0 comments on commit a7d1e06

Please sign in to comment.