Skip to content

Commit 7410ee9

Browse files
Deprecate support for Node.js 4 (#2444)
Deprecate support for Node.js `4.x.x` by adding message that users will see each time when they execute any command and their Node.js version is `4.x.x`.
1 parent 2dbc948 commit 7410ee9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bin/tns

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var path = require("path"),
66
pathToLib = path.join(__dirname, "..", "lib"),
77
pathToCommon = path.join(pathToLib, "common");
88

9-
require(path.join(pathToCommon, "verify-node-version")).verifyNodeVersion(node, "NativeScript");
9+
require(path.join(pathToCommon, "verify-node-version")).verifyNodeVersion(node, "NativeScript", [ "^4.0.0" ]);
1010

1111
var pathToCliExecutable = path.join(pathToLib, "nativescript-cli.js");
1212

@@ -27,7 +27,7 @@ if (nodeArgs.length) {
2727

2828
var nodeProcess = childProcess.spawn(process.execPath, args, { stdio: "inherit" });
2929

30-
nodeProcess.on("close", function(code) {
30+
nodeProcess.on("close", function (code) {
3131
// We need this handler so if command fails, we'll exit with same exit code as CLI.
3232
process.exit(code);
3333
});

lib/common

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@
100100
},
101101
"license": "Apache-2.0",
102102
"engines": {
103-
"node": ">=4.2.1 <5.0.0 || >=5.1.0 <8.0.0"
103+
"node": ">=6.0.0 <8.0.0"
104104
}
105105
}

0 commit comments

Comments
 (0)