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

feat(react): add support for React 19 for new Workspaces #29286

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Dec 10, 2024

Current Behavior

We currently have no support for React 19, generating only React 18 applications.

Expected Behavior

Add utils to determine what version of React is installed in the workspace.
If React 18 is the main version of react installed, continue to generate React 18 projects.
If React 19 is the main version of react installed, generate React 19 projects.
If no React version is installed or can be determined, generate React 19 projects.

@Coly010 Coly010 requested review from a team as code owners December 10, 2024 11:25
@Coly010 Coly010 requested a review from leosvelperez December 10, 2024 11:25
@Coly010 Coly010 self-assigned this Dec 10, 2024
@Coly010 Coly010 requested a review from jaysoo December 10, 2024 11:25
Copy link

vercel bot commented Dec 10, 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 Jan 10, 2025 11:55am

Copy link

nx-cloud bot commented Dec 10, 2024

View your CI Pipeline Execution ↗ for commit 3a49476.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 9m 26s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 32s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base=cbfc6... ✅ Succeeded 3s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation --no-dte ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-10 12:06:22 UTC

@gperdomor
Copy link
Contributor

@Coly010 how this affects Next apps?...

@Coly010
Copy link
Contributor Author

Coly010 commented Dec 10, 2024

Blocked until Unit Testing solution is ready

@Coly010 Coly010 force-pushed the react/version-19-support branch from 39a45a3 to a531760 Compare December 10, 2024 20:38
@beaussan
Copy link
Contributor

I see that this pr introduce a create graph async during a generator, this is already causing issues regarding eslint (see #27849), can we envision a generator parameter to explicitly say the version of react to expect?

Otherwise, every generator that are built on top of this will have their test and run go way slower due to creating a fresh graph

@Coly010 Coly010 force-pushed the react/version-19-support branch from a531760 to a015576 Compare January 6, 2025 11:02
@Coly010 Coly010 force-pushed the react/version-19-support branch from a015576 to 5164a7b Compare January 6, 2025 15:55
@Coly010 Coly010 force-pushed the react/version-19-support branch 5 times, most recently from a3d9891 to 2eaf48b Compare January 8, 2025 13:21
@gperdomor
Copy link
Contributor

@Coly010 can you add vitest support to next app generator too? 🙏🏻

@Coly010 Coly010 force-pushed the react/version-19-support branch from dc47dfd to ee443c6 Compare January 8, 2025 18:53
Copy link

github-actions bot commented Jan 9, 2025

🐳 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-29286-735af1e
Release details 📑
Published version 0.0.0-pr-29286-735af1e
Triggered by @Coly010
Branch react/version-19-support
Commit 735af1e
Workflow run 12689673907

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

@Coly010 Coly010 force-pushed the react/version-19-support branch from 9abc978 to 3a49476 Compare January 10, 2025 11:51
@ndcunningham
Copy link
Contributor

@Coly010 you may also want to remove NX_SERVE_STATIC_BUILD_RUNNING from https://github.com/nrwl/nx/blob/master/packages/next/plugins/with-nx.ts#L217-L221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants