-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(js): remove nx property from generated package.json files #29705
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
7836fb2
to
8ae3480
Compare
View your CI Pipeline Execution ↗ for commit 2a402a9.
☁️ Nx Cloud last updated this comment at |
79c94ef
to
59b78b0
Compare
…+ skip writing empty nx property to pacakge.json for non-root projects (#29707) This PR is a prerequisite to removing `nx` property from `package.json` files in the new TS setup. It fixes two issues: 1. We always write `nx` property in `package.json` even if it is empty. This should be done for root projects. 2. Adding an entry to `pnpm-workspace.yaml` is not picked up because `readProjectConfiguration` only reads the file from disk, not from virtual `Tree` This is the next PR to remove the property: #29705
28d2a6c
to
bc2a0dd
Compare
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx create-nx-workspace@0.0.0-pr-29705-bc2a0dd my-workspace Or just copy this version and use it in your own command: 0.0.0-pr-29705-bc2a0dd
To request a new release for this pull request, mention someone from the Nx team or the |
bc2a0dd
to
f0047ae
Compare
f0047ae
to
055af63
Compare
055af63
to
2a402a9
Compare
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx create-nx-workspace@0.0.0-pr-29705-2a402a9 my-workspace Or just copy this version and use it in your own command: 0.0.0-pr-29705-2a402a9
To request a new release for this pull request, mention someone from the Nx team or the |
This PR updates our generators to no longer generate with
nx
inpackage.json
by default. The only times it is needed is if you pass addtags
orimplicitDependencies
to the project config.This PR replaces our
projectType
checks to use thegetProjectType
util from@nx/js
to prefer the project config, but otherwise will check for our conventions (e.g. usingexports
for libs,tsconfig.lib.json
vstsconfig.app.json
).Impact
projectType
,name
, etc. in withproject.json
orpackage.json
(vianx
property).nx
property will no longer be there. Generators with logic that depend onprojectType
will now check fortsconfig.lib.json
andtsconfig.app.json
(so all of our generators are covered). If none of those tsconfig files are found, then we checkpackage.json
, since libraries are required to haveexports
to be consumed.