@speclynx/apidom-parser-adapter-openapi-yaml-2 4.9.1 → 4.10.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,10 @@
|
|
|
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.10.0](https://github.com/speclynx/apidom/compare/v4.9.1...v4.10.0) (2026-05-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-yaml-2
|
|
9
|
+
|
|
6
10
|
## [4.9.1](https://github.com/speclynx/apidom/compare/v4.9.0...v4.9.1) (2026-04-21)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-yaml-2
|
|
@@ -22853,7 +22853,7 @@ function doubleQuotedValue(source, onError) {
|
|
|
22853
22853
|
next = source[++i + 1];
|
|
22854
22854
|
}
|
|
22855
22855
|
else if (next === 'x' || next === 'u' || next === 'U') {
|
|
22856
|
-
const length =
|
|
22856
|
+
const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;
|
|
22857
22857
|
res += parseCharCode(source, i + 1, length, onError);
|
|
22858
22858
|
i += length;
|
|
22859
22859
|
}
|
|
@@ -22923,12 +22923,14 @@ function parseCharCode(source, offset, length, onError) {
|
|
|
22923
22923
|
const cc = source.substr(offset, length);
|
|
22924
22924
|
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
|
|
22925
22925
|
const code = ok ? parseInt(cc, 16) : NaN;
|
|
22926
|
-
|
|
22926
|
+
try {
|
|
22927
|
+
return String.fromCodePoint(code);
|
|
22928
|
+
}
|
|
22929
|
+
catch {
|
|
22927
22930
|
const raw = source.substr(offset - 2, length + 2);
|
|
22928
22931
|
onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
|
|
22929
22932
|
return raw;
|
|
22930
22933
|
}
|
|
22931
|
-
return String.fromCodePoint(code);
|
|
22932
22934
|
}
|
|
22933
22935
|
|
|
22934
22936
|
|
|
@@ -24241,6 +24243,8 @@ class Alias extends _Node_js__WEBPACK_IMPORTED_MODULE_3__.NodeBase {
|
|
|
24241
24243
|
* instance of the `source` anchor before this node.
|
|
24242
24244
|
*/
|
|
24243
24245
|
resolve(doc, ctx) {
|
|
24246
|
+
if (ctx?.maxAliasCount === 0)
|
|
24247
|
+
throw new ReferenceError('Alias resolution is disabled');
|
|
24244
24248
|
let nodes;
|
|
24245
24249
|
if (ctx?.aliasResolveCache) {
|
|
24246
24250
|
nodes = ctx.aliasResolveCache;
|
|
@@ -28420,18 +28424,18 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
|
|
|
28420
28424
|
merge.identify(key.value))) &&
|
|
28421
28425
|
ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
|
|
28422
28426
|
function addMergeToJSMap(ctx, map, value) {
|
|
28423
|
-
|
|
28424
|
-
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(
|
|
28425
|
-
for (const it of
|
|
28427
|
+
const source = resolveAliasValue(ctx, value);
|
|
28428
|
+
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(source))
|
|
28429
|
+
for (const it of source.items)
|
|
28426
28430
|
mergeValue(ctx, map, it);
|
|
28427
|
-
else if (Array.isArray(
|
|
28428
|
-
for (const it of
|
|
28431
|
+
else if (Array.isArray(source))
|
|
28432
|
+
for (const it of source)
|
|
28429
28433
|
mergeValue(ctx, map, it);
|
|
28430
28434
|
else
|
|
28431
|
-
mergeValue(ctx, map,
|
|
28435
|
+
mergeValue(ctx, map, source);
|
|
28432
28436
|
}
|
|
28433
28437
|
function mergeValue(ctx, map, value) {
|
|
28434
|
-
const source = ctx
|
|
28438
|
+
const source = resolveAliasValue(ctx, value);
|
|
28435
28439
|
if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(source))
|
|
28436
28440
|
throw new Error('Merge sources must be maps or map aliases');
|
|
28437
28441
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
@@ -28454,6 +28458,9 @@ function mergeValue(ctx, map, value) {
|
|
|
28454
28458
|
}
|
|
28455
28459
|
return map;
|
|
28456
28460
|
}
|
|
28461
|
+
function resolveAliasValue(ctx, value) {
|
|
28462
|
+
return ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
28463
|
+
}
|
|
28457
28464
|
|
|
28458
28465
|
|
|
28459
28466
|
|
|
@@ -29564,7 +29571,8 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
|
29564
29571
|
if (!format &&
|
|
29565
29572
|
minFractionDigits &&
|
|
29566
29573
|
(!tag || tag === 'tag:yaml.org,2002:float') &&
|
|
29567
|
-
|
|
29574
|
+
/^-?\d/.test(n) &&
|
|
29575
|
+
!n.includes('e')) {
|
|
29568
29576
|
let i = n.indexOf('.');
|
|
29569
29577
|
if (i < 0) {
|
|
29570
29578
|
i = n.length;
|