dependency-cruiser 15.3.0 → 15.3.1-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -24,12 +24,12 @@ function mergeDependencyArray(pClosestDependencyKey, pFurtherDependencyKey) {
|
|
|
24
24
|
return uniq(pClosestDependencyKey.concat(pFurtherDependencyKey));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function
|
|
28
|
-
return pKey.endsWith("ependencies");
|
|
27
|
+
function isInterestingKey(pKey) {
|
|
28
|
+
return pKey.endsWith("ependencies") || pKey === "workspaces";
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function getDependencyKeys(pPackage) {
|
|
32
|
-
return Object.keys(pPackage).filter(
|
|
32
|
+
return Object.keys(pPackage).filter(isInterestingKey);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
function getJointUniqueDependencyKeys(pClosestPackage, pFurtherPackage) {
|
|
@@ -40,6 +40,10 @@ function getJointUniqueDependencyKeys(pClosestPackage, pFurtherPackage) {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
function isAnArrayKey(pKey) {
|
|
44
|
+
return pKey.startsWith("bundle") || pKey === "workspaces";
|
|
45
|
+
}
|
|
46
|
+
|
|
43
47
|
/**
|
|
44
48
|
* returns an object with
|
|
45
49
|
* - the *dependencies keys from both passed packages
|
|
@@ -63,7 +67,7 @@ export default function mergeManifests(pClosestManifest, pFurtherManifest) {
|
|
|
63
67
|
)
|
|
64
68
|
.map((pKey) => ({
|
|
65
69
|
key: pKey,
|
|
66
|
-
value: pKey
|
|
70
|
+
value: isAnArrayKey(pKey)
|
|
67
71
|
? mergeDependencyArray(
|
|
68
72
|
pClosestManifest?.[pKey] ?? [],
|
|
69
73
|
pFurtherManifest?.[pKey] ?? [],
|