Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit b55d5a2

Browse files
committed
update node and npm versions to latest LTS
1 parent 84acfee commit b55d5a2

3 files changed

Lines changed: 21 additions & 13 deletions

File tree

Gruntfile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ module.exports = function (grunt) {
8484
},
8585
"node-win": {
8686
"dest" : "<%= downloads %>",
87-
"src" : ["http://nodejs.org/dist/v<%= node.version %>/node.exe",
88-
"http://nodejs.org/dist/npm/npm-<%= npm.version %>.zip"]
87+
"src" : ["http://nodejs.org/dist/v<%= node.version %>/win-x86/node.exe",
88+
"http://registry.npmjs.org/npm/-/npm-<%= npm.version %>.tgz"]
8989
}
9090
},
9191
"clean": {
@@ -227,10 +227,10 @@ module.exports = function (grunt) {
227227
"version" : "3.2171.1902"
228228
},
229229
"node": {
230-
"version" : "0.10.24"
230+
"version" : "4.2.3"
231231
},
232232
"npm": {
233-
"version" : "1.2.11"
233+
"version" : "2.14.15"
234234
}
235235
});
236236

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@
1818
"grunt-contrib-copy": "0.5.0",
1919
"grunt-contrib-clean": "0.4.0",
2020
"guid": "0.0.10",
21+
"gunzip-maybe": "^1.2.1",
2122
"grunt-curl": "2.0.2",
2223
"grunt-shell": "0.2.1",
2324
"q": "0.9.2",
24-
"semver": "^4.1.0"
25+
"semver": "^4.1.0",
26+
"tar-fs": "^1.8.1"
2527
},
2628
"scripts": {
2729
"preinstall": "bash -c 'mv appshell.gyp .appshell.gyp'",
2830
"install": "",
2931
"postinstall": "bash -c 'mv .appshell.gyp appshell.gyp;'"
3032
}
31-
}
33+
}

tasks/setup.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ module.exports = function (grunt) {
2727

2828
var common = require("./common")(grunt),
2929
fs = require("fs"),
30+
gunzip = require("gunzip-maybe"),
31+
tar = require("tar-fs"),
3032
child_process = require("child_process"),
3133
path = require("path"),
3234
q = require("q"),
@@ -386,13 +388,17 @@ module.exports = function (grunt) {
386388
grunt.file.copy(exeFile, "deps/node/node.exe");
387389

388390
// unzip NPM
389-
unzip(npmFile, "deps/node").then(function () {
390-
nodeWriteVersion();
391-
done();
392-
}, function (err) {
393-
grunt.log.error(err);
394-
done(false);
395-
});
391+
fs.createReadStream(npmFile)
392+
.pipe(gunzip())
393+
.pipe(tar.extract("deps/node"))
394+
.on("error", function (err) {
395+
grunt.log.error(err);
396+
done(false);
397+
})
398+
.on("finish", function () {
399+
nodeWriteVersion();
400+
done();
401+
});
396402
});
397403

398404
// task: node-mac

0 commit comments

Comments
 (0)