node_modules: update (#146)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-08-07 08:08:41 +02:00
committed by GitHub
co-authored by dawidd6
parent 6b3dfab4e0
commit 3d5a3a75cc
44 changed files with 660 additions and 284 deletions
+11 -4
View File
@@ -30,19 +30,26 @@ function composeNode(ctx, token, props, onError) {
case 'block-map':
case 'block-seq':
case 'flow-collection':
node = composeCollection.composeCollection(CN, ctx, token, props, onError);
if (anchor)
node.anchor = anchor.source.substring(1);
try {
node = composeCollection.composeCollection(CN, ctx, token, props, onError);
if (anchor)
node.anchor = anchor.source.substring(1);
}
catch (error) {
// Almost certainly here due to a stack overflow
const message = error instanceof Error ? error.message : String(error);
onError(token, 'RESOURCE_EXHAUSTION', message);
}
break;
default: {
const message = token.type === 'error'
? token.message
: `Unsupported token (type: ${token.type})`;
onError(token, 'UNEXPECTED_TOKEN', message);
node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);
isSrcToken = false;
}
}
node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));
if (anchor && node.anchor === '')
onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');
if (atKey &&