-
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
fix(js): only sync references when composite is true, preserve comments in other parts of file #27530
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit bb0f3ec. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targets
Sent with 💌 from NxCloud. |
packages/js/package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only change here is the addition of jsonc-parser
(which is already a dependency of the nx
package), it just bugged me how badly unsorted these deps where so I am ordered them at the same time
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx [email protected] my-workspace Or just copy this version and use it in your own command: 0.0.0-pr-27530-db566c6
To request a new release for this pull request, mention someone from the Nx team or the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left some minor nits. Feel free to merge it without them.
packages/js/src/generators/typescript-sync/typescript-sync.spec.ts
Outdated
Show resolved
Hide resolved
packages/js/src/generators/typescript-sync/typescript-sync.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Leosvel Pérez Espinosa <[email protected]>
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx [email protected] my-workspace Or just copy this version and use it in your own command: 0.0.0-pr-27530-4059102
To request a new release for this pull request, mention someone from the Nx team or the |
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. |
Current Behavior
During references syncing the experimental (not yet meant for public consumption) typescript plugin nukes the whole tsconfig, meaning user comments are always lost. Additionally, there is no evaluation of config performed, meaning invalid references are created to projects which do not have
composite: true
applied to them (whether directly or through config inheritance via extends).Expected Behavior
We use AST based patching to preserve comments in other parts of the tsconfig files we update, and we only create references to projects with
composite: true
.Related Issue(s)
Fixes #