Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stoplight/yaml

Package Overview
Dependencies
Maintainers
11
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoplight/yaml - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

types.d.ts

21

getLocationForJsonPath.js

@@ -12,4 +12,9 @@ "use strict";

function getStartPosition(node) {
if (node.parent && node.parent.kind === yaml_ast_parser_1.Kind.MAPPING && node.kind !== yaml_ast_parser_1.Kind.SCALAR) {
return node.parent.key.endPosition + 1;
if (node.parent && node.parent.kind === yaml_ast_parser_1.Kind.MAPPING) {
if (node.parent.value === null) {
return node.parent.endPosition;
}
if (node.kind !== yaml_ast_parser_1.Kind.SCALAR) {
return node.parent.key.endPosition + 1;
}
}

@@ -36,2 +41,7 @@ return node.startPosition;

break;
case yaml_ast_parser_1.Kind.SCALAR:
if (node.parent.kind === yaml_ast_parser_1.Kind.MAPPING && node.parent.value === null) {
return node.parent.endPosition;
}
break;
}

@@ -46,3 +56,8 @@ return node.endPosition;

if (item.key.value === segment) {
node = item.value;
if (item.value === null) {
node = item.key;
}
else {
node = item.value;
}
continue pathLoop;

@@ -49,0 +64,0 @@ }

@@ -5,1 +5,2 @@ export * from './getJsonPathForPosition';

export * from './safeStringify';
export * from './types';

2

package.json
{
"name": "@stoplight/yaml",
"version": "2.2.0",
"version": "2.2.1",
"description": "Useful functions when working with YAML.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,3 +0,2 @@

import { IParserResult } from '@stoplight/types';
import { YAMLNode } from 'yaml-ast-parser';
export declare const parseWithPointers: <T>(value: string) => IParserResult<T, YAMLNode, number[]>;
export declare const parseWithPointers: <T>(value: string) => import("@stoplight/types").IParserResult<T, YAMLNode, number[]>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc