@speclynx/apidom-parser-adapter-arazzo-yaml-1 4.10.0 → 4.10.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 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.1](https://github.com/speclynx/apidom/compare/v4.10.0...v4.10.1) (2026-05-20)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-parser-adapter-arazzo-yaml-1
9
+
6
10
  # [4.10.0](https://github.com/speclynx/apidom/compare/v4.9.1...v4.10.0) (2026-05-12)
7
11
 
8
12
  **Note:** Version bump only for package @speclynx/apidom-parser-adapter-arazzo-yaml-1
@@ -21850,8 +21850,10 @@ class Composer {
21850
21850
  }
21851
21851
  }
21852
21852
  if (afterDoc) {
21853
- Array.prototype.push.apply(doc.errors, this.errors);
21854
- Array.prototype.push.apply(doc.warnings, this.warnings);
21853
+ for (let i = 0; i < this.errors.length; ++i)
21854
+ doc.errors.push(this.errors[i]);
21855
+ for (let i = 0; i < this.warnings.length; ++i)
21856
+ doc.warnings.push(this.warnings[i]);
21855
21857
  }
21856
21858
  else {
21857
21859
  doc.errors = this.errors;
@@ -25959,7 +25961,7 @@ class Lexer {
25959
25961
  const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
25960
25962
  this.indentNext = this.indentValue + 1;
25961
25963
  this.indentValue += n;
25962
- return yield* this.parseBlockStart();
25964
+ return 'block-start';
25963
25965
  }
25964
25966
  return 'doc';
25965
25967
  }
@@ -26280,32 +26282,36 @@ class Lexer {
26280
26282
  return 0;
26281
26283
  }
26282
26284
  *pushIndicators() {
26283
- switch (this.charAt(0)) {
26284
- case '!':
26285
- return ((yield* this.pushTag()) +
26286
- (yield* this.pushSpaces(true)) +
26287
- (yield* this.pushIndicators()));
26288
- case '&':
26289
- return ((yield* this.pushUntil(isNotAnchorChar)) +
26290
- (yield* this.pushSpaces(true)) +
26291
- (yield* this.pushIndicators()));
26292
- case '-': // this is an error
26293
- case '?': // this is an error outside flow collections
26294
- case ':': {
26295
- const inFlow = this.flowLevel > 0;
26296
- const ch1 = this.charAt(1);
26297
- if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
26298
- if (!inFlow)
26299
- this.indentNext = this.indentValue + 1;
26300
- else if (this.flowKey)
26301
- this.flowKey = false;
26302
- return ((yield* this.pushCount(1)) +
26303
- (yield* this.pushSpaces(true)) +
26304
- (yield* this.pushIndicators()));
26285
+ let n = 0;
26286
+ loop: while (true) {
26287
+ switch (this.charAt(0)) {
26288
+ case '!':
26289
+ n += yield* this.pushTag();
26290
+ n += yield* this.pushSpaces(true);
26291
+ continue loop;
26292
+ case '&':
26293
+ n += yield* this.pushUntil(isNotAnchorChar);
26294
+ n += yield* this.pushSpaces(true);
26295
+ continue loop;
26296
+ case '-': // this is an error
26297
+ case '?': // this is an error outside flow collections
26298
+ case ':': {
26299
+ const inFlow = this.flowLevel > 0;
26300
+ const ch1 = this.charAt(1);
26301
+ if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
26302
+ if (!inFlow)
26303
+ this.indentNext = this.indentValue + 1;
26304
+ else if (this.flowKey)
26305
+ this.flowKey = false;
26306
+ n += yield* this.pushCount(1);
26307
+ n += yield* this.pushSpaces(true);
26308
+ continue loop;
26309
+ }
26305
26310
  }
26306
26311
  }
26312
+ break loop;
26307
26313
  }
26308
- return 0;
26314
+ return n;
26309
26315
  }
26310
26316
  *pushTag() {
26311
26317
  if (this.charAt(1) === '<') {
@@ -26498,6 +26504,14 @@ function getFirstKeyStartProps(prev) {
26498
26504
  }
26499
26505
  return prev.splice(i, prev.length);
26500
26506
  }
26507
+ function arrayPushArray(target, source) {
26508
+ // May exhaust call stack with large `source` array
26509
+ if (source.length < 1e5)
26510
+ Array.prototype.push.apply(target, source);
26511
+ else
26512
+ for (let i = 0; i < source.length; ++i)
26513
+ target.push(source[i]);
26514
+ }
26501
26515
  function fixFlowSeqItems(fc) {
26502
26516
  if (fc.start.type === 'flow-seq-start') {
26503
26517
  for (const it of fc.items) {
@@ -26510,12 +26524,12 @@ function fixFlowSeqItems(fc) {
26510
26524
  delete it.key;
26511
26525
  if (isFlowToken(it.value)) {
26512
26526
  if (it.value.end)
26513
- Array.prototype.push.apply(it.value.end, it.sep);
26527
+ arrayPushArray(it.value.end, it.sep);
26514
26528
  else
26515
26529
  it.value.end = it.sep;
26516
26530
  }
26517
26531
  else
26518
- Array.prototype.push.apply(it.start, it.sep);
26532
+ arrayPushArray(it.start, it.sep);
26519
26533
  delete it.sep;
26520
26534
  }
26521
26535
  }
@@ -26933,7 +26947,7 @@ class Parser {
26933
26947
  const prev = map.items[map.items.length - 2];
26934
26948
  const end = prev?.value?.end;
26935
26949
  if (Array.isArray(end)) {
26936
- Array.prototype.push.apply(end, it.start);
26950
+ arrayPushArray(end, it.start);
26937
26951
  end.push(this.sourceToken);
26938
26952
  map.items.pop();
26939
26953
  return;
@@ -27148,7 +27162,7 @@ class Parser {
27148
27162
  const prev = seq.items[seq.items.length - 2];
27149
27163
  const end = prev?.value?.end;
27150
27164
  if (Array.isArray(end)) {
27151
- Array.prototype.push.apply(end, it.start);
27165
+ arrayPushArray(end, it.start);
27152
27166
  end.push(this.sourceToken);
27153
27167
  seq.items.pop();
27154
27168
  return;