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(misc): add --useProjectJson flag to CNW #30475

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

leosvelperez
Copy link
Member

Current Behavior

Creating new workspaces since Nx 20.6.0 will generate the Nx configuration in package.json files. This is intended, given that it is part of the new setup using TypeScript Project References and Package Manager Workspaces, but there's no way to choose to generate the Nx configuration in project.json files. Project generators do allow to choose but there's no way to do it when creating a new workspace. This forces users who want to use project.json files to generate an empty workspace and then use a project generator.

Expected Behavior

When creating a new Nx workspace, users can provide an option (--use-project-json) to generate the Nx configuration in project.json files.

Related Issue(s)

Fixes #30464

Copy link

vercel bot commented Mar 24, 2025

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Mar 24, 2025 10:42am

Copy link

nx-cloud bot commented Mar 24, 2025

View your CI Pipeline Execution ↗ for commit bb439d0.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 35m 26s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 15s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base=3d710... ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 1s View ↗
nx documentation ✅ Succeeded 57s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-24 11:15:56 UTC

@FrozenPandaz FrozenPandaz merged commit cfe32c2 into master Mar 24, 2025
12 checks passed
@FrozenPandaz FrozenPandaz deleted the core/cnw-use-project-json branch March 24, 2025 12:42
FrozenPandaz pushed a commit that referenced this pull request Mar 25, 2025
## Current Behavior

Creating new workspaces since Nx 20.6.0 will generate the Nx
configuration in `package.json` files. This is intended, given that it
is part of the new setup using TypeScript Project References and Package
Manager Workspaces, but there's no way to choose to generate the Nx
configuration in `project.json` files. Project generators do allow to
choose but there's no way to do it when creating a new workspace. This
forces users who want to use `project.json` files to generate an empty
workspace and then use a project generator.

## Expected Behavior

When creating a new Nx workspace, users can provide an option
(`--use-project-json`) to generate the Nx configuration in
`project.json` files.

## Related Issue(s)

Fixes #30464

(cherry picked from commit cfe32c2)
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.

Project.json not created for new projects (v20.6.2)
2 participants