@swagger-api/apidom-error 0.76.0 → 0.76.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.
- package/CHANGELOG.md +6 -0
- package/cjs/ApiDOMAggregateError.cjs +9 -2
- package/cjs/ApiDOMError.cjs +1 -1
- package/dist/apidom-error.browser.js +3297 -104
- package/dist/apidom-error.browser.min.js +1 -1
- package/es/ApiDOMAggregateError.js +8 -1
- package/package.json +2 -2
- package/types/dist.d.ts +6 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
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.1](https://github.com/swagger-api/apidom/compare/v0.76.0...v0.76.1) (2023-09-07)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **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)
|
11
|
+
|
6
12
|
# [0.76.0](https://github.com/swagger-api/apidom/compare/v0.75.0...v0.76.0) (2023-09-01)
|
7
13
|
|
8
14
|
### Features
|
@@ -1,11 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
3
4
|
exports.__esModule = true;
|
4
5
|
exports.default = void 0;
|
5
6
|
var _ramdaAdjunct = require("ramda-adjunct");
|
6
7
|
var _ramda = require("ramda");
|
8
|
+
var _aggregateError = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/aggregate-error"));
|
9
|
+
var _globalThis$Aggregate; // @ts-ignore
|
10
|
+
const AggregateError = (_globalThis$Aggregate = globalThis.AggregateError) != null ? _globalThis$Aggregate : _aggregateError.default;
|
11
|
+
/**
|
12
|
+
* ApiDOMAggregateError is using polyfill of AggregateError from core-js-pure
|
13
|
+
* in environments which don't support global AggregateError symbol.
|
14
|
+
*/
|
7
15
|
class ApiDOMAggregateError extends AggregateError {
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9
16
|
constructor(errors, message, options) {
|
10
17
|
super(errors, message, options);
|
11
18
|
this.name = this.constructor.name;
|
@@ -28,7 +35,7 @@ class ApiDOMAggregateError extends AggregateError {
|
|
28
35
|
} = options;
|
29
36
|
this.cause = cause;
|
30
37
|
if (cause instanceof Error && (0, _ramda.hasIn)('stack', cause)) {
|
31
|
-
this.stack = `${this.stack}\nCAUSE: ${cause
|
38
|
+
this.stack = `${this.stack}\nCAUSE: ${cause == null ? void 0 : cause.stack}`;
|
32
39
|
}
|
33
40
|
}
|
34
41
|
}
|
package/cjs/ApiDOMError.cjs
CHANGED
@@ -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
|
36
|
+
this.stack = `${this.stack}\nCAUSE: ${cause == null ? void 0 : cause.stack}`;
|
37
37
|
}
|
38
38
|
}
|
39
39
|
}
|