@@ -111230,8 +111230,8 @@ function composeCollection(CN, ctx, token, props, onError) {
111230
111230
tag = kt;
111231
111231
}
111232
111232
else {
111233
- if (kt?.collection ) {
111234
- onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);
111233
+ if (kt) {
111234
+ onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar' }`, true);
111235
111235
}
111236
111236
else {
111237
111237
onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);
@@ -116696,7 +116696,20 @@ class Parser {
116696
116696
default: {
116697
116697
const bv = this.startBlockValue(map);
116698
116698
if (bv) {
116699
- if (atMapIndent && bv.type !== 'block-seq') {
116699
+ if (bv.type === 'block-seq') {
116700
+ if (!it.explicitKey &&
116701
+ it.sep &&
116702
+ !includesToken(it.sep, 'newline')) {
116703
+ yield* this.pop({
116704
+ type: 'error',
116705
+ offset: this.offset,
116706
+ message: 'Unexpected block-seq-ind on same line with key',
116707
+ source: this.source
116708
+ });
116709
+ return;
116710
+ }
116711
+ }
116712
+ else if (atMapIndent) {
116700
116713
map.items.push({ start });
116701
116714
}
116702
116715
this.stack.push(bv);
@@ -117635,6 +117648,8 @@ const binary = {
117635
117648
}
117636
117649
},
117637
117650
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
117651
+ if (!value)
117652
+ return '';
117638
117653
const buf = value; // checked earlier by binary.identify()
117639
117654
let str;
117640
117655
if (typeof node_buffer.Buffer === 'function') {
@@ -118358,7 +118373,7 @@ const timestamp = {
118358
118373
}
118359
118374
return new Date(date);
118360
118375
},
118361
- stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, '')
118376
+ stringify: ({ value }) => value? .toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
118362
118377
};
118363
118378
118364
118379
exports.floatTime = floatTime;
0 commit comments