node-version-utils 0.4.3 → 0.5.1
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.
- package/lib/index.js +0 -1
- package/lib/spawn.js +5 -8
- package/package.json +7 -6
- package/lib/spawnSync.js +0 -6
package/lib/index.js
CHANGED
package/lib/spawn.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
var crossSpawn = require('cross-spawn-cb');
|
|
2
|
-
|
|
3
2
|
var spawnOptions = require('./spawnOptions');
|
|
4
3
|
|
|
5
|
-
function spawn(installPath, command, args, options, callback) {
|
|
6
|
-
crossSpawn(command, args, spawnOptions(installPath, options), callback);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
module.exports = function spawnWrapper(installPath, command, args, options, callback) {
|
|
4
|
+
module.exports = function spawn(installPath, command, args, options, callback) {
|
|
10
5
|
if (typeof options === 'function') {
|
|
11
6
|
callback = options;
|
|
12
7
|
options = {};
|
|
13
8
|
}
|
|
14
9
|
|
|
15
|
-
if (typeof callback === 'function')
|
|
10
|
+
if (typeof callback === 'function') {
|
|
11
|
+
return crossSpawn(command, args, spawnOptions(installPath, options || {}), callback);
|
|
12
|
+
}
|
|
16
13
|
return new Promise(function (resolve, reject) {
|
|
17
|
-
|
|
14
|
+
spawn(installPath, command, args, options, function spawnCallback(err, res) {
|
|
18
15
|
err ? reject(err) : resolve(res);
|
|
19
16
|
});
|
|
20
17
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-version-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Utilities for running commands on a specific version of node by installed path",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -30,17 +30,18 @@
|
|
|
30
30
|
"test": "mocha-compat test/spec/**/*.test.js --no-timeouts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"cross-spawn-cb": "^0.6.
|
|
33
|
+
"cross-spawn-cb": "^0.6.4",
|
|
34
34
|
"env-path-key": "^0.3.0",
|
|
35
35
|
"just-extend": "^6.0.1",
|
|
36
|
-
"path-string-prepend": "^0.2.0"
|
|
36
|
+
"path-string-prepend": "^0.2.0",
|
|
37
|
+
"rimraf": "^2.7.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@typescript-eslint/parser": "^5.30.
|
|
40
|
+
"@typescript-eslint/parser": "^5.30.7",
|
|
40
41
|
"cr": "^0.1.0",
|
|
41
42
|
"depcheck": "^1.4.3",
|
|
42
43
|
"dis-dat": "^0.1.7",
|
|
43
|
-
"eslint": "^8.
|
|
44
|
+
"eslint": "^8.20.0",
|
|
44
45
|
"eslint-config-prettier": "^8.5.0",
|
|
45
46
|
"eslint-config-standard": "^17.0.0",
|
|
46
47
|
"eslint-plugin-import": "^2.26.0",
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"lodash.find": "^4.6.0",
|
|
50
51
|
"match-semver": "^0.1.0",
|
|
51
52
|
"mocha-compat": "^3.5.5",
|
|
52
|
-
"node-install-release": "^0.
|
|
53
|
+
"node-install-release": "^0.3.1",
|
|
53
54
|
"prettier": "^2.7.1",
|
|
54
55
|
"semver": "^5.7.1"
|
|
55
56
|
},
|
package/lib/spawnSync.js
DELETED