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

feat(core): allow tasks to run with a substring of project name #29552

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Jan 8, 2025

When projects use only package.json and not project.json, we need to set the simple name in the nx property of package.json. This isn't ideal because it's yet another Nx-specific thing that needs to be configured when our goal is to reduce boilerplate.

This PR allows users to pass a substring that matches exactly one project when running a task.

For example, if @acme/foo is the name in package.json, then running nx build foo will match it.

If more than one projects match, then an error is thrown showing all the matched projects, and the user has to be more specific or type in the fully qualified name.

Current Behavior

Users need to pass exact matches for project names when running tasks.

Expected Behavior

User can pass a substring matching the project name.

Related Issue(s)

Fixes #

@jaysoo jaysoo requested a review from a team as a code owner January 8, 2025 17:27
@jaysoo jaysoo requested a review from AgentEnder January 8, 2025 17:27
Copy link

vercel bot commented Jan 8, 2025

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

Name Status Preview Updated (UTC)
nx-dev ❌ Failed (Inspect) Jan 8, 2025 11:21pm

Copy link

nx-cloud bot commented Jan 8, 2025

View your CI Pipeline Execution ↗ for commit c659cc4.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ❌ Failed 33m 49s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 1s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base=16080... ✅ Succeeded 21s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 20s View ↗
nx documentation --no-dte ✅ Succeeded 1m 9s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-09 00:00:52 UTC

@jaysoo jaysoo force-pushed the feat/run-project-with-substring branch from 8781733 to a8bf41a Compare January 8, 2025 18:07
@jaysoo jaysoo force-pushed the feat/run-project-with-substring branch 2 times, most recently from 0b96970 to c2d9663 Compare January 8, 2025 19:18
@jaysoo jaysoo force-pushed the feat/run-project-with-substring branch from c2d9663 to c5a0e0f Compare January 8, 2025 20:42
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 this pull request may close these issues.

3 participants