Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fz6m opened this issue Nov 4, 2021 · 0 comments · Fixed by #122
Closed

Comments

@fz6m
Copy link
Contributor

fz6m commented Nov 4, 2021

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) .

emmatown pushed a commit that referenced this issue Nov 9, 2021
…122)

* fix(pnpm): absolute path matched exclude rules

* chore(changeset): add changesets for fix

* chore: remove console.log

* Update .changeset/fair-days-rest.md

Co-authored-by: Mateusz Burzyński <[email protected]>

Co-authored-by: Mateusz Burzyński <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant