mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2026-08-11 02:46:21 -06:00
node_modules: update (#146)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
+28
-24
@@ -312,7 +312,7 @@ class Lexer {
|
||||
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
|
||||
this.indentNext = this.indentValue + 1;
|
||||
this.indentValue += n;
|
||||
return yield* this.parseBlockStart();
|
||||
return 'block-start';
|
||||
}
|
||||
return 'doc';
|
||||
}
|
||||
@@ -633,32 +633,36 @@ class Lexer {
|
||||
return 0;
|
||||
}
|
||||
*pushIndicators() {
|
||||
switch (this.charAt(0)) {
|
||||
case '!':
|
||||
return ((yield* this.pushTag()) +
|
||||
(yield* this.pushSpaces(true)) +
|
||||
(yield* this.pushIndicators()));
|
||||
case '&':
|
||||
return ((yield* this.pushUntil(isNotAnchorChar)) +
|
||||
(yield* this.pushSpaces(true)) +
|
||||
(yield* this.pushIndicators()));
|
||||
case '-': // this is an error
|
||||
case '?': // this is an error outside flow collections
|
||||
case ':': {
|
||||
const inFlow = this.flowLevel > 0;
|
||||
const ch1 = this.charAt(1);
|
||||
if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
|
||||
if (!inFlow)
|
||||
this.indentNext = this.indentValue + 1;
|
||||
else if (this.flowKey)
|
||||
this.flowKey = false;
|
||||
return ((yield* this.pushCount(1)) +
|
||||
(yield* this.pushSpaces(true)) +
|
||||
(yield* this.pushIndicators()));
|
||||
let n = 0;
|
||||
loop: while (true) {
|
||||
switch (this.charAt(0)) {
|
||||
case '!':
|
||||
n += yield* this.pushTag();
|
||||
n += yield* this.pushSpaces(true);
|
||||
continue loop;
|
||||
case '&':
|
||||
n += yield* this.pushUntil(isNotAnchorChar);
|
||||
n += yield* this.pushSpaces(true);
|
||||
continue loop;
|
||||
case '-': // this is an error
|
||||
case '?': // this is an error outside flow collections
|
||||
case ':': {
|
||||
const inFlow = this.flowLevel > 0;
|
||||
const ch1 = this.charAt(1);
|
||||
if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
|
||||
if (!inFlow)
|
||||
this.indentNext = this.indentValue + 1;
|
||||
else if (this.flowKey)
|
||||
this.flowKey = false;
|
||||
n += yield* this.pushCount(1);
|
||||
n += yield* this.pushSpaces(true);
|
||||
continue loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
break loop;
|
||||
}
|
||||
return 0;
|
||||
return n;
|
||||
}
|
||||
*pushTag() {
|
||||
if (this.charAt(1) === '<') {
|
||||
|
||||
+12
-4
@@ -70,6 +70,14 @@ function getFirstKeyStartProps(prev) {
|
||||
}
|
||||
return prev.splice(i, prev.length);
|
||||
}
|
||||
function arrayPushArray(target, source) {
|
||||
// May exhaust call stack with large `source` array
|
||||
if (source.length < 1e5)
|
||||
Array.prototype.push.apply(target, source);
|
||||
else
|
||||
for (let i = 0; i < source.length; ++i)
|
||||
target.push(source[i]);
|
||||
}
|
||||
function fixFlowSeqItems(fc) {
|
||||
if (fc.start.type === 'flow-seq-start') {
|
||||
for (const it of fc.items) {
|
||||
@@ -82,12 +90,12 @@ function fixFlowSeqItems(fc) {
|
||||
delete it.key;
|
||||
if (isFlowToken(it.value)) {
|
||||
if (it.value.end)
|
||||
Array.prototype.push.apply(it.value.end, it.sep);
|
||||
arrayPushArray(it.value.end, it.sep);
|
||||
else
|
||||
it.value.end = it.sep;
|
||||
}
|
||||
else
|
||||
Array.prototype.push.apply(it.start, it.sep);
|
||||
arrayPushArray(it.start, it.sep);
|
||||
delete it.sep;
|
||||
}
|
||||
}
|
||||
@@ -507,7 +515,7 @@ class Parser {
|
||||
const prev = map.items[map.items.length - 2];
|
||||
const end = prev?.value?.end;
|
||||
if (Array.isArray(end)) {
|
||||
Array.prototype.push.apply(end, it.start);
|
||||
arrayPushArray(end, it.start);
|
||||
end.push(this.sourceToken);
|
||||
map.items.pop();
|
||||
return;
|
||||
@@ -722,7 +730,7 @@ class Parser {
|
||||
const prev = seq.items[seq.items.length - 2];
|
||||
const end = prev?.value?.end;
|
||||
if (Array.isArray(end)) {
|
||||
Array.prototype.push.apply(end, it.start);
|
||||
arrayPushArray(end, it.start);
|
||||
end.push(this.sourceToken);
|
||||
seq.items.pop();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user