@jchip/error 2.1.0 → 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/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2021 Joel Chen
189
+ Copyright 2022-2026 Joel Chen
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export declare function aggregateErrorStack(error: AggregateError): string;
32
32
  * AggregateError
33
33
  * - https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-aggregate-error-objects
34
34
  */
35
- export declare class AggregateError extends Error {
35
+ export declare class AggregateError extends globalThis.AggregateError {
36
36
  /** "AggregateError" */
37
37
  readonly name: string;
38
38
  /** errors collected */
package/dist/index.js CHANGED
@@ -71,12 +71,12 @@ export function aggregateErrorStack(error) {
71
71
  * AggregateError
72
72
  * - https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-aggregate-error-objects
73
73
  */
74
- export class AggregateError extends Error {
74
+ export class AggregateError extends globalThis.AggregateError {
75
75
  constructor(errors, msg) {
76
76
  if (!errors || !(errors[Symbol.iterator] instanceof Function)) {
77
77
  throw new TypeError(`input errors must be iterable but it's ${typeof errors}`);
78
78
  }
79
- super(msg);
79
+ super(errors, msg);
80
80
  // Using defineProperty to replicate behavior of Object.keys(new Error()) returns []
81
81
  Object.defineProperty(this, "name", { value: "AggregateError" });
82
82
  let aggStack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jchip/error",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "utilities and polyfill for node.js errors",
5
5
  "homepage": "https://github.com/jchip/fynjs/tree/main/packages/error",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  "./package.json": "./package.json"
15
15
  },
16
16
  "engines": {
17
- "node": ">=22.18.0"
17
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
18
18
  },
19
19
  "scripts": {
20
20
  "build": "rm -rf dist && tsc -p tsconfig.json",
@@ -39,6 +39,15 @@
39
39
  "author": "Joel Chen",
40
40
  "license": "Apache-2.0",
41
41
  "dependencies": {},
42
+ "devDependencies": {
43
+ "@types/node": "^26.4.1",
44
+ "@vitest/coverage-v8": "^5.0.0",
45
+ "prettier": "^3.5.3",
46
+ "publish-util": "^3.1.2",
47
+ "typescript": "^7.0.2",
48
+ "vite": "^8.2.2",
49
+ "vitest": "^5.0.0"
50
+ },
42
51
  "files": [
43
52
  "dist"
44
53
  ],