Skip to content

fix(core): handle npm scope when matching project substring#31160

Merged
FrozenPandaz merged 1 commit intomasterfrom
fix/multi-project-match
May 9, 2025
Merged

fix(core): handle npm scope when matching project substring#31160
FrozenPandaz merged 1 commit intomasterfrom
fix/multi-project-match

Conversation

@jaysoo
Copy link
Copy Markdown
Member

@jaysoo jaysoo commented May 9, 2025

This PR fixes an issue if a JS project uses the same name as the npm scope.

For example, if you have @acme/acme and @acme/acme-e2e projects, then running nx lint acme will fail with an error:

 NX   Multiple projects matched:

@acme/acme-e2e
@acme/acme

Current Behavior

Nx fails to run the task

Expected Behavior

Nx should find the project to run the task for (ignoring scope)

Related Issue(s)

Fixes #

@jaysoo jaysoo requested a review from a team as a code owner May 9, 2025 20:12
@jaysoo jaysoo requested a review from AgentEnder May 9, 2025 20:12
@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview May 9, 2025 8:15pm

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 9, 2025

View your CI Pipeline Execution ↗ for commit 327ffbb.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 37m 34s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 16s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 1s View ↗
nx documentation ✅ Succeeded 1m 39s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-09 20:58:17 UTC

@FrozenPandaz FrozenPandaz merged commit 5aa0c40 into master May 9, 2025
6 checks passed
@FrozenPandaz FrozenPandaz deleted the fix/multi-project-match branch May 9, 2025 22:43
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants