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

@devsnicket/eunice-dependency-and-structure

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devsnicket/eunice-dependency-and-structure - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

createYamlFromStack/createDependsUpon/.devsnicket-eunice-stack.yaml

2

createStackFromYaml/test/testDependencies/testDependsUponMapping/index.js
const
testDependsUponMissing = require("./testDependsUponMissing"),
testDependsUponTwoChildrenMissingFromMissing = require("./testDependsUponTwoChildrenMissingFromMissing"),
testFirstDependsUponChildMissingFromSecond = require("./testFirstDependsUponChildMissingFromSecond"),

@@ -15,3 +14,2 @@ testFirstDependsUponChildOfSecond = require("./testFirstDependsUponChildOfSecond"),

testDependsUponMissing();
testDependsUponTwoChildrenMissingFromMissing();
testFirstDependsUponChildMissingFromSecond();

@@ -18,0 +16,0 @@ testFirstDependsUponChildOfSecond();

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

const createDependsUpon = require("./createDependsUpon");
module.exports = createYamlFromStack;

@@ -73,42 +75,6 @@

&&
{
dependsUpon:
dependsUpon.length === 1
?
createDependUpon(dependsUpon[0])
:
dependsUpon.map(createDependUpon),
}
{ dependsUpon: createDependsUpon(dependsUpon) }
);
}
function createDependUpon(
dependUpon,
) {
return getWhenParent() || getIdentifierPropertyOrValue(dependUpon.item);
function getWhenParent() {
return (
dependUpon.parent
&&
{
id:
getIdentifierPropertyOrValue(
dependUpon.parent,
),
items:
getIdentifierPropertyOrValue(
dependUpon.item,
),
}
);
}
function getIdentifierPropertyOrValue(
value,
) {
return value.id || value;
}
}
function createItemsProperty(

@@ -115,0 +81,0 @@ items,

const testDependsUponMissing = require("./testDependsUponMissing"),
testDependsUponTwoChildrenMissingFromMissing = require("./testDependsUponTwoChildrenMissingFromMissing"),
testFirstDependsUponChildMissingFromSecond = require("./testFirstDependsUponChildMissingFromSecond"),

@@ -10,3 +9,2 @@ testFirstDependsUponChildOfSecond = require("./testFirstDependsUponChildOfSecond"),

testDependsUponMissing();
testDependsUponTwoChildrenMissingFromMissing();
testFirstDependsUponChildMissingFromSecond();

@@ -13,0 +11,0 @@ testFirstDependsUponChildOfSecond();

@@ -5,2 +5,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

const createDependsUpon = require("./createDependsUpon");
module.exports = createYamlFromStack;

@@ -41,22 +43,5 @@

function createDependsUponProperty(dependsUpon) {
return dependsUpon && {
dependsUpon: dependsUpon.length === 1 ? createDependUpon(dependsUpon[0]) : dependsUpon.map(createDependUpon)
};
return dependsUpon && { dependsUpon: createDependsUpon(dependsUpon) };
}
function createDependUpon(dependUpon) {
return getWhenParent() || getIdentifierPropertyOrValue(dependUpon.item);
function getWhenParent() {
return dependUpon.parent && {
id: getIdentifierPropertyOrValue(dependUpon.parent),
items: getIdentifierPropertyOrValue(dependUpon.item)
};
}
function getIdentifierPropertyOrValue(value) {
return value.id || value;
}
}
function createItemsProperty(items) {

@@ -63,0 +48,0 @@ return items && { items: createYamlFromStack(items) };

@@ -65,3 +65,3 @@ {

},
"version": "2.1.0"
"version": "2.2.0"
}

@@ -1,2 +0,4 @@

const testDependsUponChildMissingFromMissing = require("./testDependsUponChildMissingFromMissing");
const
testDependsUponChildMissingFromMissing = require("./testDependsUponChildMissingFromMissing"),
testDependsUponTwoChildrenMissingFromMissing = require("./testDependsUponTwoChildrenMissingFromMissing");

@@ -7,4 +9,6 @@ module.exports =

"mapping",
() =>
testDependsUponChildMissingFromMissing(test),
() => {
testDependsUponChildMissingFromMissing(test);
testDependsUponTwoChildrenMissingFromMissing(test);
},
);

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