cross-spawn-cb 2.0.13 → 2.1.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.
package/README.md CHANGED
@@ -7,7 +7,6 @@ var assert = require('assert');
7
7
  var spawn = require('cross-spawn-cb');
8
8
 
9
9
  spawn('node', ['--version'], { stdio: 'inherit' }, function (err, res) {
10
- assert.ok(!err, err ? err.message : '');
11
10
  done();
12
11
  });
13
12
  ```
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  "use strict";
3
2
  Object.defineProperty(exports, "__esModule", {
4
3
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/compat/cross-spawn-cb/src/types.ts"],"sourcesContent":["/// <reference types=\"node\" />\n\nimport type * as child_process from 'child_process';\n\nexport type ChildProcess = child_process.ChildProcess;\nexport interface SpawnOptions extends child_process.SpawnOptions {\n encoding?: BufferEncoding;\n env?: NodeJS.ProcessEnv;\n input?: string | Buffer;\n}\nexport type SpawnResult = child_process.SpawnSyncReturns<string | Buffer>;\n\nexport interface SpawnError extends Error {\n status?: number;\n stderr?: string | Buffer;\n code?: string;\n}\nexport type SpawnCallback = (err?: SpawnError, res?: SpawnResult) => void;\n"],"names":[],"mappings":"AAAA,8BAA8B"}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/compat/cross-spawn-cb/src/workers/sync.ts"],"sourcesContent":["import { spawnKeys } from '../constants';\n\nimport type { SpawnOptions, SpawnResult } from '../types';\n\nexport default function worker(res: SpawnResult, options?: SpawnOptions) {\n options = options || {};\n\n // pipe if inherited\n if (res.stdout && options.stdio === 'inherit') {\n process.stdout.write(res.stdout);\n res.stdout = null;\n }\n if (res.stderr && options.stdio === 'inherit') {\n process.stderr.write(res.stderr);\n res.stderr = null;\n }\n\n // patch: early node on windows could return null\n if (res.status === null) res.status = 0;\n\n // process errors\n const err = res.status !== 0 ? new Error(`Non-zero exit code: ${res.status}`) : null;\n if (err) {\n for (const key in res) {\n if (spawnKeys.indexOf(key) < 0) continue;\n err[key] = Buffer.isBuffer(res[key]) ? res[key].toString('utf8') : res[key];\n }\n }\n if (err) throw err;\n return res;\n}\n"],"names":["worker","res","options","stdout","stdio","process","write","stderr","status","err","Error","key","spawnKeys","indexOf","Buffer","isBuffer","toString"],"mappings":";;;;+BAIA;;;eAAwBA;;;yBAJE;AAIX,SAASA,OAAOC,GAAgB,EAAEC,OAAsB;IACrEA,UAAUA,WAAW,CAAC;IAEtB,oBAAoB;IACpB,IAAID,IAAIE,MAAM,IAAID,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQF,MAAM,CAACG,KAAK,CAACL,IAAIE,MAAM;QAC/BF,IAAIE,MAAM,GAAG;IACf;IACA,IAAIF,IAAIM,MAAM,IAAIL,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQE,MAAM,CAACD,KAAK,CAACL,IAAIM,MAAM;QAC/BN,IAAIM,MAAM,GAAG;IACf;IAEA,iDAAiD;IACjD,IAAIN,IAAIO,MAAM,KAAK,MAAMP,IAAIO,MAAM,GAAG;IAEtC,iBAAiB;IACjB,IAAMC,MAAMR,IAAIO,MAAM,KAAK,IAAI,IAAIE,MAAM,AAAC,uBAAiC,OAAXT,IAAIO,MAAM,KAAM;IAChF,IAAIC,KAAK;QACP,IAAK,IAAME,OAAOV,IAAK;YACrB,IAAIW,oBAAS,CAACC,OAAO,CAACF,OAAO,GAAG;YAChCF,GAAG,CAACE,IAAI,GAAGG,OAAOC,QAAQ,CAACd,GAAG,CAACU,IAAI,IAAIV,GAAG,CAACU,IAAI,CAACK,QAAQ,CAAC,UAAUf,GAAG,CAACU,IAAI;QAC7E;IACF;IACA,IAAIF,KAAK,MAAMA;IACf,OAAOR;AACT"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/compat/cross-spawn-cb/src/workers/sync.ts"],"sourcesContent":["import { spawnKeys } from '../constants';\n\nimport type { SpawnOptions, SpawnResult } from '../types';\n\nexport default function worker(res: SpawnResult, options?: SpawnOptions): SpawnResult {\n options = options || {};\n\n // pipe if inherited\n if (res.stdout && options.stdio === 'inherit') {\n process.stdout.write(res.stdout);\n res.stdout = null;\n }\n if (res.stderr && options.stdio === 'inherit') {\n process.stderr.write(res.stderr);\n res.stderr = null;\n }\n\n // patch: early node on windows could return null\n if (res.status === null) res.status = 0;\n\n // process errors\n const err = res.status !== 0 ? new Error(`Non-zero exit code: ${res.status}`) : null;\n if (err) {\n for (const key in res) {\n if (spawnKeys.indexOf(key) < 0) continue;\n err[key] = Buffer.isBuffer(res[key]) ? res[key].toString('utf8') : res[key];\n }\n }\n if (err) throw err;\n return res;\n}\n"],"names":["worker","res","options","stdout","stdio","process","write","stderr","status","err","Error","key","spawnKeys","indexOf","Buffer","isBuffer","toString"],"mappings":";;;;+BAIA;;;eAAwBA;;;yBAJE;AAIX,SAASA,OAAOC,GAAgB,EAAEC,OAAsB;IACrEA,UAAUA,WAAW,CAAC;IAEtB,oBAAoB;IACpB,IAAID,IAAIE,MAAM,IAAID,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQF,MAAM,CAACG,KAAK,CAACL,IAAIE,MAAM;QAC/BF,IAAIE,MAAM,GAAG;IACf;IACA,IAAIF,IAAIM,MAAM,IAAIL,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQE,MAAM,CAACD,KAAK,CAACL,IAAIM,MAAM;QAC/BN,IAAIM,MAAM,GAAG;IACf;IAEA,iDAAiD;IACjD,IAAIN,IAAIO,MAAM,KAAK,MAAMP,IAAIO,MAAM,GAAG;IAEtC,iBAAiB;IACjB,IAAMC,MAAMR,IAAIO,MAAM,KAAK,IAAI,IAAIE,MAAM,AAAC,uBAAiC,OAAXT,IAAIO,MAAM,KAAM;IAChF,IAAIC,KAAK;QACP,IAAK,IAAME,OAAOV,IAAK;YACrB,IAAIW,oBAAS,CAACC,OAAO,CAACF,OAAO,GAAG;YAChCF,GAAG,CAACE,IAAI,GAAGG,OAAOC,QAAQ,CAACd,GAAG,CAACU,IAAI,IAAIV,GAAG,CAACU,IAAI,CAACK,QAAQ,CAAC,UAAUf,GAAG,CAACU,IAAI;QAC7E;IACF;IACA,IAAIF,KAAK,MAAMA;IACf,OAAOR;AACT"}
@@ -1,2 +1 @@
1
- /// <reference types="node" />
2
1
  export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/compat/cross-spawn-cb/src/types.ts"],"sourcesContent":["/// <reference types=\"node\" />\n\nimport type * as child_process from 'child_process';\n\nexport type ChildProcess = child_process.ChildProcess;\nexport interface SpawnOptions extends child_process.SpawnOptions {\n encoding?: BufferEncoding;\n env?: NodeJS.ProcessEnv;\n input?: string | Buffer;\n}\nexport type SpawnResult = child_process.SpawnSyncReturns<string | Buffer>;\n\nexport interface SpawnError extends Error {\n status?: number;\n stderr?: string | Buffer;\n code?: string;\n}\nexport type SpawnCallback = (err?: SpawnError, res?: SpawnResult) => void;\n"],"names":[],"mappings":"AAAA,8BAA8B;AAiB9B,WAA0E"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/compat/cross-spawn-cb/src/types.ts"],"sourcesContent":["import type * as child_process from 'child_process';\n\nexport type ChildProcess = child_process.ChildProcess;\nexport interface SpawnOptions extends child_process.SpawnOptions {\n encoding?: BufferEncoding;\n env?: NodeJS.ProcessEnv;\n input?: string | Buffer;\n}\nexport type SpawnResult = child_process.SpawnSyncReturns<string | Buffer>;\n\nexport interface SpawnError extends Error {\n status?: number;\n stderr?: string | Buffer;\n code?: string;\n}\nexport type SpawnCallback = (err?: SpawnError, res?: SpawnResult) => void;\n"],"names":[],"mappings":"AAeA,WAA0E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/compat/cross-spawn-cb/src/workers/sync.ts"],"sourcesContent":["import { spawnKeys } from '../constants';\n\nimport type { SpawnOptions, SpawnResult } from '../types';\n\nexport default function worker(res: SpawnResult, options?: SpawnOptions) {\n options = options || {};\n\n // pipe if inherited\n if (res.stdout && options.stdio === 'inherit') {\n process.stdout.write(res.stdout);\n res.stdout = null;\n }\n if (res.stderr && options.stdio === 'inherit') {\n process.stderr.write(res.stderr);\n res.stderr = null;\n }\n\n // patch: early node on windows could return null\n if (res.status === null) res.status = 0;\n\n // process errors\n const err = res.status !== 0 ? new Error(`Non-zero exit code: ${res.status}`) : null;\n if (err) {\n for (const key in res) {\n if (spawnKeys.indexOf(key) < 0) continue;\n err[key] = Buffer.isBuffer(res[key]) ? res[key].toString('utf8') : res[key];\n }\n }\n if (err) throw err;\n return res;\n}\n"],"names":["spawnKeys","worker","res","options","stdout","stdio","process","write","stderr","status","err","Error","key","indexOf","Buffer","isBuffer","toString"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAe;AAIzC,eAAe,SAASC,OAAOC,GAAgB,EAAEC,OAAsB;IACrEA,UAAUA,WAAW,CAAC;IAEtB,oBAAoB;IACpB,IAAID,IAAIE,MAAM,IAAID,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQF,MAAM,CAACG,KAAK,CAACL,IAAIE,MAAM;QAC/BF,IAAIE,MAAM,GAAG;IACf;IACA,IAAIF,IAAIM,MAAM,IAAIL,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQE,MAAM,CAACD,KAAK,CAACL,IAAIM,MAAM;QAC/BN,IAAIM,MAAM,GAAG;IACf;IAEA,iDAAiD;IACjD,IAAIN,IAAIO,MAAM,KAAK,MAAMP,IAAIO,MAAM,GAAG;IAEtC,iBAAiB;IACjB,MAAMC,MAAMR,IAAIO,MAAM,KAAK,IAAI,IAAIE,MAAM,CAAC,oBAAoB,EAAET,IAAIO,MAAM,EAAE,IAAI;IAChF,IAAIC,KAAK;QACP,IAAK,MAAME,OAAOV,IAAK;YACrB,IAAIF,UAAUa,OAAO,CAACD,OAAO,GAAG;YAChCF,GAAG,CAACE,IAAI,GAAGE,OAAOC,QAAQ,CAACb,GAAG,CAACU,IAAI,IAAIV,GAAG,CAACU,IAAI,CAACI,QAAQ,CAAC,UAAUd,GAAG,CAACU,IAAI;QAC7E;IACF;IACA,IAAIF,KAAK,MAAMA;IACf,OAAOR;AACT"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/compat/cross-spawn-cb/src/workers/sync.ts"],"sourcesContent":["import { spawnKeys } from '../constants';\n\nimport type { SpawnOptions, SpawnResult } from '../types';\n\nexport default function worker(res: SpawnResult, options?: SpawnOptions): SpawnResult {\n options = options || {};\n\n // pipe if inherited\n if (res.stdout && options.stdio === 'inherit') {\n process.stdout.write(res.stdout);\n res.stdout = null;\n }\n if (res.stderr && options.stdio === 'inherit') {\n process.stderr.write(res.stderr);\n res.stderr = null;\n }\n\n // patch: early node on windows could return null\n if (res.status === null) res.status = 0;\n\n // process errors\n const err = res.status !== 0 ? new Error(`Non-zero exit code: ${res.status}`) : null;\n if (err) {\n for (const key in res) {\n if (spawnKeys.indexOf(key) < 0) continue;\n err[key] = Buffer.isBuffer(res[key]) ? res[key].toString('utf8') : res[key];\n }\n }\n if (err) throw err;\n return res;\n}\n"],"names":["spawnKeys","worker","res","options","stdout","stdio","process","write","stderr","status","err","Error","key","indexOf","Buffer","isBuffer","toString"],"mappings":"AAAA,SAASA,SAAS,QAAQ,eAAe;AAIzC,eAAe,SAASC,OAAOC,GAAgB,EAAEC,OAAsB;IACrEA,UAAUA,WAAW,CAAC;IAEtB,oBAAoB;IACpB,IAAID,IAAIE,MAAM,IAAID,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQF,MAAM,CAACG,KAAK,CAACL,IAAIE,MAAM;QAC/BF,IAAIE,MAAM,GAAG;IACf;IACA,IAAIF,IAAIM,MAAM,IAAIL,QAAQE,KAAK,KAAK,WAAW;QAC7CC,QAAQE,MAAM,CAACD,KAAK,CAACL,IAAIM,MAAM;QAC/BN,IAAIM,MAAM,GAAG;IACf;IAEA,iDAAiD;IACjD,IAAIN,IAAIO,MAAM,KAAK,MAAMP,IAAIO,MAAM,GAAG;IAEtC,iBAAiB;IACjB,MAAMC,MAAMR,IAAIO,MAAM,KAAK,IAAI,IAAIE,MAAM,CAAC,oBAAoB,EAAET,IAAIO,MAAM,EAAE,IAAI;IAChF,IAAIC,KAAK;QACP,IAAK,MAAME,OAAOV,IAAK;YACrB,IAAIF,UAAUa,OAAO,CAACD,OAAO,GAAG;YAChCF,GAAG,CAACE,IAAI,GAAGE,OAAOC,QAAQ,CAACb,GAAG,CAACU,IAAI,IAAIV,GAAG,CAACU,IAAI,CAACI,QAAQ,CAAC,UAAUd,GAAG,CAACU,IAAI;QAC7E;IACF;IACA,IAAIF,KAAK,MAAMA;IACf,OAAOR;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cross-spawn-cb",
3
- "version": "2.0.13",
3
+ "version": "2.1.2",
4
4
  "description": "Cross spawn with a completion callback",
5
5
  "keywords": [
6
6
  "cross-spawn",
@@ -30,8 +30,6 @@
30
30
  ],
31
31
  "scripts": {
32
32
  "build": "tsds build",
33
- "deploy": "tsds deploy",
34
- "docs": "tsds docs",
35
33
  "format": "biome check --write --unsafe src/ test/",
36
34
  "test": "tsds test:node --no-timeouts",
37
35
  "test:engines": "nvu engines npm test",
@@ -39,10 +37,10 @@
39
37
  },
40
38
  "dependencies": {
41
39
  "buffer-v6-polyfill": "^1.0.5",
42
- "call-once-fn": "^1.0.5",
40
+ "call-once-fn": "^1.0.6",
43
41
  "core-js": "^3.39.0",
44
42
  "cross-spawn": "^7.0.6",
45
- "function-exec-sync": "^1.1.12",
43
+ "function-exec-sync": "^1.2.3",
46
44
  "next-tick": "^1.1.0"
47
45
  },
48
46
  "devDependencies": {
@@ -50,10 +48,10 @@
50
48
  "@types/mocha": "^10.0.10",
51
49
  "@types/node": "^22.10.2",
52
50
  "cr": "^0.1.0",
53
- "is-version": "^0.2.1",
54
- "node-install-release": "^1.8.1",
55
- "node-resolve-versions": "^1.0.5",
56
- "node-version-utils": "^1.2.1",
51
+ "is-version": "^0.2.5",
52
+ "node-install-release": "^1.9.0",
53
+ "node-resolve-versions": "^1.0.10",
54
+ "node-version-utils": "^1.2.4",
57
55
  "pinkie-promise": "^2.0.1"
58
56
  },
59
57
  "engines": {