foxts 5.4.0 → 5.4.1

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.
@@ -1 +1 @@
1
- "use strict";const t="name",e="message",r="stack";function n(n){return"object"==typeof n&&!!n&&t in n&&"string"==typeof n[t]&&e in n&&"string"==typeof n[e]&&(!(r in n)||"string"==typeof n[r])}exports.extractErrorMessage=function(i,s=!0,o=!1){if(!n(i))return null;let c="";return s&&(c+=i[t],c+=": "),c+=i[e],o&&r in i&&"string"==typeof i[r]&&(c+="\n"+i[r]),c.trim()},exports.isErrorLikeObject=n;
1
+ "use strict";const t="name",r="message",e="stack";function n(n){return"object"==typeof n&&!!n&&t in n&&"string"==typeof n[t]&&r in n&&"string"==typeof n[r]&&(!(e in n)||"string"==typeof n[e])}exports.extractErrorMessage=function(i,s=!0,o=!1){if(!n(i))return null;let f="";if(s&&(f+=i[t],f+=": "),f+=i[r],o&&e in i&&"string"==typeof i[e]){const r=i[e];if(r.startsWith(i[t]))return r.trim();f+="\n"+r}return f.trim()},exports.isErrorLikeObject=n;
@@ -1 +1 @@
1
- const t="name",e="message",n="stack";function r(r){return"object"==typeof r&&!!r&&t in r&&"string"==typeof r[t]&&e in r&&"string"==typeof r[e]&&(!(n in r)||"string"==typeof r[n])}function i(o,s=!0,f=!1){if(!r(o))return null;let c="";return s&&(c+=o[t],c+=": "),c+=o[e],f&&n in o&&"string"==typeof o[n]&&(c+="\n"+o[n]),c.trim()}export{i as extractErrorMessage,r as isErrorLikeObject};
1
+ const t="name",r="message",n="stack";function e(e){return"object"==typeof e&&!!e&&t in e&&"string"==typeof e[t]&&r in e&&"string"==typeof e[r]&&(!(n in e)||"string"==typeof e[n])}function i(s,o=!0,f=!1){if(!e(s))return null;let c="";if(o&&(c+=s[t],c+=": "),c+=s[r],f&&n in s&&"string"==typeof s[n]){const r=s[n];if(r.startsWith(s[t]))return r.trim();c+="\n"+r}return c.trim()}export{i as extractErrorMessage,e as isErrorLikeObject};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxts",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "Opinionated collection of common TypeScript utils by @SukkaW",
5
5
  "repository": {
6
6
  "url": "https://github.com/SukkaW/foxts"
@@ -332,36 +332,36 @@
332
332
  "author": "SukkaW <https://skk.moe>",
333
333
  "license": "MIT",
334
334
  "devDependencies": {
335
- "@eslint-sukka/node": "^8.7.0",
336
- "@happy-dom/global-registrator": "^20.7.0",
335
+ "@eslint-sukka/node": "^8.9.3",
336
+ "@happy-dom/global-registrator": "^20.9.0",
337
337
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
338
338
  "@mitata/counters": "^0.0.8",
339
- "@monyone/aho-corasick": "^1.1.6",
340
- "@package-json/types": "^0.0.12",
339
+ "@monyone/aho-corasick": "^1.1.10",
340
+ "@package-json/types": "^0.0.13",
341
341
  "@swc-node/register": "^1.11.1",
342
- "@swc/core": "^1.15.17",
342
+ "@swc/core": "^1.15.32",
343
343
  "@types/mocha": "^10.0.10",
344
- "@types/node": "^22.19.13",
345
- "@types/sinon": "^21.0.0",
344
+ "@types/node": "^22.19.17",
345
+ "@types/sinon": "^21.0.1",
346
346
  "bumpp": "^10.4.1",
347
347
  "earl": "^2.0.0",
348
- "eslint": "^9.39.3",
349
- "eslint-config-sukka": "^8.7.0",
350
- "eslint-formatter-sukka": "^8.7.0",
348
+ "eslint": "^10.2.1",
349
+ "eslint-config-sukka": "^8.9.3",
350
+ "eslint-formatter-sukka": "^8.9.3",
351
351
  "fastscan": "^1.0.6",
352
- "happy-dom": "^20.7.0",
352
+ "happy-dom": "^20.9.0",
353
353
  "is-ci": "^4.1.0",
354
354
  "is-network-error": "^1.3.1",
355
355
  "mitata": "^1.0.34",
356
356
  "mocha": "^11.7.5",
357
357
  "modern-ahocorasick": "^2.0.4",
358
- "nyc": "^17.1.0",
359
- "rollup": "^4.59.0",
360
- "rollup-plugin-dts": "^6.3.0",
358
+ "nyc": "^18.0.0",
359
+ "rollup": "^4.60.2",
360
+ "rollup-plugin-dts": "^6.4.1",
361
361
  "rollup-plugin-oxc-resolve": "^0.0.5",
362
362
  "rollup-plugin-swc3": "^0.12.1",
363
- "sinon": "^21.0.1",
364
- "typescript": "^5.9.3",
363
+ "sinon": "^21.1.2",
364
+ "typescript": "^6.0.3",
365
365
  "word-list": "3.0.0"
366
366
  },
367
367
  "scripts": {
@@ -372,6 +372,6 @@
372
372
  "bench:all": "SWC_NODE_IGNORE_DYNAMIC=1 node --require @swc-node/register ./src/**/*.bench.ts",
373
373
  "build": "rollup -c rollup.config.ts --bundleConfigAsCjs --configPlugin swc3",
374
374
  "prerelease": "pnpm run lint && pnpm run test && pnpm run build",
375
- "release": "bumpp -r --all --commit \"release: %s\" --tag \"%s\""
375
+ "release": "bumpp --install -r --all --commit \"release: %s\" --tag \"%s\""
376
376
  }
377
377
  }