Socket
Socket
Sign inDemoInstall

yaml

Package Overview
Dependencies
0
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

13

browser/dist/stringify/stringifyString.js

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

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

@@ -258,5 +258,10 @@ (inFlow && /[[\]{},]/.test(value))) {

}
if (indent === '' && containsDocumentMarker(value)) {
ctx.forceBlockIndent = true;
return blockString(item, ctx, onComment, onChompKeep);
if (containsDocumentMarker(value)) {
if (indent === '') {
ctx.forceBlockIndent = true;
return blockString(item, ctx, onComment, onChompKeep);
}
else if (implicitKey && indent === indentStep) {
return quotedString(value, ctx);
}
}

@@ -263,0 +268,0 @@ const str = value.replace(/\n+/g, `$&\n${indent}`);

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

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

@@ -260,5 +260,10 @@ (inFlow && /[[\]{},]/.test(value))) {

}
if (indent === '' && containsDocumentMarker(value)) {
ctx.forceBlockIndent = true;
return blockString(item, ctx, onComment, onChompKeep);
if (containsDocumentMarker(value)) {
if (indent === '') {
ctx.forceBlockIndent = true;
return blockString(item, ctx, onComment, onChompKeep);
}
else if (implicitKey && indent === indentStep) {
return quotedString(value, ctx);
}
}

@@ -265,0 +270,0 @@ const str = value.replace(/\n+/g, `$&\n${indent}`);

{
"name": "yaml",
"version": "2.2.0",
"version": "2.2.1",
"license": "ISC",

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

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