node-install-release 0.3.18 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,14 +5,7 @@ var access = require('fs-access-compat');
|
|
|
5
5
|
|
|
6
6
|
var progress = require('./progress');
|
|
7
7
|
|
|
8
|
-
var major = +process.versions.node.split('.')[0];
|
|
9
|
-
var minor = +process.versions.node.split('.')[1];
|
|
10
|
-
var callExtract = path.join(__dirname, 'callExtract.js');
|
|
11
|
-
|
|
12
|
-
var call = null; // break dependencies
|
|
13
8
|
module.exports = function conditionalExtract(src, dest, options, callback) {
|
|
14
|
-
if (!call) call = require('node-version-call'); // break dependencies
|
|
15
|
-
|
|
16
9
|
if (typeof options === 'function') {
|
|
17
10
|
callback = options;
|
|
18
11
|
options = null;
|
|
@@ -25,22 +18,10 @@ module.exports = function conditionalExtract(src, dest, options, callback) {
|
|
|
25
18
|
mkpath(path.dirname(dest), function () {
|
|
26
19
|
var extractOptions = Object.assign({ strip: 1, progress: progress, time: 1000 }, options);
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
call({ version: 'lts', callbacks: true }, callExtract, src, dest, extractOptions);
|
|
33
|
-
console.log('');
|
|
34
|
-
callback();
|
|
35
|
-
} catch (err) {
|
|
36
|
-
callback(err);
|
|
37
|
-
}
|
|
38
|
-
} else {
|
|
39
|
-
extract(src, dest, extractOptions, function (err) {
|
|
40
|
-
console.log('');
|
|
41
|
-
callback(err);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
21
|
+
extract(src, dest, extractOptions, function (err) {
|
|
22
|
+
console.log('');
|
|
23
|
+
callback(err);
|
|
24
|
+
});
|
|
44
25
|
});
|
|
45
26
|
});
|
|
46
27
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var path = require('path');
|
|
2
|
+
var access = require('fs-access-compat');
|
|
3
|
+
var rimraf = require('rimraf');
|
|
2
4
|
|
|
3
5
|
var conditionalCache = require('../conditionalCache');
|
|
4
6
|
var conditionalExtract = require('../conditionalExtract');
|
|
@@ -10,9 +12,17 @@ module.exports = function installCompressed(relativePath, dest, record, options,
|
|
|
10
12
|
|
|
11
13
|
conditionalCache(downloadPath, cachePath, function (err) {
|
|
12
14
|
if (err) return callback(err);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
access(dest, function (err) {
|
|
16
|
+
if (!err) return callback(); // already exists
|
|
17
|
+
conditionalExtract(cachePath, dest, Object.assign({ strip: 1, progress: progress, time: 1000 }, options), function (err) {
|
|
18
|
+
console.log('');
|
|
19
|
+
if (err) return callback(err);
|
|
20
|
+
|
|
21
|
+
// some compressed versions of node come with npm pre-installed, but we want to override
|
|
22
|
+
rimraf(path.join(dest, 'node_modules'), function () {
|
|
23
|
+
callback(err);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
16
26
|
});
|
|
17
27
|
});
|
|
18
28
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var path = require('path');
|
|
2
|
+
var access = require('fs-access-compat');
|
|
2
3
|
|
|
3
4
|
var conditionalCache = require('../conditionalCache');
|
|
4
5
|
var copyFile = require('../copyFile');
|
|
5
|
-
var access = require('fs-access-compat');
|
|
6
6
|
|
|
7
7
|
module.exports = function installExe(relativePath, dest, record, options, callback) {
|
|
8
8
|
var downloadPath = options.downloadURL(relativePath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-install-release",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Cross-platform solution for installing releases of Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -36,19 +36,18 @@
|
|
|
36
36
|
"cross-spawn-cb": "^0.6.14",
|
|
37
37
|
"end-with": "^1.0.2",
|
|
38
38
|
"exit": "^0.1.2",
|
|
39
|
-
"fast-extract": "^0.3
|
|
39
|
+
"fast-extract": "^0.4.3",
|
|
40
40
|
"fs-access-compat": "^1.0.3",
|
|
41
41
|
"function-exec-sync": "^0.2.10",
|
|
42
|
-
"get-remote": "^0.
|
|
42
|
+
"get-remote": "^0.8.1",
|
|
43
43
|
"getopts-compat": "^2.2.5",
|
|
44
44
|
"isarray": "^2.0.5",
|
|
45
45
|
"lodash.find": "^4.6.0",
|
|
46
46
|
"lodash.keys": "^4.2.0",
|
|
47
47
|
"match-semver": "^0.1.1",
|
|
48
48
|
"mkpath": "^1.0.0",
|
|
49
|
-
"node-filename-to-dist-paths": "^0.1
|
|
50
|
-
"node-resolve-versions": "^0.3.
|
|
51
|
-
"node-version-call": "^0.3.19",
|
|
49
|
+
"node-filename-to-dist-paths": "^0.2.1",
|
|
50
|
+
"node-resolve-versions": "^0.3.9",
|
|
52
51
|
"osenv": "^0.1.5",
|
|
53
52
|
"pump": "^3.0.0",
|
|
54
53
|
"queue-cb": "^1.1.7",
|