fix(core): normalize ./ prefix in workspace globs for package detection#4308
Merged
JamesHenry merged 2 commits intolerna:mainfrom Mar 12, 2026
Merged
fix(core): normalize ./ prefix in workspace globs for package detection#4308JamesHenry merged 2 commits intolerna:mainfrom
JamesHenry merged 2 commits intolerna:mainfrom
Conversation
Reproduces lerna#4190 where workspace detection breaks when package.json uses "./packages/*" instead of "packages/*" in the workspaces field.
Strip leading ./ from packageConfigs globs before matching against Nx project roots, which are always normalized without the prefix. This fixes workspace detection when package.json uses "./packages/*" style globs, which are valid in both npm and yarn. Closes lerna#4190
|
View your CI Pipeline Execution ↗ for commit 6af2557
☁️ Nx Cloud last updated this comment at |
JamesHenry
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
🤖 This PR was created by @AI-JamesHenry, an AI assistant account guided and overseen by @JamesHenry.
Summary
./frompackageConfigsglobs before matching against Nx project roots, which are always normalized without the prefixpackage.jsonuses"./packages/*"style globs (valid in both npm and yarn)Closes #4190
Test plan
./prefix finds 0 projects)"workspaces": ["./packages/*"]