@ssen/collect-dependencies
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -35,3 +35,3 @@ "use strict"; | ||
function getPackagesOrder({ packageJsonContents }) { | ||
function searchNestedDependencies(ownerName, dependencies, dependenciesSet) { | ||
function searchNestedDependencies(ownerName, dependencies, dependenciesSet, parents) { | ||
if (dependencies) { | ||
@@ -41,3 +41,3 @@ const dependencyNames = Object.keys(dependencies); | ||
if (dependencyName === ownerName) { | ||
throw new Error(`package.json files have circularly referenced dependencies : "${ownerName}"`); | ||
throw new Error(`package.json files have circularly referenced dependencies : "${ownerName}" in "${parents.join(' < ')} < ${dependencyName}"`); | ||
} | ||
@@ -49,3 +49,3 @@ dependenciesSet.add(dependencyName); | ||
if (childPackageJson && childPackageJson.dependencies) { | ||
searchNestedDependencies(ownerName, childPackageJson.dependencies, dependenciesSet); | ||
searchNestedDependencies(ownerName, childPackageJson.dependencies, dependenciesSet, [...parents, dependencyName]); | ||
} | ||
@@ -62,3 +62,3 @@ } | ||
name: packageJson.name, | ||
dependencies: searchNestedDependencies(packageJson.name, packageJson.dependencies, new Set()), | ||
dependencies: searchNestedDependencies(packageJson.name, packageJson.dependencies, new Set(), [packageJson.name]), | ||
}; | ||
@@ -65,0 +65,0 @@ }); |
@@ -16,3 +16,3 @@ { | ||
"name": "@ssen/collect-dependencies", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"dependencies": { | ||
@@ -19,0 +19,0 @@ "type-fest": "^0.16.0", |
Sorry, the diff of this file is not supported yet
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
52107