Thinkmill / manypkg

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

fix(pnpm): absolute cwd path matched workspace exclude rules (#121) #122

Closed fz6m closed 2 years ago

fz6m commented 2 years ago

fix #121

changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: b9fbc7929d91eb6603cea54004fe0030a0ed1f72

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | --------------------- | ----- | | @manypkg/cli | Patch | | @manypkg/get-packages | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

fz6m commented 2 years ago

It's a very interesting fix - do you know why this has fixed the mentioned issue? How do those two things relate to each other. I would expect the absolute: true to only normalize the final output and not to affect what actually gets matched.

In fast-glob (globby based on fast-glob). If absolute is specified as true :

so first resolve path, then start matching regexp.

like this, start with ! regexp requires an additional cwd path. but this prefix path is not in the pnpm worksapces rules.