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

@stoplight/yaml

Package Overview
Dependencies
Maintainers
27
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 3.6.0 to 3.7.0

trapAccess.d.ts

1

index.d.ts

@@ -10,1 +10,2 @@ export * from './buildJsonPath';

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

@@ -13,2 +13,3 @@ "use strict";

tslib_1.__exportStar(require("./types"), exports);
tslib_1.__exportStar(require("./trapAccess"), exports);
//# sourceMappingURL=index.js.map

2

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

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

@@ -8,2 +8,3 @@ "use strict";

const lineForPosition_1 = require("./lineForPosition");
const trapAccess_1 = require("./trapAccess");
const types_2 = require("./types");

@@ -35,3 +36,2 @@ const utils_1 = require("./utils");

};
const KEYS = Symbol('object_keys');
exports.walkAST = (node, options, lineMap, diagnostics) => {

@@ -80,4 +80,4 @@ if (node) {

}
if (KEYS in container) {
container[KEYS].push(KEYS);
if (trapAccess_1.KEYS in container) {
container[trapAccess_1.KEYS].push(trapAccess_1.KEYS);
}

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

if (preserveKeyOrder) {
reduced[KEYS].push(KEYS);
reduced[trapAccess_1.KEYS].push(trapAccess_1.KEYS);
}

@@ -174,11 +174,6 @@ return reduced;

};
const traps = {
ownKeys(target) {
return target[KEYS];
},
};
function createMapContainer(preserveKeyOrder) {
if (preserveKeyOrder) {
const container = new Proxy({}, traps);
Reflect.defineProperty(container, KEYS, {
const container = trapAccess_1.trapAccess({});
Reflect.defineProperty(container, trapAccess_1.KEYS, {
value: [],

@@ -191,5 +186,5 @@ });

function deleteKey(container, key) {
const index = key in container ? container[KEYS].indexOf(key) : -1;
const index = key in container ? container[trapAccess_1.KEYS].indexOf(key) : -1;
if (index !== -1) {
container[KEYS].splice(index, 1);
container[trapAccess_1.KEYS].splice(index, 1);
}

@@ -199,7 +194,7 @@ }

deleteKey(container, key);
container[KEYS].unshift(key);
container[trapAccess_1.KEYS].unshift(key);
}
function pushKey(container, key) {
deleteKey(container, key);
container[KEYS].push(key);
container[trapAccess_1.KEYS].push(key);
}

@@ -206,0 +201,0 @@ function validateMappingKey(mapping, lineMap, diagnostics, yamlMode) {

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