node-version-utils 0.4.2 → 0.5.0
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/lib/spawnOptions.js +1 -1
- package/package.json +8 -7
- 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/lib/spawnOptions.js
CHANGED
|
@@ -2,7 +2,7 @@ var path = require('path');
|
|
|
2
2
|
var assign = require('just-extend');
|
|
3
3
|
var prepend = require('path-string-prepend');
|
|
4
4
|
var NODE = process.platform === 'win32' ? 'node.exe' : 'node';
|
|
5
|
-
var pathKey = require('
|
|
5
|
+
var pathKey = require('env-path-key');
|
|
6
6
|
var startsCaseInsensitiveFn = require('./startsCaseInsensitiveFn');
|
|
7
7
|
|
|
8
8
|
var isWindows = process.platform === 'win32';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-version-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Utilities for running commands on a specific version of node by installed path",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -30,16 +30,18 @@
|
|
|
30
30
|
"test": "mocha-compat test/spec/**/*.test.js --no-timeouts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"cross-spawn-cb": "^0.
|
|
33
|
+
"cross-spawn-cb": "^0.6.3",
|
|
34
|
+
"env-path-key": "^0.3.0",
|
|
34
35
|
"just-extend": "^6.0.1",
|
|
35
|
-
"path-string-prepend": "^0.2.0"
|
|
36
|
+
"path-string-prepend": "^0.2.0",
|
|
37
|
+
"rimraf": "^2.7.1"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
|
-
"@typescript-eslint/parser": "^5.30.
|
|
40
|
+
"@typescript-eslint/parser": "^5.30.7",
|
|
39
41
|
"cr": "^0.1.0",
|
|
40
42
|
"depcheck": "^1.4.3",
|
|
41
43
|
"dis-dat": "^0.1.7",
|
|
42
|
-
"eslint": "^8.
|
|
44
|
+
"eslint": "^8.20.0",
|
|
43
45
|
"eslint-config-prettier": "^8.5.0",
|
|
44
46
|
"eslint-config-standard": "^17.0.0",
|
|
45
47
|
"eslint-plugin-import": "^2.26.0",
|
|
@@ -48,9 +50,8 @@
|
|
|
48
50
|
"lodash.find": "^4.6.0",
|
|
49
51
|
"match-semver": "^0.1.0",
|
|
50
52
|
"mocha-compat": "^3.5.5",
|
|
51
|
-
"node-install-release": "^0.
|
|
53
|
+
"node-install-release": "^0.3.0",
|
|
52
54
|
"prettier": "^2.7.1",
|
|
53
|
-
"rimraf": "^2.7.1",
|
|
54
55
|
"semver": "^5.7.1"
|
|
55
56
|
},
|
|
56
57
|
"engines": {
|
package/lib/spawnSync.js
DELETED