@nxtedition/lib 19.4.3 → 19.4.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.
Files changed (3) hide show
  1. package/errors.js +2 -2
  2. package/http.js +1 -0
  3. package/package.json +1 -1
package/errors.js CHANGED
@@ -61,7 +61,7 @@ function _serializeError(error, { depth }) {
61
61
  if (Array.isArray(error)) {
62
62
  return error.length === 0
63
63
  ? null
64
- : error.map((x) => _serializeError(x, { depth })).filter(Boolean)
64
+ : error.flatMap((x) => _serializeError(x, { depth })).filter(Boolean)
65
65
  }
66
66
 
67
67
  if (Object.prototype.hasOwnProperty.call(error, kSeen)) {
@@ -115,7 +115,7 @@ function _serializeError(error, { depth }) {
115
115
  }
116
116
 
117
117
  errors = Array.isArray(errors)
118
- ? errors.map((x) => _serializeError(x, { depth: depth + 1 })).filter(Boolean)
118
+ ? errors.flatMap((x) => _serializeError(x, { depth: depth + 1 })).filter(Boolean)
119
119
  : undefined
120
120
  cause = cause ? _serializeError(cause, { depth: depth + 1 }) : undefined
121
121
 
package/http.js CHANGED
@@ -316,6 +316,7 @@ export function isConnectionError(err) {
316
316
  err.code === 'EHOSTDOWN' ||
317
317
  err.code === 'EHOSTUNREACH' ||
318
318
  err.code === 'EPIPE' ||
319
+ err.code === 'ETIMEDOUT' ||
319
320
  err.message === 'other side closed' ||
320
321
  statusCode === 420 ||
321
322
  statusCode === 429 ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "19.4.3",
3
+ "version": "19.4.5",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",