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

fix(js): only sync references when composite is true, preserve comments in other parts of file #27530

Merged
merged 9 commits into from
Aug 20, 2024

Conversation

JamesHenry
Copy link
Collaborator

@JamesHenry JamesHenry commented Aug 20, 2024

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 #

Copy link

vercel bot commented Aug 20, 2024

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 Aug 20, 2024 0:04am

Copy link
Collaborator Author

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

@JamesHenry JamesHenry marked this pull request as ready for review August 20, 2024 10:46
@JamesHenry JamesHenry requested a review from a team as a code owner August 20, 2024 10:46
Copy link

🐳 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
Release details 📑
Published version 0.0.0-pr-27530-db566c6
Triggered by @JamesHenry
Branch typescript-sync-fixes
Commit db566c6
Workflow run 10470127576

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

Copy link
Member

@leosvelperez leosvelperez left a 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.

Co-authored-by: Leosvel Pérez Espinosa <[email protected]>
Copy link

🐳 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
Release details 📑
Published version 0.0.0-pr-27530-4059102
Triggered by @JamesHenry
Branch typescript-sync-fixes
Commit 4059102
Workflow run 10470951554

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

@JamesHenry JamesHenry merged commit c22c077 into master Aug 20, 2024
6 checks passed
@JamesHenry JamesHenry deleted the typescript-sync-fixes branch August 20, 2024 13:28
FrozenPandaz pushed a commit that referenced this pull request Aug 21, 2024
…ts in other parts of file (#27530)

(cherry picked from commit c22c077)
Copy link

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 Aug 26, 2024
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