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): keep refs to ignored files and allow opting out of pruning stale refs in typescript sync generator #27636

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Aug 26, 2024

Current Behavior

When the @nx/js:typescript-sync generator updates a tsconfig file of an Nx project, it prunes project references pointing to a path that's not part of the Nx project files (including paths inside a nested project) if they don't belong to a project that is a dependency.

Expected Behavior

When the @nx/js:typescript-sync generator updates a tsconfig file of an Nx project, it should only prune project references pointing to a path that's not part of the Nx project files if it's not ignored and not part of a dependency.

Additionally, a new nx.sync.ignoredReferences top-level option in tsconfig files allows specifying custom project references that the @nx/js:typescript-sync sync generator should ignore and not prune.

Related Issue(s)

Fixes #

@leosvelperez leosvelperez self-assigned this Aug 26, 2024
@leosvelperez leosvelperez requested a review from a team as a code owner August 26, 2024 14:22
@leosvelperez leosvelperez requested a review from mandarini August 26, 2024 14:22
Copy link

vercel bot commented Aug 26, 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 Sep 10, 2024 10:28am

@leosvelperez leosvelperez requested review from JamesHenry and FrozenPandaz and removed request for mandarini August 29, 2024 07:04
@leosvelperez leosvelperez force-pushed the js/ts-sync-external-refs branch from d5290f8 to 285239e Compare September 3, 2024 07:52
Copy link
Collaborator

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments on the test file

@JamesHenry JamesHenry merged commit 2a3307c into master Sep 10, 2024
6 checks passed
@JamesHenry JamesHenry deleted the js/ts-sync-external-refs branch September 10, 2024 16:46
FrozenPandaz pushed a commit that referenced this pull request Sep 12, 2024
…tale refs in typescript sync generator (#27636)

(cherry picked from commit 2a3307c)
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 Sep 16, 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.

3 participants