@nxtedition/error
Advanced tools
+8
-2
@@ -136,5 +136,11 @@ import objectHash from 'object-hash' | ||
| code, | ||
| exitCode = Number(code), | ||
| // Only coerce a code/signal that is already a *number*. A numeric-looking | ||
| // *string* code — e.g. a pg SQLSTATE `'23505'` — is not a process exit | ||
| // code, but `Number('23505')` is a valid integer that used to be emitted | ||
| // as a bogus `exitCode`. A child-process exit code arrives as a number; a | ||
| // signal is usually a string name and only yields a `signalCode` when it | ||
| // is itself numeric. | ||
| exitCode = typeof code === 'number' ? code : undefined, | ||
| signal, | ||
| signalCode = Number(signal), | ||
| signalCode = typeof signal === 'number' ? signal : undefined, | ||
| body, | ||
@@ -141,0 +147,0 @@ status, |
+2
-2
| { | ||
| "name": "@nxtedition/error", | ||
| "version": "1.1.35", | ||
| "version": "1.1.36", | ||
| "type": "module", | ||
@@ -30,3 +30,3 @@ "main": "lib/index.js", | ||
| }, | ||
| "gitHead": "4e7a986a6846c13d6e302f23c5d0b63d87b54fdc" | ||
| "gitHead": "a11a8114c8e32202454577b2c2ed935a702927f1" | ||
| } |
10996
4.72%325
1.88%