dependency-cruiser 16.2.3 → 16.2.4-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": "16.2.3",
3
+ "version": "16.2.4-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",
@@ -131,7 +131,10 @@ function isWebPackAliased(pModuleName, pAliasObject) {
131
131
  // eslint-disable-next-line max-lines-per-function
132
132
  function isWorkspaceAliased(pModuleName, pResolvedModuleName, pManifest) {
133
133
  // reference: https://docs.npmjs.com/cli/v10/using-npm/workspaces
134
- if (pManifest?.workspaces) {
134
+ // for pnpm the workspaces field is used for something else and actually
135
+ // an object. To prevent the code from borking we check whether it's an array
136
+ // see https://github.com/sverweij/dependency-cruiser/issues/919
137
+ if (pManifest?.workspaces && Array.isArray(pManifest.workspaces)) {
135
138
  // workspaces are an array of globs that match the (sub) workspace
136
139
  // folder itself only.
137
140
  //
package/src/meta.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  /* generated - don't edit */
2
2
 
3
3
  module.exports = {
4
- version: "16.2.3",
4
+ version: "16.2.4-beta-1",
5
5
  engines: {
6
6
  node: "^18.17||>=20",
7
7
  },