@speclynx/apidom-parser-adapter-json-schema-yaml-2020-12 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-json-schema-yaml-2020-12
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-json-schema-yaml-2020-12
@@ -21704,8 +21704,10 @@ class Composer {
21704
21704
  }
21705
21705
  }
21706
21706
  if (afterDoc) {
21707
- Array.prototype.push.apply(doc.errors, this.errors);
21708
- Array.prototype.push.apply(doc.warnings, this.warnings);
21707
+ for (let i = 0; i < this.errors.length; ++i)
21708
+ doc.errors.push(this.errors[i]);
21709
+ for (let i = 0; i < this.warnings.length; ++i)
21710
+ doc.warnings.push(this.warnings[i]);
21709
21711
  }
21710
21712
  else {
21711
21713
  doc.errors = this.errors;
@@ -25813,7 +25815,7 @@ class Lexer {
25813
25815
  const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
25814
25816
  this.indentNext = this.indentValue + 1;
25815
25817
  this.indentValue += n;
25816
- return yield* this.parseBlockStart();
25818
+ return 'block-start';
25817
25819
  }
25818
25820
  return 'doc';
25819
25821
  }
@@ -26134,32 +26136,36 @@ class Lexer {
26134
26136
  return 0;
26135
26137
  }
26136
26138
  *pushIndicators() {
26137
- switch (this.charAt(0)) {
26138
- case '!':
26139
- return ((yield* this.pushTag()) +
26140
- (yield* this.pushSpaces(true)) +
26141
- (yield* this.pushIndicators()));
26142
- case '&':
26143
- return ((yield* this.pushUntil(isNotAnchorChar)) +
26144
- (yield* this.pushSpaces(true)) +
26145
- (yield* this.pushIndicators()));
26146
- case '-': // this is an error
26147
- case '?': // this is an error outside flow collections
26148
- case ':': {
26149
- const inFlow = this.flowLevel > 0;
26150
- const ch1 = this.charAt(1);
26151
- if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
26152
- if (!inFlow)
26153
- this.indentNext = this.indentValue + 1;
26154
- else if (this.flowKey)
26155
- this.flowKey = false;
26156
- return ((yield* this.pushCount(1)) +
26157
- (yield* this.pushSpaces(true)) +
26158
- (yield* this.pushIndicators()));
26139
+ let n = 0;
26140
+ loop: while (true) {
26141
+ switch (this.charAt(0)) {
26142
+ case '!':
26143
+ n += yield* this.pushTag();
26144
+ n += yield* this.pushSpaces(true);
26145
+ continue loop;
26146
+ case '&':
26147
+ n += yield* this.pushUntil(isNotAnchorChar);
26148
+ n += yield* this.pushSpaces(true);
26149
+ continue loop;
26150
+ case '-': // this is an error
26151
+ case '?': // this is an error outside flow collections
26152
+ case ':': {
26153
+ const inFlow = this.flowLevel > 0;
26154
+ const ch1 = this.charAt(1);
26155
+ if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
26156
+ if (!inFlow)
26157
+ this.indentNext = this.indentValue + 1;
26158
+ else if (this.flowKey)
26159
+ this.flowKey = false;
26160
+ n += yield* this.pushCount(1);
26161
+ n += yield* this.pushSpaces(true);
26162
+ continue loop;
26163
+ }
26159
26164
  }
26160
26165
  }
26166
+ break loop;
26161
26167
  }
26162
- return 0;
26168
+ return n;
26163
26169
  }
26164
26170
  *pushTag() {
26165
26171
  if (this.charAt(1) === '<') {
@@ -26352,6 +26358,14 @@ function getFirstKeyStartProps(prev) {
26352
26358
  }
26353
26359
  return prev.splice(i, prev.length);
26354
26360
  }
26361
+ function arrayPushArray(target, source) {
26362
+ // May exhaust call stack with large `source` array
26363
+ if (source.length < 1e5)
26364
+ Array.prototype.push.apply(target, source);
26365
+ else
26366
+ for (let i = 0; i < source.length; ++i)
26367
+ target.push(source[i]);
26368
+ }
26355
26369
  function fixFlowSeqItems(fc) {
26356
26370
  if (fc.start.type === 'flow-seq-start') {
26357
26371
  for (const it of fc.items) {
@@ -26364,12 +26378,12 @@ function fixFlowSeqItems(fc) {
26364
26378
  delete it.key;
26365
26379
  if (isFlowToken(it.value)) {
26366
26380
  if (it.value.end)
26367
- Array.prototype.push.apply(it.value.end, it.sep);
26381
+ arrayPushArray(it.value.end, it.sep);
26368
26382
  else
26369
26383
  it.value.end = it.sep;
26370
26384
  }
26371
26385
  else
26372
- Array.prototype.push.apply(it.start, it.sep);
26386
+ arrayPushArray(it.start, it.sep);
26373
26387
  delete it.sep;
26374
26388
  }
26375
26389
  }
@@ -26787,7 +26801,7 @@ class Parser {
26787
26801
  const prev = map.items[map.items.length - 2];
26788
26802
  const end = prev?.value?.end;
26789
26803
  if (Array.isArray(end)) {
26790
- Array.prototype.push.apply(end, it.start);
26804
+ arrayPushArray(end, it.start);
26791
26805
  end.push(this.sourceToken);
26792
26806
  map.items.pop();
26793
26807
  return;
@@ -27002,7 +27016,7 @@ class Parser {
27002
27016
  const prev = seq.items[seq.items.length - 2];
27003
27017
  const end = prev?.value?.end;
27004
27018
  if (Array.isArray(end)) {
27005
- Array.prototype.push.apply(end, it.start);
27019
+ arrayPushArray(end, it.start);
27006
27020
  end.push(this.sourceToken);
27007
27021
  seq.items.pop();
27008
27022
  return;