credentials
credentials copied to clipboard
chore(deps): update react monorepo (major)
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
eslint-plugin-react-hooks (source) | 1.7.0 -> 4.6.0 |
||||
react (source) | 16.14.0 -> 18.2.0 |
||||
react-dom (source) | 16.14.0 -> 18.2.0 |
Release Notes
facebook/react (eslint-plugin-react-hooks)
v4.6.0
v4.5.0
v4.4.0
- No changes, this was an automated release together with React 18.
v4.3.0
- Support ESLint 8. (@MichaelDeBoey in #22248)
- Fix a crash with an empty effect. (@ChrisRu in #20385)
- Improve the error message. (@callmetwan in #20692)
- Handle optional chained methods as dependency. (@AriPerkkio in #20247)
- Assume the new
useTransition
signature in the rule. (@rickhanlonii in #20976)
v4.2.0
- No changes, this was an automated release together with React 17.
v4.1.2
v4.1.1
- Improve support for optional chaining. (@pfongkye in #19680)
- Fix a false positive warning for TypeScript parameters. (@NeoRaider in #19751)
v4.1.0
- New Violations: Warn when dependencies change on every render. (@captbaritone in #19590)
v4.0.8
v4.0.7
v4.0.6
v4.0.5
- Fix a crash when the dependency array has an empty element. (@yeonjuan in #19145)
- Fix a false positive warning that occurs with optional chaining. (@fredvollmer in #19061)
v4.0.4
- Fix a false positive warning that occurs with optional chaining. (@fredvollmer in #19061)
- Support nullish coalescing and optional chaining. (@yanneves in #19008)
v4.0.3
- Remove the heuristic that checks all Hooks ending with
Effect
due to too many false positives. (@gaearon in #19004)
v4.0.2
- Prevent Hooks that have
Effect
in the middle from being considered effects. (@surgeboris in #18907)
v4.0.1
- Declare support for ESLint 7. (@MichaelDeBoey in #18878)
v4.0.0
-
New Violations: Consider
PascalCase.useFoo()
calls as Hooks. (@cyan33 in #18722) - New Violations: Check callback body when it's not written inline. (@gaearon in #18435)
-
New Violations: Check dependencies for all Hooks ending with
Effect
. (@airjp73 in #18580) - Add a way to enable the dangerous autofix. (@gaearon in #18437)
- Offer a more sensible suggestion when encountering an assignment. (@Zzzen in #16784)
- Consider TypeScript casts of
useRef
as constant. (@sophiebits in #18496) - Add documentation. (@ghmcadams in #16607)
v3.0.0
- New Violations: Forbid calling Hooks from classes. (@ianobermiller in #18341)
- Add a recommended config. (@SimenB in #14762)
v2.5.0
- Fix a misleading error message in loops. (@M-Izadmehr in #16853)
v2.4.0
-
New Violations: Run checks for functions passed to
forwardRef
. (@dprgarner in #17255) -
New Violations: Check for ref usage in any Hook containing the word
Effect
. (@gaearon in #17663) - Disable dangerous autofix and use ESLint Suggestions API instead. (@wdoug in #17385)
v2.0.0
- New Violations: Forbid calling Hooks at the top level. (@gaearon in #16455)
- Fix a crash when referencing arguments in arrow functions. (@hristo-kanchev in #16356)
facebook/react (react)
v18.2.0
React DOM
- Provide a component stack as a second argument to
onRecoverableError
. (@gnoff in #24591) - Fix hydrating into
document
causing a blank page on mismatch. (@gnoff in #24523) - Fix false positive hydration errors with Suspense. (@gnoff in #24480 and @acdlite in #24532)
- Fix ignored
setState
in Safari when adding an iframe. (@gaearon in #24459)
React DOM Server
- Pass information about server errors to the client. (@salazarm and @gnoff in #24551 and #24591)
- Allow to provide a reason when aborting the HTML stream. (@gnoff in #24680)
- Eliminate extraneous text separators in the HTML where possible. (@gnoff in #24630)
- Disallow complex children inside
<title>
elements to match the browser constraints. (@gnoff in #24679) - Fix buffering in some worker environments by explicitly setting
highWaterMark
to0
. (@jplhomer in #24641)
Server Components (Experimental)
v18.1.0
React DOM
- Fix the false positive warning about
react-dom/client
when using UMD bundle. (@alireza-molaee in #24274) - Fix
suppressHydrationWarning
to work in production too. (@gaearon in #24271) - Fix
componentWillUnmount
firing twice inside of Suspense. (@acdlite in #24308) - Fix some transition updates being ignored. (@acdlite in #24353)
- Fix
useDeferredValue
causing an infinite loop when passed an unmemoized value. (@acdlite in #24247) - Fix throttling of revealing Suspense fallbacks. (@sunderls in #24253)
- Fix an inconsistency in whether the props object is the same between renders. (@Andarist and @acdlite in #24421)
- Fix a missing warning about a
setState
loop inuseEffect
. (@gaearon in #24298) - Fix a spurious hydration error. (@gnoff in #24404)
- Warn when calling
setState
inuseInsertionEffect
. (@gaearon in #24295) - Ensure the reason for hydration errors is always displayed. (@gaearon in #24276)
React DOM Server
- Fix escaping for the
bootstrapScriptContent
contents. (@gnoff in #24385) - Significantly improve performance of
renderToPipeableStream
. (@gnoff in #24291)
ESLint Plugin: React Hooks
- Fix false positive errors with a large number of branches. (@scyron6 in #24287)
- Don't consider a known dependency stable when the variable is reassigned. (@afzalsayed96 in #24343)
Use Subscription
v18.0.0
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
anduseTransition
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 foruseEffect
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 torender
orunmount
. Use it instead ofReactDOM.render
. New features in React 18 don't work without it. -
hydrateRoot
: New method to hydrate a server rendered application. Use it instead ofReactDOM.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.
v17.0.2
React DOM
- Remove an unused dependency to address the
SharedArrayBuffer
cross-origin isolation warning. (@koba04 and @bvaughn in #20831, #20832, and #20840)
v17.0.1
React DOM
v17.0.0
Today, we are releasing React 17!
Learn more about React 17 and how to update to it on the official React blog.
React
- Add
react/jsx-runtime
andreact/jsx-dev-runtime
for the new JSX transform. (@lunaruan in #18299) - Build component stacks from native error frames. (@sebmarkbage in #18561)
- Allow to specify
displayName
on context for improved stacks. (@eps1lon in #18224) - Prevent
'use strict'
from leaking in the UMD bundles. (@koba04 in #19614) - Stop using
fb.me
for redirects. (@cylim in #19598)
React DOM
- Delegate events to roots instead of
document
. (@trueadm in #18195 and others) - Clean up all effects before running any next effects. (@bvaughn in #17947)
- Run
useEffect
cleanup functions asynchronously. (@bvaughn in #17925) - Use browser
focusin
andfocusout
foronFocus
andonBlur
. (@trueadm in #19186) - Make all
Capture
events use the browser capture phase. (@trueadm in #19221) - Don't emulate bubbling of the
onScroll
event. (@gaearon in #19464) - Throw if
forwardRef
ormemo
component returnsundefined
. (@gaearon in #19550) - Remove event pooling. (@trueadm in #18969)
- Stop exposing internals that won’t be needed by React Native Web. (@necolas in #18483)
- Attach all known event listeners when the root mounts. (@gaearon in #19659)
- Disable
console
in the second render pass of DEV mode double render. (@sebmarkbage in #18547) - Deprecate the undocumented and misleading
ReactTestUtils.SimulateNative
API. (@gaearon in #13407) - Rename private field names used in the internals. (@gaearon in #18377)
- Don't call User Timing API in development. (@gaearon in #18417)
- Disable console during the repeated render in Strict Mode. (@sebmarkbage in #18547)
- In Strict Mode, double-render components without Hooks too. (@eps1lon in #18430)
- Allow calling
ReactDOM.flushSync
during lifecycle methods (but warn). (@sebmarkbage in #18759) - Add the
code
property to the keyboard event objects. (@bl00mber in #18287) - Add the
disableRemotePlayback
property forvideo
elements. (@tombrowndev in #18619) - Add the
enterKeyHint
property forinput
elements. (@eps1lon in #18634) - Warn when no
value
is provided to<Context.Provider>
. (@charlie1404 in #19054) - Warn when
memo
orforwardRef
components returnundefined
. (@bvaughn in #19550) - Improve the error message for invalid updates. (@JoviDeCroock in #18316)
- Exclude forwardRef and memo from stack frames. (@sebmarkbage in #18559)
- Improve the error message when switching between controlled and uncontrolled inputs. (@vcarl in #17070)
- Keep
onTouchStart
,onTouchMove
, andonWheel
passive. (@gaearon in #19654) - Fix
setState
hanging in development inside a closed iframe. (@gaearon in #19220) - Fix rendering bailout for lazy components with
defaultProps
. (@jddxf in #18539) - Fix a false positive warning when
dangerouslySetInnerHTML
isundefined
. (@eps1lon in #18676) - Fix Test Utils with non-standard
require
implementation. (@just-boris in #18632) - Fix
onBeforeInput
reporting an incorrectevent.type
. (@eps1lon in #19561) - Fix
event.relatedTarget
reported asundefined
in Firefox. (@claytercek in #19607) - Fix "unspecified error" in IE11. (@hemakshis in #19664)
- Fix rendering into a shadow root. (@Jack-Works in #15894)
- Fix
movementX/Y
polyfill with capture events. (@gaearon in #19672) - Use delegation for
onSubmit
andonReset
events. (@gaearon in #19333) - Improve memory usage. (@trueadm in #18970)
React DOM Server
- Make
useCallback
behavior consistent withuseMemo
for the server renderer. (@alexmckenley in #18783) - Fix state leaking when a function component throws. (@pmaccart in #19212)
React Test Renderer
- Improve
findByType
error message. (@henryqdineen in #17439)
Concurrent Mode (Experimental)
- Revamp the priority batching heuristics. (@acdlite in #18796)
- Add the
unstable_
prefix before the experimental APIs. (@acdlite in #18825) - Remove
unstable_discreteUpdates
andunstable_flushDiscreteUpdates
. (@trueadm in #18825) - Remove the
timeoutMs
argument. (@acdlite in #19703) - Disable
<div hidden />
prerendering in favor of a different future API. (@acdlite in #18917) - Add
unstable_expectedLoadTime
to Suspense for CPU-bound trees. (@acdlite in #19936) - Add an experimental
unstable_useOpaqueIdentifier
Hook. (@lunaruan in #17322) - Add an experimental
unstable_startTransition
API. (@rickhanlonii in #19696) - Using
act
in the test renderer no longer flushes Suspense fallbacks. (@acdlite in #18596) - Use global render timeout for CPU Suspense. (@sebmarkbage in #19643)
- Clear the existing root content before mounting. (@bvaughn in #18730)
- Fix a bug with error boundaries. (@acdlite in #18265)
- Fix a bug causing dropped updates in a suspended tree. (@acdlite in #18384 and #18457)
- Fix a bug causing dropped render phase updates. (@acdlite in #18537)
- Fix a bug in SuspenseList. (@sebmarkbage in #18412)
- Fix a bug causing Suspense fallback to show too early. (@acdlite in #18411)
- Fix a bug with class components inside SuspenseList. (@sebmarkbage in #18448)
- Fix a bug with inputs that may cause updates to be dropped. (@jddxf in #18515 and @acdlite in #18535)
- Fix a bug causing Suspense fallback to get stuck. (@acdlite in #18663)
- Don't cut off the tail of a SuspenseList if hydrating. (@sebmarkbage in #18854)
- Fix a bug in
useMutableSource
that may happen whengetSnapshot
changes. (@bvaughn in #18297) - Fix a tearing bug in
useMutableSource
. (@bvaughn in #18912) - Warn if calling setState outside of render but before commit. (@sebmarkbage in #18838)
Configuration
📅 Schedule: Branch creation - "before 6am every weekday" (UTC), 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
May be blocked until we tackle https://openedx.atlassian.net/browse/MICROBA-874
Opened https://openedx.atlassian.net/browse/MICROBA-1125 to try and schedule this upgrade, noting that it may be blocked by MICROBA-874 (as Christie pointed out).
⚠ 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/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"18.2.0" from the root project
npm ERR! peer react@">=16.x" from @fortawesome/[email protected]
npm ERR! node_modules/@fortawesome/react-fontawesome
npm ERR! @fortawesome/react-fontawesome@"^0.1.18" from @edx/[email protected]
npm ERR! node_modules/@edx/paragon
npm ERR! @edx/paragon@"19.19.1" from the root project
npm ERR! 18 more (@restart/context, @restart/hooks, prop-types-extra, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.6" from @edx/[email protected]
npm ERR! node_modules/@edx/paragon
npm ERR! @edx/paragon@"19.19.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@"^16.8.6" from @edx/[email protected]
npm ERR! node_modules/@edx/paragon
npm ERR! @edx/paragon@"19.19.1" 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! See /tmp/renovate-cache/others/npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/renovate-cache/others/npm/_logs/2022-11-30T13_03_04_724Z-debug-0.log
Closing this PR. We are going to stay at React v.16.14.x until there is a larger effort to upgrade React across the rest of the Open edX services. I have also closed the JIRA ticket that went along with this upgrade (now named APER-874).
Renovate Ignore Notification
Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 18.x releases. But if you manually upgrade to 18.x then Renovate will re-enable minor
and patch
updates automatically.
If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.