@swagger-api/apidom-error 0.76.0 → 0.76.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/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
+ ## [0.76.2](https://github.com/swagger-api/apidom/compare/v0.76.1...v0.76.2) (2023-09-08)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **build:** apply polyfills with transform runtime babel plugin ([#3132](https://github.com/swagger-api/apidom/issues/3132)) ([4b4754d](https://github.com/swagger-api/apidom/commit/4b4754da33a4a25d47f926c8a14b59cfdfa6b50c))
11
+
12
+ ## [0.76.1](https://github.com/swagger-api/apidom/compare/v0.76.0...v0.76.1) (2023-09-07)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **error:** polyfill AggregateError in older environments ([#3129](https://github.com/swagger-api/apidom/issues/3129)) ([484d9e6](https://github.com/swagger-api/apidom/commit/484d9e6c34534aa37c696a5154af72cfcc9de09c)), closes [#3128](https://github.com/swagger-api/apidom/issues/3128)
17
+
6
18
  # [0.76.0](https://github.com/swagger-api/apidom/compare/v0.75.0...v0.76.0) (2023-09-01)
7
19
 
8
20
  ### Features
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
3
4
  exports.__esModule = true;
4
5
  exports.default = void 0;
6
+ var _aggregateError = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/aggregate-error"));
5
7
  var _ramdaAdjunct = require("ramda-adjunct");
6
8
  var _ramda = require("ramda");
7
- class ApiDOMAggregateError extends AggregateError {
8
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
+ class ApiDOMAggregateError extends _aggregateError.default {
9
10
  constructor(errors, message, options) {
10
11
  super(errors, message, options);
11
12
  this.name = this.constructor.name;
@@ -28,7 +29,7 @@ class ApiDOMAggregateError extends AggregateError {
28
29
  } = options;
29
30
  this.cause = cause;
30
31
  if (cause instanceof Error && (0, _ramda.hasIn)('stack', cause)) {
31
- this.stack = `${this.stack}\nCAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
32
+ this.stack = `${this.stack}\nCAUSE: ${cause == null ? void 0 : cause.stack}`;
32
33
  }
33
34
  }
34
35
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _ramda = require("ramda");
@@ -33,7 +33,7 @@ class ApiDOMError extends Error {
33
33
  } = options;
34
34
  this.cause = cause;
35
35
  if (cause instanceof Error && (0, _ramda.hasIn)('stack', cause)) {
36
- this.stack = `${this.stack}\nCAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
36
+ this.stack = `${this.stack}\nCAUSE: ${cause == null ? void 0 : cause.stack}`;
37
37
  }
38
38
  }
39
39
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _ramda = require("ramda");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _UnsupportedOperationError = _interopRequireDefault(require("./UnsupportedOperationError.cjs"));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
package/cjs/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
4
  exports.__esModule = true;
5
5
  exports.UnsupportedOperationError = exports.NotImplementedError = exports.ApiDOMStructuredError = exports.ApiDOMError = exports.ApiDOMAggregateError = void 0;
6
6
  var _ApiDOMError = _interopRequireDefault(require("./ApiDOMError.cjs"));
@@ -24,7 +24,6 @@ __webpack_require__.r(__webpack_exports__);
24
24
 
25
25
 
26
26
  class ApiDOMAggregateError extends AggregateError {
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
27
  constructor(errors, message, options) {
29
28
  super(errors, message, options);
30
29
  this.name = this.constructor.name;
@@ -1,7 +1,7 @@
1
+ import _AggregateError from "@babel/runtime-corejs3/core-js/aggregate-error";
1
2
  import { isPlainObject } from 'ramda-adjunct';
2
3
  import { hasIn } from 'ramda';
3
- class ApiDOMAggregateError extends AggregateError {
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
+ class ApiDOMAggregateError extends _AggregateError {
5
5
  constructor(errors, message, options) {
6
6
  super(errors, message, options);
7
7
  this.name = this.constructor.name;
@@ -1,6 +1,6 @@
1
1
  import { hasIn } from 'ramda';
2
2
  import { isPlainObject } from 'ramda-adjunct';
3
- import ApiDOMAggregateError from "./ApiDOMAggregateError.js";
3
+ import ApiDOMAggregateError from "./ApiDOMAggregateError.mjs";
4
4
  class ApiDOMError extends Error {
5
5
  static [Symbol.hasInstance](instance) {
6
6
  // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
@@ -1,5 +1,5 @@
1
1
  import { omit } from 'ramda';
2
- import ApiDOMError from "./ApiDOMError.js";
2
+ import ApiDOMError from "./ApiDOMError.mjs";
3
3
  class ApiDOMStructuredError extends ApiDOMError {
4
4
  constructor(message, structuredOptions) {
5
5
  super(message, structuredOptions);
@@ -1,3 +1,3 @@
1
- import UnsupportedOperationError from "./UnsupportedOperationError.js";
1
+ import UnsupportedOperationError from "./UnsupportedOperationError.mjs";
2
2
  class NotImplementedError extends UnsupportedOperationError {}
3
3
  export default NotImplementedError;
@@ -0,0 +1,3 @@
1
+ import ApiDOMError from "./ApiDOMError.mjs";
2
+ class UnsupportedOperationError extends ApiDOMError {}
3
+ export default UnsupportedOperationError;
@@ -1,7 +1,7 @@
1
1
  // base error classes
2
- export { default as ApiDOMError } from "./ApiDOMError.js";
3
- export { default as ApiDOMAggregateError } from "./ApiDOMAggregateError.js";
4
- export { default as ApiDOMStructuredError } from "./ApiDOMStructuredError.js";
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
5
  // generic custom error classes
6
- export { default as UnsupportedOperationError } from "./UnsupportedOperationError.js";
7
- export { default as NotImplementedError } from "./NotImplementedError.js";
6
+ export { default as UnsupportedOperationError } from "./UnsupportedOperationError.mjs";
7
+ export { default as NotImplementedError } from "./NotImplementedError.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swagger-api/apidom-error",
3
- "version": "0.76.0",
3
+ "version": "0.76.2",
4
4
  "description": "Backward compatible custom ApiDOM errors with causes.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -12,15 +12,15 @@
12
12
  "main": "./cjs/index.cjs",
13
13
  "exports": {
14
14
  "types": "./types/dist.d.ts",
15
- "import": "./es/index.js",
15
+ "import": "./es/index.mjs",
16
16
  "require": "./cjs/index.cjs"
17
17
  },
18
18
  "types": "./types/dist.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' --root-mode 'upward'",
21
+ "build:es": "cross-env BABEL_ENV=es babel src --out-dir es --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'",
22
22
  "build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir cjs --extensions '.ts' --out-file-extension '.cjs' --root-mode 'upward'",
23
- "build:umd:browser": "cross-env BABEL_ENV=browser BROWSERSLIST_ENV=production webpack --config config/webpack/browser.config.js --progress",
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
26
  "clean": "rimraf ./es ./cjs ./dist ./types",
@@ -52,5 +52,5 @@
52
52
  "README.md",
53
53
  "CHANGELOG.md"
54
54
  ],
55
- "gitHead": "ce497d1083df34162b9cf2047d6cbd8843af3314"
55
+ "gitHead": "8c6c02f813a663cfaf0ac0963f2b4fd25b8dffe8"
56
56
  }
package/types/dist.d.ts CHANGED
@@ -9,7 +9,7 @@ declare class ApiDOMError extends Error {
9
9
  }
10
10
 
11
11
  declare class ApiDOMAggregateError extends AggregateError {
12
- constructor(errors: Iterable<any>, message?: string, options?: ApiDOMErrorOptions);
12
+ constructor(errors: Iterable<unknown>, message?: string, options?: ApiDOMErrorOptions);
13
13
  }
14
14
 
15
15
  declare class ApiDOMStructuredError extends ApiDOMError {
@@ -1,3 +0,0 @@
1
- import ApiDOMError from "./ApiDOMError.js";
2
- class UnsupportedOperationError extends ApiDOMError {}
3
- export default UnsupportedOperationError;