nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.75k stars 2.37k forks source link

fix(js): only add typescript project references for explicit dependencies in sync generator #28998

Open cogwirrel opened 2 days ago

cogwirrel commented 2 days ago

This change omits references to implicit dependency tsconfigs for typescript projects in the sync generator, since given that they are not referenced directly in code there is no need for project references.

Current Behavior

TypeScript sync generator adds references to any dependency project which has a tsconfig (where composite is true), including implicit dependencies where these references are unnecessary and can potentially cause build failures.

See example repo.

Expected Behavior

Only explicit dependencies should be referenced in tsconfigs.

Related Issue(s)

Fixes #28997

vercel[bot] commented 2 days ago

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

1 Skipped Deployment | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **nx-dev** | ⬜️ Ignored ([Inspect](https://vercel.com/nrwl/nx-dev/FegtQLtsz7o4CmkZyHP5JZqBJBzF)) | [Visit Preview](https://nx-dev-git-fork-cogwirrel-fix-sync-generator-implicit-deps-nrwl.vercel.app) | Nov 19, 2024 11:15pm |
nx-cloud[bot] commented 2 days ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit f17b45921e38f9b65c3b88bfbca85520c5df84c6. 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


🟥 Failed Commands
nx affected --targets=lint,test,build,e2e,e2e-ci --base=636cd77002acf26a25e777fe7c1160923eb92398 --head=f17b45921e38f9b65c3b88bfbca85520c5df84c6 --parallel=3
✅ Successfully ran 3 targets - [`nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte`](https://staging.nx.app/runs/HwDQh0VTEF?utm_source=pull-request&utm_medium=comment) - [`nx-cloud record -- nx format:check --base=636cd77002acf26a25e777fe7c1160923eb92398 --head=f17b45921e38f9b65c3b88bfbca85520c5df84c6`](https://staging.nx.app/runs/s10sIdPfC6?utm_source=pull-request&utm_medium=comment) - [`nx documentation --no-dte`](https://staging.nx.app/runs/ETSU6TZuW0?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.