Socket
Socket
Sign inDemoInstall

@xliic/preserving-json-yaml-parser

Package Overview
Dependencies
2
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.0 to 1.6.1

8

lib/visit/json.js

@@ -10,2 +10,6 @@ "use strict";

const location = { value: { start: node.offset, end: node.offset + node.length } };
if (parent.type === "property") {
const key = parent.children[0];
location.key = { start: key.offset, end: key.offset + key.length };
}
if (node.type === "object") {

@@ -27,6 +31,2 @@ visitor.onObjectStart(parent, key, node, location);

else {
if (parent.type === "property") {
const key = parent.children[0];
location.key = { start: key.offset, end: key.offset + key.length };
}
visitor.onValue(parent, key, node.value, node.rawValue, location);

@@ -33,0 +33,0 @@ }

@@ -19,2 +19,5 @@ "use strict";

const location = { value: { start: node.startPosition, end: node.endPosition } };
if (parent.kind === yaml_language_server_parser_1.Kind.MAPPING) {
location.key = { start: parent.key.startPosition, end: parent.key.endPosition };
}
if (node.kind === yaml_language_server_parser_1.Kind.MAP) {

@@ -47,5 +50,2 @@ visitor.onObjectStart(parent, key, node, location);

const text = reserializeYamlValue(type, node.value, value);
if (parent.kind === yaml_language_server_parser_1.Kind.MAPPING) {
location.key = { start: parent.key.startPosition, end: parent.key.endPosition };
}
visitor.onValue(parent, key, value, text, location);

@@ -52,0 +52,0 @@ }

{
"name": "@xliic/preserving-json-yaml-parser",
"version": "1.6.0",
"version": "1.6.1",
"description": "YAML/JSON parser and serializer that preserves formatting of the original numerical values (i.e. 1.0 vs 1) and handles integers bigger than MAX_SAFE_INTEGER",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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