-
Notifications
You must be signed in to change notification settings - Fork 82
fix: relative path pattern in workspace globs #5763
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
fix: relative path pattern in workspace globs #5763
Conversation
serhalp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| await Promise.all( | ||
| patterns.map((pattern) => { | ||
| const matcher = new Minimatch(pattern) | ||
| const cleanedPattern = pattern.replace(/^!?(\.\/)/, (match, p1) => match.replace(p1, '')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe leave a comment here explaining why this is needed?
| await Promise.all( | ||
| patterns.map((pattern) => { | ||
| const matcher = new Minimatch(pattern) | ||
| const cleanedPattern = pattern.replace(/^!?(\.\/)/, (match, p1) => match.replace(p1, '')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if anyone would ever want to use a path starting with ../? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's the root of the workspace I don't think it make any sense
pieh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we might encounter some more issues here in the future for other undocumented ways to define workspaces, but this feels at least safe to do, so we might as well get this in to at least cover leading ./ cases that we at least know about
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes the issue where monorepos where not detected properly due to a undocumented feature in pnpm workspace definition.
Fixes https://linear.app/netlify/issue/FRP-774/help-investing-why-monorepo-detection-is-not-working
See https://netlify.slack.com/archives/C01TKAEBP3Q/p1720640110647669
For us to review and ship your PR efficiently, please perform the following steps:
we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
something that`s on fire 🔥 (e.g. incident related), you can skip this step.
your code follows our style guide and passes our tests.
A picture of a cute animal (not mandatory, but encouraged)