Thinkmill / manypkg

☔️ An umbrella for your monorepo
MIT License
892 stars 48 forks source link

getPackages method not working on cwd absolute path matches the pnpm workspace exclude rules #121

Closed fz6m closed 2 years ago

fz6m commented 2 years ago

Now pnpm workspace support workspace exclude rules.

pnpm-workspace.yaml case:

packages:
  # all packages in subdirs of packages/ and components/
  - 'packages/**'
  # exclude packages that are inside test directories
  - '!**/test/**'

so. if cwd absolute path matches the exclude rules, glob will exclude all workspaces.

case (expected results in parentheses) :

  - test
    - packages
      - pkg-1   # (need)
      - pkg-2  # (need)
      - test   # (not need)
    - pnpm-workspace.yaml

the parent cwd path has test string matches the exclude rule, getPackages result is [] (empty) .