@swagger-api/apidom-error 1.0.0-alpha.8 → 1.0.0-beta.0

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,18 @@
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
+ # [1.0.0-beta.0](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.10...v1.0.0-beta.0) (2024-11-21)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-error
9
+
10
+ # [1.0.0-alpha.10](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2024-10-21)
11
+
12
+ **Note:** Version bump only for package @swagger-api/apidom-error
13
+
14
+ # [1.0.0-alpha.9](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2024-08-14)
15
+
16
+ **Note:** Version bump only for package @swagger-api/apidom-error
17
+
6
18
  # [1.0.0-alpha.8](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2024-08-08)
7
19
 
8
20
  **Note:** Version bump only for package @swagger-api/apidom-error
@@ -19,6 +19,9 @@ __webpack_require__.r(__webpack_exports__);
19
19
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20
20
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
21
21
  /* harmony export */ });
22
+ /**
23
+ * @public
24
+ */
22
25
  class ApiDOMAggregateError extends AggregateError {
23
26
  constructor(errors, message, options) {
24
27
  super(errors, message, options);
@@ -58,12 +61,15 @@ __webpack_require__.r(__webpack_exports__);
58
61
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59
62
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
60
63
  /* harmony export */ });
61
- /* harmony import */ var _ApiDOMAggregateError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
64
+ /* harmony import */ var _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
62
65
 
66
+ /**
67
+ * @public
68
+ */
63
69
  class ApiDOMError extends Error {
64
70
  static [Symbol.hasInstance](instance) {
65
71
  // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
66
- return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(_ApiDOMAggregateError__WEBPACK_IMPORTED_MODULE_0__["default"], instance);
72
+ return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(_ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__["default"], instance);
67
73
  }
68
74
  constructor(message, options) {
69
75
  super(message, options);
@@ -103,9 +109,12 @@ __webpack_require__.r(__webpack_exports__);
103
109
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
104
110
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
105
111
  /* harmony export */ });
106
- /* harmony import */ var _ApiDOMError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
112
+ /* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
107
113
 
108
- class ApiDOMStructuredError extends _ApiDOMError__WEBPACK_IMPORTED_MODULE_0__["default"] {
114
+ /**
115
+ * @public
116
+ */
117
+ class ApiDOMStructuredError extends _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {
109
118
  constructor(message, structuredOptions) {
110
119
  super(message, structuredOptions);
111
120
  if (structuredOptions != null && typeof structuredOptions === 'object') {
@@ -128,9 +137,13 @@ __webpack_require__.r(__webpack_exports__);
128
137
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
129
138
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
130
139
  /* harmony export */ });
131
- /* harmony import */ var _UnsupportedOperationError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);
140
+ /* harmony import */ var _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);
132
141
 
133
- class NotImplementedError extends _UnsupportedOperationError__WEBPACK_IMPORTED_MODULE_0__["default"] {}
142
+
143
+ /**
144
+ * @public
145
+ */
146
+ class NotImplementedError extends _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
134
147
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotImplementedError);
135
148
 
136
149
  /***/ }),
@@ -142,9 +155,13 @@ __webpack_require__.r(__webpack_exports__);
142
155
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
143
156
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
144
157
  /* harmony export */ });
145
- /* harmony import */ var _ApiDOMError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
158
+ /* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
159
+
146
160
 
147
- class UnsupportedOperationError extends _ApiDOMError__WEBPACK_IMPORTED_MODULE_0__["default"] {}
161
+ /**
162
+ * @public
163
+ */
164
+ class UnsupportedOperationError extends _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
148
165
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UnsupportedOperationError);
149
166
 
150
167
  /***/ })
@@ -208,17 +225,17 @@ class UnsupportedOperationError extends _ApiDOMError__WEBPACK_IMPORTED_MODULE_0_
208
225
  var __webpack_exports__ = {};
209
226
  __webpack_require__.r(__webpack_exports__);
210
227
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
211
- /* harmony export */ ApiDOMAggregateError: () => (/* reexport safe */ _ApiDOMAggregateError__WEBPACK_IMPORTED_MODULE_1__["default"]),
212
- /* harmony export */ ApiDOMError: () => (/* reexport safe */ _ApiDOMError__WEBPACK_IMPORTED_MODULE_0__["default"]),
213
- /* harmony export */ ApiDOMStructuredError: () => (/* reexport safe */ _ApiDOMStructuredError__WEBPACK_IMPORTED_MODULE_2__["default"]),
214
- /* harmony export */ NotImplementedError: () => (/* reexport safe */ _NotImplementedError__WEBPACK_IMPORTED_MODULE_4__["default"]),
215
- /* harmony export */ UnsupportedOperationError: () => (/* reexport safe */ _UnsupportedOperationError__WEBPACK_IMPORTED_MODULE_3__["default"])
228
+ /* harmony export */ ApiDOMAggregateError: () => (/* reexport safe */ _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_1__["default"]),
229
+ /* harmony export */ ApiDOMError: () => (/* reexport safe */ _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"]),
230
+ /* harmony export */ ApiDOMStructuredError: () => (/* reexport safe */ _ApiDOMStructuredError_ts__WEBPACK_IMPORTED_MODULE_2__["default"]),
231
+ /* harmony export */ NotImplementedError: () => (/* reexport safe */ _NotImplementedError_ts__WEBPACK_IMPORTED_MODULE_4__["default"]),
232
+ /* harmony export */ UnsupportedOperationError: () => (/* reexport safe */ _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_3__["default"])
216
233
  /* harmony export */ });
217
- /* harmony import */ var _ApiDOMError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
218
- /* harmony import */ var _ApiDOMAggregateError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
219
- /* harmony import */ var _ApiDOMStructuredError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(672);
220
- /* harmony import */ var _UnsupportedOperationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(537);
221
- /* harmony import */ var _NotImplementedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(428);
234
+ /* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
235
+ /* harmony import */ var _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
236
+ /* harmony import */ var _ApiDOMStructuredError_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(672);
237
+ /* harmony import */ var _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(537);
238
+ /* harmony import */ var _NotImplementedError_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(428);
222
239
  // base error classes
223
240
 
224
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swagger-api/apidom-error",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0-beta.0",
4
4
  "description": "Backward compatible custom ApiDOM errors with causes.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -9,24 +9,24 @@
9
9
  "type": "module",
10
10
  "sideEffects": false,
11
11
  "unpkg": "./dist/apidom-error.browser.min.js",
12
- "main": "./cjs/index.cjs",
12
+ "main": "./src/index.cjs",
13
13
  "exports": {
14
- "types": "./types/dist.d.ts",
15
- "import": "./es/index.mjs",
16
- "require": "./cjs/index.cjs"
14
+ "types": "./types/apidom-error.d.ts",
15
+ "import": "./src/index.mjs",
16
+ "require": "./src/index.cjs"
17
17
  },
18
- "types": "./types/dist.d.ts",
18
+ "types": "./types/apidom-error.d.ts",
19
19
  "scripts": {
20
20
  "build": "npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:es build:cjs build:umd:browser",
21
- "build:es": "cross-env BABEL_ENV=es babel src --out-dir es --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'",
22
- "build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir cjs --extensions '.ts' --out-file-extension '.cjs' --root-mode 'upward'",
21
+ "build:es": "cross-env BABEL_ENV=es babel src --out-dir src --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'",
22
+ "build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir src --extensions '.ts' --out-file-extension '.cjs' --root-mode 'upward'",
23
23
  "build:umd:browser": "cross-env BABEL_ENV=browser webpack --config config/webpack/browser.config.js --progress",
24
24
  "lint": "eslint ./",
25
25
  "lint:fix": "eslint ./ --fix",
26
- "clean": "rimraf ./es ./cjs ./dist ./types",
26
+ "clean": "rimraf --glob 'src/**/*.mjs' 'src/**/*.cjs' 'test/**/*.mjs' ./dist ./types",
27
27
  "typescript:check-types": "tsc --noEmit",
28
- "typescript:declaration": "copyfiles -u 1 'src/**/*.d.ts' ./types && tsc -p declaration.tsconfig.json && rollup -c config/rollup/types.dist.js",
29
- "test": "cross-env NODE_ENV=test BABEL_ENV=cjs mocha",
28
+ "typescript:declaration": "copyfiles -u 1 'src/**/*.d.ts' ./types && tsc -p tsconfig.declaration.json && api-extractor run -l -c ./config/api-extractor/api-extractor.json",
29
+ "test": "npm run build:es && cross-env BABEL_ENV=es babel test --out-dir test --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward' && cross-env NODE_ENV=test mocha",
30
30
  "prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .",
31
31
  "postpack": "rimraf NOTICE LICENSES"
32
32
  },
@@ -40,14 +40,14 @@
40
40
  "@babel/runtime-corejs3": "^7.20.7"
41
41
  },
42
42
  "files": [
43
- "cjs/",
43
+ "src/**/*.mjs",
44
+ "src/**/*.cjs",
44
45
  "dist/",
45
- "es/",
46
- "types/dist.d.ts",
46
+ "types/apidom-error.d.ts",
47
47
  "LICENSES",
48
48
  "NOTICE",
49
49
  "README.md",
50
50
  "CHANGELOG.md"
51
51
  ],
52
- "gitHead": "525fb8dced08aeecac9e9ae57c0187f023c845da"
52
+ "gitHead": "ed1426743ba9d9d581146e617ec1762df670320c"
53
53
  }
@@ -4,6 +4,9 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _aggregateError = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/aggregate-error"));
7
+ /**
8
+ * @public
9
+ */
7
10
  class ApiDOMAggregateError extends _aggregateError.default {
8
11
  constructor(errors, message, options) {
9
12
  super(errors, message, options);
@@ -1,4 +1,7 @@
1
1
  import _AggregateError from "@babel/runtime-corejs3/core-js/aggregate-error";
2
+ /**
3
+ * @public
4
+ */
2
5
  class ApiDOMAggregateError extends _AggregateError {
3
6
  constructor(errors, message, options) {
4
7
  super(errors, message, options);
@@ -4,6 +4,9 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _ApiDOMAggregateError = _interopRequireDefault(require("./ApiDOMAggregateError.cjs"));
7
+ /**
8
+ * @public
9
+ */
7
10
  class ApiDOMError extends Error {
8
11
  static [Symbol.hasInstance](instance) {
9
12
  // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
@@ -1,4 +1,7 @@
1
1
  import ApiDOMAggregateError from "./ApiDOMAggregateError.mjs";
2
+ /**
3
+ * @public
4
+ */
2
5
  class ApiDOMError extends Error {
3
6
  static [Symbol.hasInstance](instance) {
4
7
  // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
@@ -4,6 +4,9 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
7
+ /**
8
+ * @public
9
+ */
7
10
  class ApiDOMStructuredError extends _ApiDOMError.default {
8
11
  constructor(message, structuredOptions) {
9
12
  super(message, structuredOptions);
@@ -1,4 +1,7 @@
1
1
  import ApiDOMError from "./ApiDOMError.mjs";
2
+ /**
3
+ * @public
4
+ */
2
5
  class ApiDOMStructuredError extends ApiDOMError {
3
6
  constructor(message, structuredOptions) {
4
7
  super(message, structuredOptions);
@@ -4,5 +4,8 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _UnsupportedOperationError = _interopRequireDefault(require("./UnsupportedOperationError.cjs"));
7
+ /**
8
+ * @public
9
+ */
7
10
  class NotImplementedError extends _UnsupportedOperationError.default {}
8
11
  var _default = exports.default = NotImplementedError;
@@ -1,3 +1,6 @@
1
1
  import UnsupportedOperationError from "./UnsupportedOperationError.mjs";
2
+ /**
3
+ * @public
4
+ */
2
5
  class NotImplementedError extends UnsupportedOperationError {}
3
6
  export default NotImplementedError;
@@ -4,5 +4,8 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
7
+ /**
8
+ * @public
9
+ */
7
10
  class UnsupportedOperationError extends _ApiDOMError.default {}
8
11
  var _default = exports.default = UnsupportedOperationError;
@@ -1,3 +1,6 @@
1
1
  import ApiDOMError from "./ApiDOMError.mjs";
2
+ /**
3
+ * @public
4
+ */
2
5
  class UnsupportedOperationError extends ApiDOMError {}
3
6
  export default UnsupportedOperationError;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export declare class ApiDOMAggregateError extends AggregateError {
5
+ constructor(errors: Iterable<unknown>, message?: string, options?: ApiDOMErrorOptions);
6
+ }
7
+
8
+ /**
9
+ * @public
10
+ */
11
+ export declare class ApiDOMError extends Error {
12
+ static [Symbol.hasInstance](instance: unknown): boolean;
13
+ constructor(message?: string, options?: ApiDOMErrorOptions);
14
+ }
15
+
16
+ /**
17
+ * @public
18
+ */
19
+ export declare interface ApiDOMErrorOptions extends ErrorOptions {
20
+ readonly cause?: unknown;
21
+ readonly [key: string]: unknown;
22
+ }
23
+
24
+ /**
25
+ * @public
26
+ */
27
+ export declare class ApiDOMStructuredError extends ApiDOMError {
28
+ constructor(message?: string, structuredOptions?: ApiDOMErrorOptions);
29
+ }
30
+
31
+ /**
32
+ * @public
33
+ */
34
+ export declare class NotImplementedError extends UnsupportedOperationError {
35
+ }
36
+
37
+ /**
38
+ * @public
39
+ */
40
+ export declare class UnsupportedOperationError extends ApiDOMError {
41
+ }
42
+
43
+ export { }
package/types/dist.d.ts DELETED
@@ -1,25 +0,0 @@
1
- interface ApiDOMErrorOptions extends ErrorOptions {
2
- readonly cause?: unknown;
3
- readonly [key: string]: unknown;
4
- }
5
-
6
- declare class ApiDOMError extends Error {
7
- static [Symbol.hasInstance](instance: unknown): boolean;
8
- constructor(message?: string, options?: ApiDOMErrorOptions);
9
- }
10
-
11
- declare class ApiDOMAggregateError extends AggregateError {
12
- constructor(errors: Iterable<unknown>, message?: string, options?: ApiDOMErrorOptions);
13
- }
14
-
15
- declare class ApiDOMStructuredError extends ApiDOMError {
16
- constructor(message?: string, structuredOptions?: ApiDOMErrorOptions);
17
- }
18
-
19
- declare class UnsupportedOperationError extends ApiDOMError {
20
- }
21
-
22
- declare class NotImplementedError extends UnsupportedOperationError {
23
- }
24
-
25
- export { ApiDOMAggregateError, ApiDOMError, type ApiDOMErrorOptions, ApiDOMStructuredError, NotImplementedError, UnsupportedOperationError };
File without changes
File without changes