cross-spawn-cb 0.6.4 → 0.6.5

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 CHANGED
@@ -1,4 +1,18 @@
1
1
  require('./polyfills');
2
+
3
+ // exclude from polyfils to avoid loading in functionExec
4
+ var cp = require('child_process');
5
+ if (!cp.spawnSync) {
6
+ var path = require('path')
7
+ var functionExec = require('function-exec-sync');
8
+
9
+ cp.spawnSync = function spawnSync(command, args, options) {
10
+ options = options || {};
11
+ var filePath = path.resolve(__dirname, 'spawnCallback.js');
12
+ return functionExec({ callbacks: true }, filePath, command, args, options);
13
+ };
14
+ }
15
+
2
16
  module.exports = require('./spawnCallback');
3
17
  module.exports.spawn = require('./spawnCallback');
4
18
  module.exports.sync = require('./spawnSyncCallback');
package/lib/polyfills.js CHANGED
@@ -1,13 +1,4 @@
1
+ require('core-js/actual/object/assign');
2
+
1
3
  var path = require('path');
2
4
  if (typeof path.delimiter === 'undefined') path.delimiter = process.platform === 'win32' ? ';' : ':';
3
-
4
- var cp = require('child_process');
5
- if (!cp.spawnSync) {
6
- var functionExec = require('function-exec-sync');
7
-
8
- cp.spawnSync = function spawnSync(command, args, options) {
9
- options = options || {};
10
- var filePath = path.resolve(__dirname, 'spawnCallback.js');
11
- return functionExec({ callbacks: true }, filePath, command, args, options);
12
- };
13
- }
@@ -1,3 +1,4 @@
1
+ require('./polyfills');
1
2
  var once = require('once');
2
3
  var nextTick = require('next-tick');
3
4
 
@@ -47,7 +48,7 @@ module.exports = function spawnCallback(command, args, options, callback) {
47
48
  res.stderr = Buffer.concat(res.stderr);
48
49
  if (options.encoding !== 'buffer') res.stderr = res.stderr.toString(options.encoding);
49
50
  }
50
- res.stdio = [null, res.stdout, res.stderr];
51
+ res.output = [null, res.stdout, res.stderr];
51
52
 
52
53
  // process errors
53
54
  var err = res.status !== 0 ? new Error('Non-zero exit code: ' + res.status) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cross-spawn-cb",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Cross spawn with a completion callback",
5
5
  "keywords": [
6
6
  "cross-spawn",
@@ -14,6 +14,7 @@
14
14
  "license": "MIT",
15
15
  "main": "lib/index.js",
16
16
  "scripts": {
17
+ "test:engines": "nvu engines npm test",
17
18
  "format": "prettier --write .",
18
19
  "lint": "eslint .",
19
20
  "prepublishOnly": "npm run lint && depcheck",
@@ -24,27 +25,28 @@
24
25
  "lib"
25
26
  ],
26
27
  "dependencies": {
28
+ "core-js": "^3.23.5",
27
29
  "cross-spawn": "^7.0.3",
28
- "function-exec-sync": "^0.2.1",
30
+ "function-exec-sync": "^0.2.4",
29
31
  "just-extend": "^6.0.1",
30
32
  "next-tick": "^1.1.0",
31
33
  "once": "^1.4.0"
32
34
  },
33
35
  "devDependencies": {
34
- "@babel/preset-env": "^7.18.6",
36
+ "@babel/preset-env": "^7.18.9",
35
37
  "@rollup/plugin-babel": "^5.3.1",
36
38
  "@rollup/plugin-commonjs": "^22.0.1",
37
39
  "@rollup/plugin-node-resolve": "^13.3.0",
38
- "@typescript-eslint/parser": "^5.30.6",
40
+ "@typescript-eslint/parser": "^5.30.7",
39
41
  "depcheck": "^1.4.3",
40
- "eslint": "^8.19.0",
42
+ "eslint": "^8.20.0",
41
43
  "eslint-config-prettier": "^8.5.0",
42
44
  "eslint-config-standard": "^17.0.0",
43
45
  "eslint-plugin-import": "^2.26.0",
44
46
  "eslint-plugin-promise": "^6.0.0",
45
47
  "mocha-compat": "^3.5.5",
46
48
  "prettier": "^2.7.1",
47
- "rollup": "^2.76.0",
49
+ "rollup": "^2.77.0",
48
50
  "rollup-plugin-babel": "^4.4.0",
49
51
  "rollup-plugin-commonjs": "^10.1.0",
50
52
  "rollup-plugin-node-externals": "^4.1.1"