node_modules: upgrade

This commit is contained in:
Dawid Dziurla
2024-01-17 10:08:10 +01:00
parent 9ff0bc8d99
commit 00765f79cf
320 changed files with 31840 additions and 1039 deletions

View File

@@ -1,5 +1,5 @@
import { Alias } from '../nodes/Alias.js';
import { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/Node.js';
import { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/identity.js';
import { Scalar } from '../nodes/Scalar.js';
const defaultTagPrefix = 'tag:yaml.org,2002:';
@@ -74,9 +74,13 @@ function createNode(value, tagName, ctx) {
}
const node = tagObj?.createNode
? tagObj.createNode(ctx.schema, value, ctx)
: new Scalar(value);
: typeof tagObj?.nodeClass?.from === 'function'
? tagObj.nodeClass.from(ctx.schema, value, ctx)
: new Scalar(value);
if (tagName)
node.tag = tagName;
else if (!tagObj.default)
node.tag = tagObj.tag;
if (ref)
ref.node = node;
return node;