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
|
@@ -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
|
-
|
|
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
|
//
|