Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoSign in
Socket

yaml

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml - npm Package Compare versions

Comparing version
2.7.0
to
2.7.1
+2
-2
browser/dist/compose/compose-collection.js

@@ -67,4 +67,4 @@ import { isNode } from '../nodes/identity.js';

else {
if (kt?.collection) {
onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);
if (kt) {
onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);
}

@@ -71,0 +71,0 @@ else {

@@ -671,3 +671,16 @@ import { tokenType } from './cst.js';

if (bv) {
if (atMapIndent && bv.type !== 'block-seq') {
if (bv.type === 'block-seq') {
if (!it.explicitKey &&
it.sep &&
!includesToken(it.sep, 'newline')) {
yield* this.pop({
type: 'error',
offset: this.offset,
message: 'Unexpected block-seq-ind on same line with key',
source: this.source
});
return;
}
}
else if (atMapIndent) {
map.items.push({ start });

@@ -674,0 +687,0 @@ }

@@ -31,2 +31,4 @@ import { Scalar } from '../../nodes/Scalar.js';

stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
if (!value)
return '';
const buf = value; // checked earlier by binary.identify()

@@ -33,0 +35,0 @@ let str;

@@ -98,5 +98,5 @@ import { stringifyNumber } from '../../stringify/stringifyNumber.js';

},
stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, '')
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
};
export { floatTime, intTime, timestamp };

@@ -69,4 +69,4 @@ 'use strict';

else {
if (kt?.collection) {
onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);
if (kt) {
onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);
}

@@ -73,0 +73,0 @@ else {

@@ -676,3 +676,16 @@ 'use strict';

if (bv) {
if (atMapIndent && bv.type !== 'block-seq') {
if (bv.type === 'block-seq') {
if (!it.explicitKey &&
it.sep &&
!includesToken(it.sep, 'newline')) {
yield* this.pop({
type: 'error',
offset: this.offset,
message: 'Unexpected block-seq-ind on same line with key',
source: this.source
});
return;
}
}
else if (atMapIndent) {
map.items.push({ start });

@@ -679,0 +692,0 @@ }

@@ -37,2 +37,4 @@ 'use strict';

stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
if (!value)
return '';
const buf = value; // checked earlier by binary.identify()

@@ -39,0 +41,0 @@ let str;

@@ -100,3 +100,3 @@ 'use strict';

},
stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, '')
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
};

@@ -103,0 +103,0 @@

{
"name": "yaml",
"version": "2.7.0",
"version": "2.7.1",
"license": "ISC",

@@ -5,0 +5,0 @@ "author": "Eemeli Aro <eemeli@gmail.com>",

@@ -27,2 +27,4 @@ # YAML <a href="https://www.npmjs.com/package/yaml"><img align="right" src="https://badge.fury.io/js/yaml.svg" title="npm package" /></a>

npm install yaml
# or
deno add jsr:@eemeli/yaml
```

@@ -29,0 +31,0 @@