Skip to content
Snippets Groups Projects
Commit 1333c2d0 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] #689 Support NodeJS 8

parent 559b9e1b
No related branches found
No related tags found
2 merge requests!1222Add startup scripts,!1215Feature/es8
#!/usr/bin/env node #!/usr/bin/env node
"use strict"; "use strict";
const heapdump = require('heapdump'); // Allow to take heap snapshots on will with "kill -USR2 <pid>" --> generates a heapdump-<id>.heapsnapshot file from where duniter was launched
const co = require('co'); const co = require('co');
const duniter = require('../index'); const duniter = require('../index');
const stack = duniter.statics.autoStack(); const stack = duniter.statics.autoStack();
......
...@@ -35,8 +35,8 @@ duniter() { ...@@ -35,8 +35,8 @@ duniter() {
VERSION=`$NODE -v` VERSION=`$NODE -v`
if [[ $VERSION != v6* ]]; then if [[ $VERSION != v8* ]]; then
echo "$NODE v6 is required"; echo "$NODE v8 is required";
else else
# Calls duniter JS command # Calls duniter JS command
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "duniter", "name": "duniter",
"version": "1.6.14", "version": "1.6.14",
"engines": { "engines": {
"node": ">=6.11.1", "node": ">=8.2.1 <9",
"npm": ">=3.10" "npm": ">=3.10"
}, },
"engineStrict": true, "engineStrict": true,
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
"event-stream": "3.3.4", "event-stream": "3.3.4",
"express": "4.15.2", "express": "4.15.2",
"express-fileupload": "0.0.5", "express-fileupload": "0.0.5",
"heapdump": "^0.3.9",
"inquirer": "3.0.6", "inquirer": "3.0.6",
"jison": "0.4.17", "jison": "0.4.17",
"js-yaml": "3.8.2", "js-yaml": "3.8.2",
...@@ -82,8 +81,8 @@ ...@@ -82,8 +81,8 @@
"multimeter": "0.1.1", "multimeter": "0.1.1",
"naclb": "1.3.9", "naclb": "1.3.9",
"nnupnp": "1.0.2", "nnupnp": "1.0.2",
"node-uuid": "1.4.8",
"node-pre-gyp": "0.6.34", "node-pre-gyp": "0.6.34",
"node-uuid": "1.4.8",
"optimist": "0.6.1", "optimist": "0.6.1",
"q-io": "1.13.2", "q-io": "1.13.2",
"querablep": "^0.1.0", "querablep": "^0.1.0",
...@@ -114,15 +113,14 @@ ...@@ -114,15 +113,14 @@
"mocha-eslint": "0.1.7", "mocha-eslint": "0.1.7",
"nyc": "^11.0.3", "nyc": "^11.0.3",
"sha1": "", "sha1": "",
"should": "", "should": "*",
"source-map-support": "^0.4.15", "source-map-support": "^0.4.15",
"supertest": "", "supertest": "",
"tmp": "0.0.29", "tmp": "0.0.29",
"ts-node": "^3.3.0", "ts-node": "^3.3.0",
"typescript": "^2.4.1" "typescript": "^2.4.1"
}, },
"peerDependencies": { "peerDependencies": {},
},
"bin": { "bin": {
"duniter": "./bin/duniter" "duniter": "./bin/duniter"
} }
......
...@@ -124,9 +124,6 @@ cd "$RELEASES/desktop_/node_modules/sqlite3" ...@@ -124,9 +124,6 @@ cd "$RELEASES/desktop_/node_modules/sqlite3"
node-pre-gyp --runtime=node-webkit --target=$NW_VERSION configure node-pre-gyp --runtime=node-webkit --target=$NW_VERSION configure
node-pre-gyp --runtime=node-webkit --target=$NW_VERSION build node-pre-gyp --runtime=node-webkit --target=$NW_VERSION build
cp lib/binding/node-webkit-$NW_RELEASE-linux-x64/node_sqlite3.node lib/binding/node-v$ADDON_VERSION-linux-x64/node_sqlite3.node cp lib/binding/node-webkit-$NW_RELEASE-linux-x64/node_sqlite3.node lib/binding/node-v$ADDON_VERSION-linux-x64/node_sqlite3.node
cd "$RELEASES/desktop_/node_modules/heapdump"
nw-gyp --target=$NW_VERSION configure
nw-gyp --target=$NW_VERSION build
# Unused binaries # Unused binaries
cd "$RELEASES/desktop_/" cd "$RELEASES/desktop_/"
......
...@@ -74,9 +74,6 @@ call npm install --build-from-source ...@@ -74,9 +74,6 @@ call npm install --build-from-source
call node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure call node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
call node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build call node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
copy %cd%\lib\binding\node-webkit-%NW_RELEASE%-win32-x64\node_sqlite3.node %cd%\lib\binding\node-v%ADDON_VERSION%-win32-x64\node_sqlite3.node /Y copy %cd%\lib\binding\node-webkit-%NW_RELEASE%-win32-x64\node_sqlite3.node %cd%\lib\binding\node-v%ADDON_VERSION%-win32-x64\node_sqlite3.node /Y
cd ../heapdump
call nw-gyp --target=%NW_VERSION% --msvs_version=2015 configure
call nw-gyp --target=%NW_VERSION% --msvs_version=2015 build
cd ../../.. cd ../../..
mkdir duniter_release mkdir duniter_release
mkdir duniter_release\nodejs mkdir duniter_release\nodejs
......
{ {
"compilerOptions": { "compilerOptions": {
"sourceMap": true, "sourceMap": true,
"target": "es6", "target": "es2017",
"declaration": true, "declaration": true,
"moduleResolution": "node", "moduleResolution": "node",
"module": "commonjs", "module": "commonjs",
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment