cli icon indicating copy to clipboard operation
cli copied to clipboard

Yarn workspaces detection misdetect some paths

Open scinos opened this issue 3 years ago • 0 comments

I'm using yarn v3 with this workspaces config:

  "workspaces": {
    "packages": [
      "apps/*",
      "apps/**/e2e/page-objects",
      "components/**",
      "!components/common/loader",
      "libraries/*",
      "libraries/secure-enclave/worker",
      "cross-module-e2e"
    ]
  },

I have other package.json files in my monorepo that don't match those workspaces. But synk monitor seems to think they are.

$ cd /home/scinos/monorepo/
$ DEBUG=* yarn run snyk monitor --yarn-workspaces --detection-depth=6
...
  snyk-yarn-workspaces Processing /home/scinos/monorepo/libraries/workspace-grid/loader as a potential Yarn workspace +500ms
  snyk-yarn-workspaces /home/scinos/monorepo/libraries/workspace-grid/loader/package.json matches an existing workspace pattern +2ms

Snyk thinks libraries/workspace-grid/loader/package.json matches "an existing workspace pattern" but it does not.

scinos avatar May 03 '22 10:05 scinos