New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

deref

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deref - npm Package Compare versions

Comparing version 0.6.4 to 0.7.0

yarn.lock

20

lib/util/resolve-schema.js

@@ -9,10 +9,12 @@ 'use strict';

function copy(obj, refs, parent, resolve) {
function copy(_, obj, refs, parent, resolve) {
var target = Array.isArray(obj) ? [] : {};
if (typeof obj.$ref === 'string') {
var base = $.getDocumentURI(obj.$ref);
var id = obj.$ref;
var base = $.getDocumentURI(id);
var local = id.indexOf('#/') > -1;
if (parent !== base || (resolve && obj.$ref.indexOf('#/') > -1)) {
var fixed = find(obj.$ref, refs);
if (local || (resolve && base !== parent)) {
var fixed = find(id, refs);

@@ -24,2 +26,8 @@ deepExtend(obj, fixed);

}
if (_[id]) {
return obj;
}
_[id] = 1;
}

@@ -29,3 +37,3 @@

if (typeof obj[prop] === 'object' && obj[prop] !== null && !$.isKeyword(prop)) {
target[prop] = copy(obj[prop], refs, parent, resolve);
target[prop] = copy(_, obj[prop], refs, parent, resolve);
} else {

@@ -43,3 +51,3 @@ target[prop] = obj[prop];

return copy(obj, refs, parent, resolve);
return copy({}, obj, refs, parent, resolve);
};
{
"name": "deref",
"version": "0.6.4",
"version": "0.7.0",
"description": "JSON-Schema $ref resolution",

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

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