Merge pull request #274 from actions/dependabot/npm_and_yarn/yaml-2.1.3

Bump yaml from 2.1.2 to 2.1.3
This commit is contained in:
Federico Builes
2022-10-06 14:43:54 +02:00
committed by GitHub
4 changed files with 19 additions and 16 deletions
Generated Vendored
+10 -7
View File
@@ -15947,6 +15947,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
if (ctx.atRoot) if (ctx.atRoot)
ctx.atRoot = false; ctx.atRoot = false;
let offset = bm.offset; let offset = bm.offset;
let commentEnd = null;
for (const collItem of bm.items) { for (const collItem of bm.items) {
const { start, key, sep, value } = collItem; const { start, key, sep, value } = collItem;
// key properties // key properties
@@ -15966,7 +15967,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
onError(offset, 'BAD_INDENT', startColMsg); onError(offset, 'BAD_INDENT', startColMsg);
} }
if (!keyProps.anchor && !keyProps.tag && !sep) { if (!keyProps.anchor && !keyProps.tag && !sep) {
// TODO: assert being at last item? commentEnd = keyProps.end;
if (keyProps.comment) { if (keyProps.comment) {
if (map.comment) if (map.comment)
map.comment += '\n' + keyProps.comment; map.comment += '\n' + keyProps.comment;
@@ -16036,7 +16037,9 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
map.items.push(pair); map.items.push(pair);
} }
} }
map.range = [bm.offset, offset, offset]; if (commentEnd && commentEnd < offset)
onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
map.range = [bm.offset, offset, commentEnd ?? offset];
return map; return map;
} }
@@ -16264,6 +16267,7 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
if (ctx.atRoot) if (ctx.atRoot)
ctx.atRoot = false; ctx.atRoot = false;
let offset = bs.offset; let offset = bs.offset;
let commentEnd = null;
for (const { start, value } of bs.items) { for (const { start, value } of bs.items) {
const props = resolveProps.resolveProps(start, { const props = resolveProps.resolveProps(start, {
indicator: 'seq-item-ind', indicator: 'seq-item-ind',
@@ -16272,16 +16276,15 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
onError, onError,
startOnNewline: true startOnNewline: true
}); });
offset = props.end;
if (!props.found) { if (!props.found) {
if (props.anchor || props.tag || value) { if (props.anchor || props.tag || value) {
if (value && value.type === 'block-seq') if (value && value.type === 'block-seq')
onError(offset, 'BAD_INDENT', 'All sequence items must start at the same column'); onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
else else
onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator'); onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
} }
else { else {
// TODO: assert being at last item? commentEnd = props.end;
if (props.comment) if (props.comment)
seq.comment = props.comment; seq.comment = props.comment;
continue; continue;
@@ -16289,13 +16292,13 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
} }
const node = value const node = value
? composeNode(ctx, value, props, onError) ? composeNode(ctx, value, props, onError)
: composeEmptyNode(ctx, offset, start, null, props, onError); : composeEmptyNode(ctx, props.end, start, null, props, onError);
if (ctx.schema.compat) if (ctx.schema.compat)
utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError); utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
offset = node.range[2]; offset = node.range[2];
seq.items.push(node); seq.items.push(node);
} }
seq.range = [bs.offset, offset, offset]; seq.range = [bs.offset, offset, commentEnd ?? offset];
return seq; return seq;
} }
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -7
View File
@@ -16,7 +16,7 @@
"ansi-styles": "^6.1.1", "ansi-styles": "^6.1.1",
"got": "^12.5.1", "got": "^12.5.1",
"nodemon": "^2.0.20", "nodemon": "^2.0.20",
"yaml": "^2.1.2", "yaml": "^2.1.3",
"zod": "^3.19.1" "zod": "^3.19.1"
}, },
"devDependencies": { "devDependencies": {
@@ -7141,9 +7141,9 @@
"dev": true "dev": true
}, },
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.1.2", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.2.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz",
"integrity": "sha512-VSdf2/K3FqAetooKQv45Hcu6sA00aDgWZeGcG6V9IYJnVLTnb6988Tie79K5nx2vK7cEpf+yW8Oy+7iPAbdiHA==", "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==",
"engines": { "engines": {
"node": ">= 14" "node": ">= 14"
} }
@@ -12527,9 +12527,9 @@
"dev": true "dev": true
}, },
"yaml": { "yaml": {
"version": "2.1.2", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.2.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz",
"integrity": "sha512-VSdf2/K3FqAetooKQv45Hcu6sA00aDgWZeGcG6V9IYJnVLTnb6988Tie79K5nx2vK7cEpf+yW8Oy+7iPAbdiHA==" "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg=="
}, },
"yargs": { "yargs": {
"version": "16.2.0", "version": "16.2.0",
+1 -1
View File
@@ -32,7 +32,7 @@
"ansi-styles": "^6.1.1", "ansi-styles": "^6.1.1",
"got": "^12.5.1", "got": "^12.5.1",
"nodemon": "^2.0.20", "nodemon": "^2.0.20",
"yaml": "^2.1.2", "yaml": "^2.1.3",
"zod": "^3.19.1" "zod": "^3.19.1"
}, },
"devDependencies": { "devDependencies": {