@scandipwa/scandipwa-dev-utils
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -9,2 +9,5 @@ /* eslint-disable guard-for-in, fp/no-let, no-console, max-len, import/no-dynamic-require, global-require, fp/no-loops, no-restricted-syntax */ | ||
// Reuse those deps to set as hight prior checking. | ||
let rootDeps = {}; | ||
/** | ||
@@ -17,3 +20,3 @@ * Recursively get "composer" field from all package.json, | ||
*/ | ||
const getComposerDeps = (modulePath, context = modulePath) => { | ||
const getComposerDeps = (modulePath, context = modulePath, isRoot = false) => { | ||
if (visitedDeps.indexOf(modulePath) !== -1) { | ||
@@ -28,6 +31,10 @@ return []; | ||
scandipwa: { | ||
composer = [] | ||
composer = {} | ||
} = {} | ||
} = getPackageJson(modulePath, context); | ||
if (isRoot) { | ||
rootDeps = composer; | ||
} | ||
return Object.keys(dependencies).reduce( | ||
@@ -49,3 +56,3 @@ (acc, dependency) => acc.concat(getComposerDeps(dependency, context)), | ||
const requestedComposerDeps = getComposerDeps(pathname); | ||
const requestedComposerDeps = getComposerDeps(pathname, pathname, true); | ||
@@ -59,3 +66,8 @@ // Index the composer deps from array of object entries. | ||
if (acc[module].indexOf(version) === -1) { | ||
if (rootDeps[module] && acc[module].indexOf(rootDeps[module]) === -1) { | ||
acc[module].push(rootDeps[module]); | ||
return acc; | ||
} | ||
if (!rootDeps[module] && acc[module].indexOf(version) === -1) { | ||
acc[module].push(version); | ||
@@ -133,3 +145,3 @@ } | ||
// Validate if the version requested is present in composer + shwo notice about minimum version | ||
// Validate if the version requested is present in composer + show notice about minimum version | ||
if (!composerDeps[composerModule]) { | ||
@@ -158,3 +170,3 @@ logger.error( | ||
// if the version required is a range, take min version of it and | ||
// validate it agains the range. | ||
// validate it against the range. | ||
if (!semver.satisfies(minUserDepVersion, rangeRequested)) { | ||
@@ -161,0 +173,0 @@ logger.error( |
{ | ||
"name": "@scandipwa/scandipwa-dev-utils", | ||
"description": "Development utilities used by CSA.", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"dependencies": { | ||
"@tilework/mosaic-dev-utils": "0.1.6", | ||
"@tilework/mosaic-dev-utils": "0.2.1", | ||
"cross-spawn": "^7.0.3", | ||
@@ -16,3 +16,3 @@ "react-dev-utils": "^11.0.4", | ||
}, | ||
"gitHead": "9823ca90ecd5b66327fab5b0d9d6ea0354d118c1" | ||
"gitHead": "35d99c1121a2c16dbedc76f091665c67ec30ebff" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23864
297
+ Added@tilework/mosaic-dev-utils@0.2.1(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedext-ip@0.3.9(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.14.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
- Removed@tilework/mosaic-dev-utils@0.1.6(transitive)
- Removedcore-util-is@1.0.3(transitive)