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

@stoplight/yaml

Package Overview
Dependencies
Maintainers
12
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.3.0 to 2.4.0

parse.d.ts

1

index.d.ts
export * from './getJsonPathForPosition';
export * from './getLocationForJsonPath';
export * from './parse';
export * from './parseWithPointers';
export * from './safeStringify';
export * from './types';

@@ -6,4 +6,5 @@ "use strict";

tslib_1.__exportStar(require("./getLocationForJsonPath"), exports);
tslib_1.__exportStar(require("./parse"), exports);
tslib_1.__exportStar(require("./parseWithPointers"), exports);
tslib_1.__exportStar(require("./safeStringify"), exports);
//# sourceMappingURL=index.js.map

2

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

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

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

@@ -16,3 +16,3 @@ "use strict";

return parsed;
parsed.data = walk(ast);
parsed.data = exports.walkAST(ast);
if (ast.errors) {

@@ -23,3 +23,3 @@ parsed.diagnostics = transformErrors(ast.errors, lineMap);

};
const walk = (node) => {
exports.walkAST = (node) => {
if (node) {

@@ -30,3 +30,3 @@ switch (node.kind) {

for (const mapping of node.mappings) {
container[mapping.key.value] = walk(mapping.value);
container[mapping.key.value] = exports.walkAST(mapping.value);
}

@@ -36,3 +36,3 @@ return container;

case yaml_ast_parser_1.Kind.SEQ:
return node.items.map(item => walk(item));
return node.items.map(item => exports.walkAST(item));
case yaml_ast_parser_1.Kind.SCALAR:

@@ -44,3 +44,3 @@ return 'valueObject' in node ? node.valueObject : node.value;

}
return walk(node.value);
return exports.walkAST(node.value);
default:

@@ -47,0 +47,0 @@ return null;

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