@swagger-api/apidom-core 0.90.0 → 0.92.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 +10 -0
- package/cjs/transformers/from.cjs +8 -2
- package/dist/apidom-core.browser.js +8 -2
- package/es/transformers/from.mjs +8 -2
- package/package.json +4 -4
- package/types/dist.d.ts +8 -2
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
|
+
# [0.92.0](https://github.com/swagger-api/apidom/compare/v0.91.0...v0.92.0) (2024-01-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-core
|
|
9
|
+
|
|
10
|
+
# [0.91.0](https://github.com/swagger-api/apidom/compare/v0.90.0...v0.91.0) (2024-01-08)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **core:** allow Parcel.js to bundle the code ([#3639](https://github.com/swagger-api/apidom/issues/3639)) ([aa094b7](https://github.com/swagger-api/apidom/commit/aa094b733796eaea3855b5fc388a97661fbe510a)), closes [/github.com/swagger-api/swagger-ui/issues/9466#issuecomment-1881053410](https://github.com//github.com/swagger-api/swagger-ui/issues/9466/issues/issuecomment-1881053410)
|
|
15
|
+
|
|
6
16
|
# [0.90.0](https://github.com/swagger-api/apidom/compare/v0.89.0...v0.90.0) (2024-01-04)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @swagger-api/apidom-core
|
|
@@ -8,8 +8,14 @@ var _ramdaAdjunct = require("ramda-adjunct");
|
|
|
8
8
|
var _namespace = _interopRequireDefault(require("../namespace.cjs"));
|
|
9
9
|
/**
|
|
10
10
|
* Transforms data to an Element from a particular namespace.
|
|
11
|
+
*
|
|
12
|
+
* The name of the function was originally `from`,
|
|
13
|
+
* but it was renamed to `fromFn` to avoid issues with Parcel.js:
|
|
14
|
+
*
|
|
15
|
+
* - https://github.com/parcel-bundler/parcel/issues/9473
|
|
16
|
+
* - https://github.com/swagger-api/swagger-ui/issues/9466#issuecomment-1881053410
|
|
11
17
|
*/
|
|
12
|
-
const
|
|
18
|
+
const fromFn = (data, namespace = _namespace.default) => {
|
|
13
19
|
if ((0, _ramdaAdjunct.isString)(data)) {
|
|
14
20
|
// JSON serialized refract
|
|
15
21
|
try {
|
|
@@ -24,4 +30,4 @@ const from = (data, namespace = _namespace.default) => {
|
|
|
24
30
|
}
|
|
25
31
|
return namespace.toElement(data);
|
|
26
32
|
};
|
|
27
|
-
var _default = exports.default =
|
|
33
|
+
var _default = exports.default = fromFn;
|
|
@@ -1176,8 +1176,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1176
1176
|
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Transforms data to an Element from a particular namespace.
|
|
1179
|
+
*
|
|
1180
|
+
* The name of the function was originally `from`,
|
|
1181
|
+
* but it was renamed to `fromFn` to avoid issues with Parcel.js:
|
|
1182
|
+
*
|
|
1183
|
+
* - https://github.com/parcel-bundler/parcel/issues/9473
|
|
1184
|
+
* - https://github.com/swagger-api/swagger-ui/issues/9466#issuecomment-1881053410
|
|
1179
1185
|
*/
|
|
1180
|
-
const
|
|
1186
|
+
const fromFn = (data, namespace = _namespace__WEBPACK_IMPORTED_MODULE_0__["default"]) => {
|
|
1181
1187
|
if ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_1__["default"])(data)) {
|
|
1182
1188
|
// JSON serialized refract
|
|
1183
1189
|
try {
|
|
@@ -1192,7 +1198,7 @@ const from = (data, namespace = _namespace__WEBPACK_IMPORTED_MODULE_0__["default
|
|
|
1192
1198
|
}
|
|
1193
1199
|
return namespace.toElement(data);
|
|
1194
1200
|
};
|
|
1195
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
1201
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fromFn);
|
|
1196
1202
|
|
|
1197
1203
|
/***/ }),
|
|
1198
1204
|
|
package/es/transformers/from.mjs
CHANGED
|
@@ -3,8 +3,14 @@ import { isPlainObject, isString } from 'ramda-adjunct';
|
|
|
3
3
|
import defaultNamespaceInstance from "../namespace.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Transforms data to an Element from a particular namespace.
|
|
6
|
+
*
|
|
7
|
+
* The name of the function was originally `from`,
|
|
8
|
+
* but it was renamed to `fromFn` to avoid issues with Parcel.js:
|
|
9
|
+
*
|
|
10
|
+
* - https://github.com/parcel-bundler/parcel/issues/9473
|
|
11
|
+
* - https://github.com/swagger-api/swagger-ui/issues/9466#issuecomment-1881053410
|
|
6
12
|
*/
|
|
7
|
-
const
|
|
13
|
+
const fromFn = (data, namespace = defaultNamespaceInstance) => {
|
|
8
14
|
if (isString(data)) {
|
|
9
15
|
// JSON serialized refract
|
|
10
16
|
try {
|
|
@@ -19,4 +25,4 @@ const from = (data, namespace = defaultNamespaceInstance) => {
|
|
|
19
25
|
}
|
|
20
26
|
return namespace.toElement(data);
|
|
21
27
|
};
|
|
22
|
-
export default
|
|
28
|
+
export default fromFn;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swagger-api/apidom-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.92.0",
|
|
4
4
|
"description": "Tools for manipulating ApiDOM structures.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime-corejs3": "^7.20.7",
|
|
45
|
-
"@swagger-api/apidom-ast": "^0.
|
|
46
|
-
"@swagger-api/apidom-error": "^0.
|
|
45
|
+
"@swagger-api/apidom-ast": "^0.92.0",
|
|
46
|
+
"@swagger-api/apidom-error": "^0.92.0",
|
|
47
47
|
"@types/ramda": "~0.29.6",
|
|
48
48
|
"minim": "~0.23.8",
|
|
49
49
|
"ramda": "~0.29.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"README.md",
|
|
63
63
|
"CHANGELOG.md"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c7a45ee8d68ac82ac2ab93ebb639a95ced1d6e86"
|
|
66
66
|
}
|
package/types/dist.d.ts
CHANGED
|
@@ -265,8 +265,14 @@ declare class ElementIdentityError extends ApiDOMStructuredError {
|
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* Transforms data to an Element from a particular namespace.
|
|
268
|
+
*
|
|
269
|
+
* The name of the function was originally `from`,
|
|
270
|
+
* but it was renamed to `fromFn` to avoid issues with Parcel.js:
|
|
271
|
+
*
|
|
272
|
+
* - https://github.com/parcel-bundler/parcel/issues/9473
|
|
273
|
+
* - https://github.com/swagger-api/swagger-ui/issues/9466#issuecomment-1881053410
|
|
268
274
|
*/
|
|
269
|
-
declare const
|
|
275
|
+
declare const fromFn: (data: any, namespace?: Namespace$1) => Element;
|
|
270
276
|
|
|
271
277
|
declare const serializer$2: <T extends unknown>(element: T) => any;
|
|
272
278
|
|
|
@@ -314,4 +320,4 @@ declare namespace deepmerge {
|
|
|
314
320
|
var all: (list: ObjectOrArrayElement[], options?: DeepMergeOptions | undefined) => any;
|
|
315
321
|
}
|
|
316
322
|
|
|
317
|
-
export { Annotation as AnnotationElement, CloneError, Comment as CommentElement, DeepCloneError, ElementIdentityError, type ElementPredicate, IdentityManager, MediaTypes, Namespace, ParseResult as ParseResultElement, type Position, type PositionRange, ShallowCloneError, SourceMap as SourceMapElement, Transcluder, cloneDeep, cloneNode, cloneShallow, createNamespace, createPredicate, deepmerge, defaultIdentityManager, dehydrate, dereference, dispatchPlugins as dispatchRefractorPlugins, filter, find, findAtOffset, from, getNodeType, hasElementSourceMap, includesClasses, includesSymbols, isAnnotationElement, isArrayElement, isBooleanElement, isElement, isLinkElement, isMemberElement, isNullElement, isNumberElement, isObjectElement, isParseResultElement, isPrimitiveElement, isRefElement, isSourceMapElement, isStringElement, keyMapDefault as keyMap, namespace, parents, plugin$1 as refractorPluginElementIdentity, plugin as refractorPluginSemanticElementIdentity, reject, sexprs, some, serializer$1 as toJSON, toString, serializer$2 as toValue, serializer as toYAML, transclude, traverse, visit };
|
|
323
|
+
export { Annotation as AnnotationElement, CloneError, Comment as CommentElement, DeepCloneError, ElementIdentityError, type ElementPredicate, IdentityManager, MediaTypes, Namespace, ParseResult as ParseResultElement, type Position, type PositionRange, ShallowCloneError, SourceMap as SourceMapElement, Transcluder, cloneDeep, cloneNode, cloneShallow, createNamespace, createPredicate, deepmerge, defaultIdentityManager, dehydrate, dereference, dispatchPlugins as dispatchRefractorPlugins, filter, find, findAtOffset, fromFn as from, getNodeType, hasElementSourceMap, includesClasses, includesSymbols, isAnnotationElement, isArrayElement, isBooleanElement, isElement, isLinkElement, isMemberElement, isNullElement, isNumberElement, isObjectElement, isParseResultElement, isPrimitiveElement, isRefElement, isSourceMapElement, isStringElement, keyMapDefault as keyMap, namespace, parents, plugin$1 as refractorPluginElementIdentity, plugin as refractorPluginSemanticElementIdentity, reject, sexprs, some, serializer$1 as toJSON, toString, serializer$2 as toValue, serializer as toYAML, transclude, traverse, visit };
|