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(deps): update react monorepo to v18 (major) #528

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 20, 2021

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react (source) ^17.0.2 -> ^18.0.0 age adoption passing confidence
react-dom (source) ^17.0.2 -> ^18.0.0 age adoption passing confidence

Release Notes

facebook/react (react)

v18.3.1

Compare Source

v18.3.0

Compare Source

v18.2.0

Compare Source

React DOM
React DOM Server
Server Components (Experimental)

v18.1.0

Compare Source

React DOM
React DOM Server
ESLint Plugin: React Hooks
Use Subscription

v18.0.0

Compare Source

Below is a list of all new features, APIs, deprecations, and breaking changes.
Read React 18 release post and React 18 upgrade guide for more information.

New Features
React
  • useId is a new hook for generating unique IDs on both the client and server, while avoiding hydration mismatches. It is primarily useful for component libraries integrating with accessibility APIs that require unique IDs. This solves an issue that already exists in React 17 and below, but it’s even more important in React 18 because of how the new streaming server renderer delivers HTML out-of-order.
  • startTransition and useTransition let you mark some state updates as not urgent. Other state updates are considered urgent by default. React will allow urgent state updates (for example, updating a text input) to interrupt non-urgent state updates (for example, rendering a list of search results).
  • useDeferredValue lets you defer re-rendering a non-urgent part of the tree. It is similar to debouncing, but has a few advantages compared to it. There is no fixed time delay, so React will attempt the deferred render right after the first render is reflected on the screen. The deferred render is interruptible and doesn't block user input.
  • useSyncExternalStore is a new hook that allows external stores to support concurrent reads by forcing updates to the store to be synchronous. It removes the need for useEffect when implementing subscriptions to external data sources, and is recommended for any library that integrates with state external to React.
  • useInsertionEffect is a new hook that allows CSS-in-JS libraries to address performance issues of injecting styles in render. Unless you’ve already built a CSS-in-JS library we don’t expect you to ever use this. This hook will run after the DOM is mutated, but before layout effects read the new layout. This solves an issue that already exists in React 17 and below, but is even more important in React 18 because React yields to the browser during concurrent rendering, giving it a chance to recalculate layout.
React DOM Client

These new APIs are now exported from react-dom/client:

  • createRoot: New method to create a root to render or unmount. Use it instead of ReactDOM.render. New features in React 18 don't work without it.
  • hydrateRoot: New method to hydrate a server rendered application. Use it instead of ReactDOM.hydrate in conjunction with the new React DOM Server APIs. New features in React 18 don't work without it.

Both createRoot and hydrateRoot accept a new option called onRecoverableError in case you want to be notified when React recovers from errors during rendering or hydration for logging. By default, React will use reportError, or console.error in the older browsers.

React DOM Server

These new APIs are now exported from react-dom/server and have full support for streaming Suspense on the server:

  • renderToPipeableStream: for streaming in Node environments.
  • renderToReadableStream: for modern edge runtime environments, such as Deno and Cloudflare workers.

The existing renderToString method keeps working but is discouraged.

facebook/react (react-dom)

v18.3.1

Compare Source

v18.3.0

Compare Source

v18.2.0

Compare Source

React DOM
React DOM Server
Server Components (Experimental)

v18.1.0

Compare Source

React DOM
React DOM Server
ESLint Plugin: React Hooks
Use Subscription

v18.0.0

Compare Source

Below is a list of all new features, APIs, deprecations, and breaking changes.
Read React 18 release post and React 18 upgrade guide for more information.

New Features
React
  • useId is a new hook for generating unique IDs on both the client and server, while avoiding hydration mismatches. It is primarily useful for component libraries integrating with accessibility APIs that require unique IDs. This solves an issue that already exists in React 17 and below, but it’s even more important in React 18 because of how the new streaming server renderer delivers HTML out-of-order.
  • startTransition and useTransition let you mark some state updates as not urgent. Other state updates are considered urgent by default. React will allow urgent state updates (for example, updating a text input) to interrupt non-urgent state updates (for example, rendering a list of search results).
  • useDeferredValue lets you defer re-rendering a non-urgent part of the tree. It is similar to debouncing, but has a few advantages compared to it. There is no fixed time delay, so React will attempt the deferred render right after the first render is reflected on the screen. The deferred render is interruptible and doesn't block user input.
  • useSyncExternalStore is a new hook that allows external stores to support concurrent reads by forcing updates to the store to be synchronous. It removes the need for useEffect when implementing subscriptions to external data sources, and is recommended for any library that integrates with state external to React.
  • useInsertionEffect is a new hook that allows CSS-in-JS libraries to address performance issues of injecting styles in render. Unless you’ve already built a CSS-in-JS library we don’t expect you to ever use this. This hook will run after the DOM is mutated, but before layout effects read the new layout. This solves an issue that already exists in React 17 and below, but is even more important in React 18 because React yields to the browser during concurrent rendering, giving it a chance to recalculate layout.
React DOM Client

These new APIs are now exported from react-dom/client:

  • createRoot: New method to create a root to render or unmount. Use it instead of ReactDOM.render. New features in React 18 don't work without it.
  • hydrateRoot: New method to hydrate a server rendered application. Use it instead of ReactDOM.hydrate in conjunction with the new React DOM Server APIs. New features in React 18 don't work without it.

Both createRoot and hydrateRoot accept a new option called onRecoverableError in case you want to be notified when React recovers from errors during rendering or hydration for logging. By default, React will use reportError, or console.error in the older browsers.

React DOM Server

These new APIs are now exported from react-dom/server and have full support for streaming Suspense on the server:

  • renderToPipeableStream: for streaming in Node environments.
  • renderToReadableStream: for modern edge runtime environments, such as Deno and Cloudflare workers.

The existing renderToString method keeps working but is discouraged.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from b627003 to 5caac4e Compare December 4, 2021 06:22
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 5caac4e to a74fd00 Compare January 1, 2022 09:07
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from a74fd00 to e95f593 Compare March 5, 2022 08:57
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from e95f593 to 4f6d41c Compare April 2, 2022 05:58
@renovate renovate bot changed the title fix(deps): update react monorepo to v17 (major) fix(deps): update react monorepo to v18 (major) Apr 2, 2022
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from c2aedad to 0e1ea34 Compare April 9, 2022 04:15
@renovate
Copy link
Contributor Author

renovate bot commented Apr 9, 2022

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @edx/frontend-component-footer@13.0.2
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR!   peer react@"^16.6.0 || 17 || 18" from react-intl@6.5.5
npm ERR!   node_modules/@edx/frontend-platform/node_modules/react-intl
npm ERR!     react-intl@"6.5.5" from @edx/frontend-platform@7.1.0
npm ERR!     node_modules/@edx/frontend-platform
npm ERR!       @edx/frontend-platform@"7.1.0" from the root project
npm ERR!       2 more (@edx/frontend-component-footer, @edx/frontend-component-header)
npm ERR!   32 more (@fortawesome/react-fontawesome, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@13.0.2
npm ERR! node_modules/@edx/frontend-component-footer
npm ERR!   @edx/frontend-component-footer@"13.0.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR!   peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@13.0.2
npm ERR!   node_modules/@edx/frontend-component-footer
npm ERR!     @edx/frontend-component-footer@"13.0.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/renovate/cache/others/npm/_logs/2024-04-11T16_08_43_759Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-04-11T16_08_43_759Z-debug-0.log

@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 0e1ea34 to b1ec99b Compare April 16, 2022 05:22
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from b1168d4 to b6fd8a9 Compare May 7, 2022 04:09
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from b6fd8a9 to 250a6f4 Compare May 8, 2022 21:25
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 250a6f4 to 9a973e6 Compare May 21, 2022 04:09
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 9a973e6 to 4cd3f4d Compare June 4, 2022 04:44
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 4cd3f4d to 27b068c Compare June 18, 2022 05:30
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from dc6c472 to db7d22f Compare August 28, 2022 21:57
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from f600f41 to 1257139 Compare September 15, 2022 15:37
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 3b5a3d8 to 2f5e74e Compare September 18, 2022 17:01
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 3 times, most recently from 85fae27 to 06ebf5b Compare October 14, 2022 22:47
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 06ebf5b to 0f97031 Compare October 17, 2022 15:30
@pshiu pshiu requested a review from a team as a code owner October 17, 2022 17:55
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 0f97031 to 99fbdf9 Compare October 17, 2022 20:45
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 822a137 to 702a0bf Compare November 1, 2022 14:11
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 9dc785b to 72f0678 Compare August 22, 2023 14:23
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 2b48447 to 2c0134c Compare August 30, 2023 17:58
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 62f2729 to f551d2a Compare September 12, 2023 11:20
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from e5b5c73 to 5d8adf5 Compare September 19, 2023 14:53
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 8691ae9 to bf30a2e Compare October 18, 2023 07:22
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from bf30a2e to edc608f Compare October 26, 2023 15:20
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from c295b29 to 7d34ffd Compare December 7, 2023 13:20
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 3 times, most recently from e2a778e to 98de2ec Compare February 15, 2024 16:23
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 3 times, most recently from 03f744b to c09614e Compare February 20, 2024 17:26
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from c09614e to bb86407 Compare February 27, 2024 22:16
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from bb86407 to 5b2fc6c Compare March 11, 2024 10:54
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 4 times, most recently from 2e5381f to 323766e Compare March 27, 2024 12:34
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 76761cf to ffb24f4 Compare April 11, 2024 16:08
Copy link
Contributor Author

renovate bot commented May 16, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @edx/frontend-component-footer@14.0.10
npm error Found: react@18.3.1
npm error node_modules/react
npm error   react@"^18.0.0" from the root project
npm error   peer react@"^16.6.0 || 17 || 18" from react-intl@6.6.5
npm error   node_modules/@edx/frontend-platform/node_modules/react-intl
npm error     react-intl@"6.6.5" from @edx/frontend-platform@7.1.4
npm error     node_modules/@edx/frontend-platform
npm error       @edx/frontend-platform@"^7.1.0" from the root project
npm error       2 more (@edx/frontend-component-footer, @edx/frontend-component-header)
npm error   32 more (@fortawesome/react-fontawesome, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@14.0.10
npm error node_modules/@edx/frontend-component-footer
npm error   @edx/frontend-component-footer@"^14.0.0" from the root project
npm error
npm error Conflicting peer dependency: react@17.0.2
npm error node_modules/react
npm error   peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@14.0.10
npm error   node_modules/@edx/frontend-component-footer
npm error     @edx/frontend-component-footer@"^14.0.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /tmp/renovate/cache/others/npm/_logs/2024-09-19T15_57_35_379Z-eresolve-report.txt
npm error A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-09-19T15_57_35_379Z-debug-0.log

@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from ffb24f4 to 2b6faf1 Compare May 16, 2024 19:33
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 2b6faf1 to 1edb78b Compare September 19, 2024 15:57
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.

0 participants