@@ -112492,8 +112492,8 @@ function composeCollection(CN, ctx, token, props, onError) {
112492112492 tag = kt;
112493112493 }
112494112494 else {
112495- if (kt?.collection ) {
112496- onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);
112495+ if (kt) {
112496+ onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar' }`, true);
112497112497 }
112498112498 else {
112499112499 onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);
@@ -117958,7 +117958,20 @@ class Parser {
117958117958 default: {
117959117959 const bv = this.startBlockValue(map);
117960117960 if (bv) {
117961- if (atMapIndent && bv.type !== 'block-seq') {
117961+ if (bv.type === 'block-seq') {
117962+ if (!it.explicitKey &&
117963+ it.sep &&
117964+ !includesToken(it.sep, 'newline')) {
117965+ yield* this.pop({
117966+ type: 'error',
117967+ offset: this.offset,
117968+ message: 'Unexpected block-seq-ind on same line with key',
117969+ source: this.source
117970+ });
117971+ return;
117972+ }
117973+ }
117974+ else if (atMapIndent) {
117962117975 map.items.push({ start });
117963117976 }
117964117977 this.stack.push(bv);
@@ -118897,6 +118910,8 @@ const binary = {
118897118910 }
118898118911 },
118899118912 stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
118913+ if (!value)
118914+ return '';
118900118915 const buf = value; // checked earlier by binary.identify()
118901118916 let str;
118902118917 if (typeof node_buffer.Buffer === 'function') {
@@ -119620,7 +119635,7 @@ const timestamp = {
119620119635 }
119621119636 return new Date(date);
119622119637 },
119623- stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, '')
119638+ stringify: ({ value }) => value? .toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
119624119639};
119625119640
119626119641exports.floatTime = floatTime;
0 commit comments