@speclynx/apidom-parser-adapter-openapi-yaml-3-1 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-3-1
|
|
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-3-1
|
|
@@ -23106,7 +23106,7 @@ function doubleQuotedValue(source, onError) {
|
|
|
23106
23106
|
next = source[++i + 1];
|
|
23107
23107
|
}
|
|
23108
23108
|
else if (next === 'x' || next === 'u' || next === 'U') {
|
|
23109
|
-
const length =
|
|
23109
|
+
const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;
|
|
23110
23110
|
res += parseCharCode(source, i + 1, length, onError);
|
|
23111
23111
|
i += length;
|
|
23112
23112
|
}
|
|
@@ -23176,12 +23176,14 @@ function parseCharCode(source, offset, length, onError) {
|
|
|
23176
23176
|
const cc = source.substr(offset, length);
|
|
23177
23177
|
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
|
|
23178
23178
|
const code = ok ? parseInt(cc, 16) : NaN;
|
|
23179
|
-
|
|
23179
|
+
try {
|
|
23180
|
+
return String.fromCodePoint(code);
|
|
23181
|
+
}
|
|
23182
|
+
catch {
|
|
23180
23183
|
const raw = source.substr(offset - 2, length + 2);
|
|
23181
23184
|
onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
|
|
23182
23185
|
return raw;
|
|
23183
23186
|
}
|
|
23184
|
-
return String.fromCodePoint(code);
|
|
23185
23187
|
}
|
|
23186
23188
|
|
|
23187
23189
|
|
|
@@ -24494,6 +24496,8 @@ class Alias extends _Node_js__WEBPACK_IMPORTED_MODULE_3__.NodeBase {
|
|
|
24494
24496
|
* instance of the `source` anchor before this node.
|
|
24495
24497
|
*/
|
|
24496
24498
|
resolve(doc, ctx) {
|
|
24499
|
+
if (ctx?.maxAliasCount === 0)
|
|
24500
|
+
throw new ReferenceError('Alias resolution is disabled');
|
|
24497
24501
|
let nodes;
|
|
24498
24502
|
if (ctx?.aliasResolveCache) {
|
|
24499
24503
|
nodes = ctx.aliasResolveCache;
|
|
@@ -28673,18 +28677,18 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
|
|
|
28673
28677
|
merge.identify(key.value))) &&
|
|
28674
28678
|
ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
|
|
28675
28679
|
function addMergeToJSMap(ctx, map, value) {
|
|
28676
|
-
|
|
28677
|
-
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(
|
|
28678
|
-
for (const it of
|
|
28680
|
+
const source = resolveAliasValue(ctx, value);
|
|
28681
|
+
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(source))
|
|
28682
|
+
for (const it of source.items)
|
|
28679
28683
|
mergeValue(ctx, map, it);
|
|
28680
|
-
else if (Array.isArray(
|
|
28681
|
-
for (const it of
|
|
28684
|
+
else if (Array.isArray(source))
|
|
28685
|
+
for (const it of source)
|
|
28682
28686
|
mergeValue(ctx, map, it);
|
|
28683
28687
|
else
|
|
28684
|
-
mergeValue(ctx, map,
|
|
28688
|
+
mergeValue(ctx, map, source);
|
|
28685
28689
|
}
|
|
28686
28690
|
function mergeValue(ctx, map, value) {
|
|
28687
|
-
const source = ctx
|
|
28691
|
+
const source = resolveAliasValue(ctx, value);
|
|
28688
28692
|
if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(source))
|
|
28689
28693
|
throw new Error('Merge sources must be maps or map aliases');
|
|
28690
28694
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
@@ -28707,6 +28711,9 @@ function mergeValue(ctx, map, value) {
|
|
|
28707
28711
|
}
|
|
28708
28712
|
return map;
|
|
28709
28713
|
}
|
|
28714
|
+
function resolveAliasValue(ctx, value) {
|
|
28715
|
+
return ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
28716
|
+
}
|
|
28710
28717
|
|
|
28711
28718
|
|
|
28712
28719
|
|
|
@@ -29817,7 +29824,8 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
|
29817
29824
|
if (!format &&
|
|
29818
29825
|
minFractionDigits &&
|
|
29819
29826
|
(!tag || tag === 'tag:yaml.org,2002:float') &&
|
|
29820
|
-
|
|
29827
|
+
/^-?\d/.test(n) &&
|
|
29828
|
+
!n.includes('e')) {
|
|
29821
29829
|
let i = n.indexOf('.');
|
|
29822
29830
|
if (i < 0) {
|
|
29823
29831
|
i = n.length;
|