@expo/spawn-async
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -26,2 +26,3 @@ "use strict"; | ||
didThrow = true; | ||
expect(e.message).toBe(`false exited with non-zero code: 1`); | ||
expect(typeof e.pid).toBe('number'); | ||
@@ -33,2 +34,5 @@ expect(e.status).toBe(1); | ||
}); | ||
it(`includes command arguments in the error message`, async () => { | ||
await expect(() => (0, spawnAsync_1.default)('false', ['dummy'])).rejects.toThrowError(`false dummy exited`); | ||
}); | ||
it(`returns when processes are killed with signals with non-zero exit codes`, async () => { | ||
@@ -35,0 +39,0 @@ let didThrow = false; |
@@ -39,5 +39,6 @@ "use strict"; | ||
if (code !== 0) { | ||
let argumentString = args && args.length > 0 ? ` ${args.join(' ')}` : ''; | ||
let error = signal | ||
? new Error(`${command} exited with signal: ${signal}`) | ||
: new Error(`${command} exited with non-zero code: ${code}`); | ||
? new Error(`${command}${argumentString} exited with signal: ${signal}`) | ||
: new Error(`${command}${argumentString} exited with non-zero code: ${code}`); | ||
if (error.stack && callerStack) { | ||
@@ -44,0 +45,0 @@ error.stack += `\n${callerStack}`; |
{ | ||
"name": "@expo/spawn-async", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "A Promise-based interface into processes created by child_process.spawn", | ||
@@ -39,3 +39,2 @@ "main": "./build/spawnAsync.js", | ||
"preset": "ts-jest", | ||
"testEnvironment": "node", | ||
"rootDir": "src" | ||
@@ -48,8 +47,8 @@ }, | ||
"@types/cross-spawn": "^6.0.2", | ||
"@types/jest": "^28.1.6", | ||
"@types/node": "^18.6.1", | ||
"jest": "^28.1.3", | ||
"ts-jest": "^28.0.7", | ||
"typescript": "^4.7.4" | ||
"@types/jest": "^29.5.0", | ||
"@types/node": "^18.15.3", | ||
"jest": "^29.5.0", | ||
"ts-jest": "^29.0.5", | ||
"typescript": "^5.0.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32018
241