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(misc): use the ts sync generator with other bundler tasks #29170

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Dec 3, 2024

Current Behavior

Only targets using tsc trigger the @nx/js:typescript-sync generator to run.

Expected Behavior

Generating projects with other bundlers should also infer the @nx/js:typescript-sync generator in their relevant targets.

Related Issue(s)

Fixes #

@leosvelperez leosvelperez self-assigned this Dec 3, 2024
Copy link

vercel bot commented Dec 3, 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 Dec 5, 2024 3:38pm

@leosvelperez leosvelperez force-pushed the misc/infer-sync-generator-other-bundlers branch from 810b273 to 1e53df3 Compare December 4, 2024 10:24
@leosvelperez leosvelperez marked this pull request as ready for review December 4, 2024 10:25
@leosvelperez leosvelperez requested a review from a team as a code owner December 4, 2024 10:25
@@ -38,7 +38,9 @@ export interface VitePluginOptions {
type ViteTargets = Pick<ProjectConfiguration, 'targets' | 'metadata'>;

function readTargetsCache(cachePath: string): Record<string, ViteTargets> {
return existsSync(cachePath) ? readJsonFile(cachePath) : {};
return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && existsSync(cachePath)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we should update the other plugins to follow this as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, some plugins have this. Others don't, but they should all have it.

@leosvelperez leosvelperez added the PR status: do not merge This will block a PR from being merged until this tag is removed. label Dec 4, 2024
@leosvelperez leosvelperez force-pushed the misc/infer-sync-generator-other-bundlers branch from 1e53df3 to 279a167 Compare December 5, 2024 15:36
@leosvelperez leosvelperez removed the PR status: do not merge This will block a PR from being merged until this tag is removed. label Dec 5, 2024
@leosvelperez leosvelperez changed the title fix(misc): use the ts sync generator with other bundlers fix(misc): use the ts sync generator with other bundler tasks Dec 5, 2024
@leosvelperez leosvelperez enabled auto-merge (squash) December 5, 2024 16:20
@leosvelperez leosvelperez merged commit e9a07da into master Dec 5, 2024
6 of 7 checks passed
@leosvelperez leosvelperez deleted the misc/infer-sync-generator-other-bundlers branch December 5, 2024 16:42
bcabanes pushed a commit to bcabanes/nx that referenced this pull request Dec 5, 2024
…9170)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

Only targets using `tsc` trigger the `@nx/js:typescript-sync` generator
to run.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Generating projects with other bundlers should also infer the
`@nx/js:typescript-sync` generator in their relevant targets.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
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 Dec 19, 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