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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dependency-cruiser",
3
- "version": "15.3.0",
3
+ "version": "15.3.1-beta-1",
4
4
  "description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
5
5
  "keywords": [
6
6
  "static analysis",
@@ -24,12 +24,12 @@ function mergeDependencyArray(pClosestDependencyKey, pFurtherDependencyKey) {
24
24
  return uniq(pClosestDependencyKey.concat(pFurtherDependencyKey));
25
25
  }
26
26
 
27
- function isDependencyKey(pKey) {
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(isDependencyKey);
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.startsWith("bundle")
70
+ value: isAnArrayKey(pKey)
67
71
  ? mergeDependencyArray(
68
72
  pClosestManifest?.[pKey] ?? [],
69
73
  pFurtherManifest?.[pKey] ?? [],
package/src/meta.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* generated - don't edit */
2
2
 
3
3
  module.exports = {
4
- version: "15.3.0",
4
+ version: "15.3.1-beta-1",
5
5
  engines: {
6
6
  node: "^18.17||>=20",
7
7
  },