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:
+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