Socket
Socket
Sign inDemoInstall

yaml

Package Overview
Dependencies
0
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.3.2

2

browser/dist/log.js

@@ -7,2 +7,4 @@ function debug(logLevel, ...messages) {

if (logLevel === 'debug' || logLevel === 'warn') {
// https://github.com/typescript-eslint/typescript-eslint/issues/7478
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
if (typeof process !== 'undefined' && process.emitWarning)

@@ -9,0 +11,0 @@ process.emitWarning(warning);

2

browser/dist/nodes/addPairToJSMap.js

@@ -84,3 +84,3 @@ import { warn } from '../log.js';

return String(jsKey);
if (isNode(key) && ctx && ctx.doc) {
if (isNode(key) && ctx?.doc) {
const strCtx = createStringifyContext(ctx.doc, {});

@@ -87,0 +87,0 @@ strCtx.anchors = new Set();

@@ -59,4 +59,5 @@ import { isSeq, isPair, isMap } from '../../nodes/identity.js';

}
else
throw new TypeError(`Expected { key: value } tuple: ${it}`);
else {
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
}
}

@@ -63,0 +64,0 @@ else {

@@ -99,3 +99,3 @@ import { Collection } from '../nodes/Collection.js';

}
else if (item.value == null && ik && ik.comment) {
else if (item.value == null && ik?.comment) {
comment = ik.comment;

@@ -102,0 +102,0 @@ }

@@ -243,3 +243,3 @@ import { Scalar } from '../nodes/Scalar.js';

const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
if ((implicitKey && /[\n[\]{},]/.test(value)) ||
if ((implicitKey && value.includes('\n')) ||
(inFlow && /[[\]{},]/.test(value))) {

@@ -246,0 +246,0 @@ return quotedString(value, ctx);

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

if (logLevel === 'debug' || logLevel === 'warn') {
// https://github.com/typescript-eslint/typescript-eslint/issues/7478
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
if (typeof process !== 'undefined' && process.emitWarning)

@@ -11,0 +13,0 @@ process.emitWarning(warning);

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

return String(jsKey);
if (identity.isNode(key) && ctx && ctx.doc) {
if (identity.isNode(key) && ctx?.doc) {
const strCtx = stringify.createStringifyContext(ctx.doc, {});

@@ -89,0 +89,0 @@ strCtx.anchors = new Set();

@@ -61,4 +61,5 @@ 'use strict';

}
else
throw new TypeError(`Expected { key: value } tuple: ${it}`);
else {
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
}
}

@@ -65,0 +66,0 @@ else {

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

}
else if (item.value == null && ik && ik.comment) {
else if (item.value == null && ik?.comment) {
comment = ik.comment;

@@ -104,0 +104,0 @@ }

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

const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
if ((implicitKey && /[\n[\]{},]/.test(value)) ||
if ((implicitKey && value.includes('\n')) ||
(inFlow && /[[\]{},]/.test(value))) {

@@ -248,0 +248,0 @@ return quotedString(value, ctx);

{
"name": "yaml",
"version": "2.3.1",
"version": "2.3.2",
"license": "ISC",

@@ -78,12 +78,12 @@ "author": "Eemeli Aro <eemeli@gmail.com>",

"@types/node": "^14.18.35",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"babel-jest": "^29.0.1",
"cross-env": "^7.0.3",
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.1.0",
"eslint-config-prettier": "^9.0.0",
"fast-check": "^2.12.0",
"jest": "^29.0.1",
"jest-ts-webcompat-resolver": "^1.0.0",
"prettier": "^2.2.1",
"prettier": "^3.0.2",
"rollup": "^3.7.5",

@@ -90,0 +90,0 @@ "tslib": "^2.1.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc