@speclynx/apidom-error 4.0.1 → 4.0.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.3](https://github.com/speclynx/apidom/compare/v4.0.2...v4.0.3) (2026-03-11)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **release:** fix v4.0.2 failed release ([b4dc1c4](https://github.com/speclynx/apidom/commit/b4dc1c48e8d9b2986a70e49b5554eb0a166d7528))
11
+
12
+ ## [4.0.2](https://github.com/speclynx/apidom/compare/v4.0.1...v4.0.2) (2026-03-11)
13
+
14
+ **Note:** Version bump only for package @speclynx/apidom-error
15
+
6
16
  ## [4.0.1](https://github.com/speclynx/apidom/compare/v4.0.0...v4.0.1) (2026-03-11)
7
17
 
8
18
  **Note:** Version bump only for package @speclynx/apidom-error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speclynx/apidom-error",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Backward compatible custom ApiDOM errors with causes.",
5
5
  "keywords": [
6
6
  "apidom",
@@ -50,8 +50,7 @@
50
50
  "@babel/runtime-corejs3": "^7.28.4"
51
51
  },
52
52
  "files": [
53
- "src/**/*.mjs",
54
- "src/**/*.cjs",
53
+ "src/",
55
54
  "dist/",
56
55
  "types/apidom-error.d.ts",
57
56
  "LICENSES",
@@ -59,5 +58,5 @@
59
58
  "README.md",
60
59
  "CHANGELOG.md"
61
60
  ],
62
- "gitHead": "223132a9b00081ca04842efc2736a491f7876f44"
61
+ "gitHead": "6ccfa09c02232516215e7de3ead276641957e626"
63
62
  }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ /**
6
+ * @public
7
+ */
8
+ class ApiDOMAggregateError extends AggregateError {
9
+ constructor(errors, message, options) {
10
+ super(errors, message, options);
11
+ this.name = this.constructor.name;
12
+ if (typeof Error.captureStackTrace === 'function') {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ }
16
+ }
17
+ var _default = exports.default = ApiDOMAggregateError;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @public
3
+ */
4
+ class ApiDOMAggregateError extends AggregateError {
5
+ constructor(errors, message, options) {
6
+ super(errors, message, options);
7
+ this.name = this.constructor.name;
8
+ if (typeof Error.captureStackTrace === 'function') {
9
+ Error.captureStackTrace(this, this.constructor);
10
+ }
11
+ }
12
+ }
13
+ export default ApiDOMAggregateError;
@@ -0,0 +1,18 @@
1
+ import type ApiDOMErrorOptions from './ApiDOMErrorOptions.ts';
2
+
3
+ /**
4
+ * @public
5
+ */
6
+ class ApiDOMAggregateError extends AggregateError {
7
+ constructor(errors: Iterable<unknown>, message?: string, options?: ApiDOMErrorOptions) {
8
+ super(errors, message, options);
9
+
10
+ this.name = this.constructor.name;
11
+
12
+ if (typeof Error.captureStackTrace === 'function') {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ }
16
+ }
17
+
18
+ export default ApiDOMAggregateError;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
+ exports.__esModule = true;
5
+ exports.default = void 0;
6
+ var _ApiDOMAggregateError = _interopRequireDefault(require("./ApiDOMAggregateError.cjs"));
7
+ /**
8
+ * @public
9
+ */
10
+ class ApiDOMError extends Error {
11
+ static [Symbol.hasInstance](instance) {
12
+ // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
13
+ return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(_ApiDOMAggregateError.default, instance);
14
+ }
15
+ constructor(message, options) {
16
+ super(message, options);
17
+ this.name = this.constructor.name;
18
+ if (typeof Error.captureStackTrace === 'function') {
19
+ Error.captureStackTrace(this, this.constructor);
20
+ }
21
+ }
22
+ }
23
+ var _default = exports.default = ApiDOMError;
@@ -0,0 +1,18 @@
1
+ import ApiDOMAggregateError from "./ApiDOMAggregateError.mjs";
2
+ /**
3
+ * @public
4
+ */
5
+ class ApiDOMError extends Error {
6
+ static [Symbol.hasInstance](instance) {
7
+ // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
8
+ return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(ApiDOMAggregateError, instance);
9
+ }
10
+ constructor(message, options) {
11
+ super(message, options);
12
+ this.name = this.constructor.name;
13
+ if (typeof Error.captureStackTrace === 'function') {
14
+ Error.captureStackTrace(this, this.constructor);
15
+ }
16
+ }
17
+ }
18
+ export default ApiDOMError;
@@ -0,0 +1,27 @@
1
+ import ApiDOMAggregateError from './ApiDOMAggregateError.ts';
2
+ import type ApiDOMErrorOptions from './ApiDOMErrorOptions.ts';
3
+
4
+ /**
5
+ * @public
6
+ */
7
+ class ApiDOMError extends Error {
8
+ public static [Symbol.hasInstance](instance: unknown) {
9
+ // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
10
+ return (
11
+ super[Symbol.hasInstance](instance) ||
12
+ Function.prototype[Symbol.hasInstance].call(ApiDOMAggregateError, instance)
13
+ );
14
+ }
15
+
16
+ constructor(message?: string, options?: ApiDOMErrorOptions) {
17
+ super(message, options);
18
+
19
+ this.name = this.constructor.name;
20
+
21
+ if (typeof Error.captureStackTrace === 'function') {
22
+ Error.captureStackTrace(this, this.constructor);
23
+ }
24
+ }
25
+ }
26
+
27
+ export default ApiDOMError;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export default interface ApiDOMErrorOptions extends ErrorOptions {
5
+ readonly cause?: unknown;
6
+ readonly [key: string]: unknown;
7
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
+ exports.__esModule = true;
5
+ exports.default = void 0;
6
+ var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
7
+ /**
8
+ * @public
9
+ */
10
+ class ApiDOMStructuredError extends _ApiDOMError.default {
11
+ constructor(message, structuredOptions) {
12
+ super(message, structuredOptions);
13
+ if (structuredOptions != null && typeof structuredOptions === 'object') {
14
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
+ const {
16
+ cause,
17
+ ...causelessOptions
18
+ } = structuredOptions;
19
+ Object.assign(this, causelessOptions);
20
+ }
21
+ }
22
+ }
23
+ var _default = exports.default = ApiDOMStructuredError;
@@ -0,0 +1,18 @@
1
+ import ApiDOMError from "./ApiDOMError.mjs";
2
+ /**
3
+ * @public
4
+ */
5
+ class ApiDOMStructuredError extends ApiDOMError {
6
+ constructor(message, structuredOptions) {
7
+ super(message, structuredOptions);
8
+ if (structuredOptions != null && typeof structuredOptions === 'object') {
9
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
+ const {
11
+ cause,
12
+ ...causelessOptions
13
+ } = structuredOptions;
14
+ Object.assign(this, causelessOptions);
15
+ }
16
+ }
17
+ }
18
+ export default ApiDOMStructuredError;
@@ -0,0 +1,19 @@
1
+ import ApiDOMError from './ApiDOMError.ts';
2
+ import type ApiDOMErrorOptions from './ApiDOMErrorOptions.ts';
3
+
4
+ /**
5
+ * @public
6
+ */
7
+ class ApiDOMStructuredError extends ApiDOMError {
8
+ constructor(message?: string, structuredOptions?: ApiDOMErrorOptions) {
9
+ super(message, structuredOptions);
10
+
11
+ if (structuredOptions != null && typeof structuredOptions === 'object') {
12
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
+ const { cause, ...causelessOptions } = structuredOptions;
14
+ Object.assign(this, causelessOptions);
15
+ }
16
+ }
17
+ }
18
+
19
+ export default ApiDOMStructuredError;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
+ exports.__esModule = true;
5
+ exports.default = void 0;
6
+ var _UnsupportedOperationError = _interopRequireDefault(require("./UnsupportedOperationError.cjs"));
7
+ /**
8
+ * @public
9
+ */
10
+ class NotImplementedError extends _UnsupportedOperationError.default {}
11
+ var _default = exports.default = NotImplementedError;
@@ -0,0 +1,6 @@
1
+ import UnsupportedOperationError from "./UnsupportedOperationError.mjs";
2
+ /**
3
+ * @public
4
+ */
5
+ class NotImplementedError extends UnsupportedOperationError {}
6
+ export default NotImplementedError;
@@ -0,0 +1,8 @@
1
+ import UnsupportedOperationError from './UnsupportedOperationError.ts';
2
+
3
+ /**
4
+ * @public
5
+ */
6
+ class NotImplementedError extends UnsupportedOperationError {}
7
+
8
+ export default NotImplementedError;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
+ exports.__esModule = true;
5
+ exports.default = void 0;
6
+ var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
7
+ /**
8
+ * @public
9
+ */
10
+ class UnsupportedOperationError extends _ApiDOMError.default {}
11
+ var _default = exports.default = UnsupportedOperationError;
@@ -0,0 +1,6 @@
1
+ import ApiDOMError from "./ApiDOMError.mjs";
2
+ /**
3
+ * @public
4
+ */
5
+ class UnsupportedOperationError extends ApiDOMError {}
6
+ export default UnsupportedOperationError;
@@ -0,0 +1,8 @@
1
+ import ApiDOMError from './ApiDOMError.ts';
2
+
3
+ /**
4
+ * @public
5
+ */
6
+ class UnsupportedOperationError extends ApiDOMError {}
7
+
8
+ export default UnsupportedOperationError;
package/src/index.cjs ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
+ exports.__esModule = true;
5
+ exports.UnsupportedOperationError = exports.NotImplementedError = exports.ApiDOMStructuredError = exports.ApiDOMError = exports.ApiDOMAggregateError = void 0;
6
+ var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
7
+ exports.ApiDOMError = _ApiDOMError.default;
8
+ var _ApiDOMAggregateError = _interopRequireDefault(require("./ApiDOMAggregateError.cjs"));
9
+ exports.ApiDOMAggregateError = _ApiDOMAggregateError.default;
10
+ var _ApiDOMStructuredError = _interopRequireDefault(require("./ApiDOMStructuredError.cjs"));
11
+ exports.ApiDOMStructuredError = _ApiDOMStructuredError.default;
12
+ var _UnsupportedOperationError = _interopRequireDefault(require("./UnsupportedOperationError.cjs"));
13
+ exports.UnsupportedOperationError = _UnsupportedOperationError.default;
14
+ var _NotImplementedError = _interopRequireDefault(require("./NotImplementedError.cjs"));
15
+ exports.NotImplementedError = _NotImplementedError.default;
package/src/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ // base error classes
2
+ export { default as ApiDOMError } from "./ApiDOMError.mjs";
3
+ export { default as ApiDOMAggregateError } from "./ApiDOMAggregateError.mjs";
4
+ export { default as ApiDOMStructuredError } from "./ApiDOMStructuredError.mjs";
5
+ // generic custom error classes
6
+ export { default as UnsupportedOperationError } from "./UnsupportedOperationError.mjs";
7
+ export { default as NotImplementedError } from "./NotImplementedError.mjs";
package/src/index.ts ADDED
@@ -0,0 +1,8 @@
1
+ // base error classes
2
+ export { default as ApiDOMError } from './ApiDOMError.ts';
3
+ export { default as ApiDOMAggregateError } from './ApiDOMAggregateError.ts';
4
+ export { default as ApiDOMStructuredError } from './ApiDOMStructuredError.ts';
5
+ export type { default as ApiDOMErrorOptions } from './ApiDOMErrorOptions.ts';
6
+ // generic custom error classes
7
+ export { default as UnsupportedOperationError } from './UnsupportedOperationError.ts';
8
+ export { default as NotImplementedError } from './NotImplementedError.ts';