chore(react): upgrade to v19 - #4616
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ShaneK
left a comment
There was a problem hiding this comment.
Looks good to me, I just had some suggestions
| <div | ||
| id={SkipToContentFallbackId} | ||
| className={clsx(ThemeClassNames.wrapper.main, styles.mainWrapper, wrapperClassName)} | ||
| className={clsx( |
There was a problem hiding this comment.
The README in this folder says swizzled components should go in the prettier ignore so they stay diffable against upstream, but only DocItem and DocRoot actually made it in there. So this file gets reformatted to repo style, which I think is most of the reason these three had to be hand-transcribed from upstream instead of applied as a patch. Telling that DocItem/Layout is the one that kept upstream formatting and also the one that needed no work this time.
Might be worth adding the rest of the swizzle dirs to .prettierignore so the next Docusaurus bump is closer to a mechanical diff. Follow-up though, definitely not this PR.
Issue URL: internal
What is the current behavior?
The site runs React 18.2 and Docusaurus 3.7.0. Several things block or complicate a React 19 upgrade:
npm cireports an unmet React peer dependency.@docusaurus/plugin-debug@3.7.0pinsreact-json-view-lite: ^1.2.0, and no 1.x release of that package supports React 19.@prismicio/react@2declarespeerDependencies: { react: "^18" }, which makesnpm installfail with ERESOLVE on React 19.@tippyjs/react, unmaintained since April 2022. It readschildren.ref, which React 19 removed, logging "Accessing element.ref was removed in React 19" on pages with playgrounds.react-helmet-asyncto the upstream package even though@docusaurus/typesdeclares thenpm:@slorber/react-helmet-asyncalias. Only that fork supports React 19, so this has been installing the wrong package since the 3.7 upgrade.What is the new behavior?
React 19.2.8 and Docusaurus 3.10.2, with
npm cirunning clean and zero React peer violations across the tree.React 19
react,react-domto 19.2.8 and@types/reactto 19@prismicio/reactto 3 and@prismicio/clientto 7, which renamesgetEndpointtogetRepositoryEndpoint@tippyjs/reactwith@floating-ui/react(maintained by Tippy's own author) behind a sharedTooltipcomponentreact-helmet-asynclockfile entry to the aliased forkJSXnamespace (JSX.ElementtoReactNode, custom elements declared via module augmentation) andReactElementprops defaulting tounknownDocusaurus 3.10.2
@docusaurus/*packages bumped together so the family stays on one version. This bringsreact-json-view-liteto 2.5.0 and clears the last peer warning.Layout(removeduseKeyboardNavigation, addedThemeClassNames.layout.main.container),EditMetaRow(upstreamnoPrintso the edit link is hidden when printing), andLocaleDropdownNavbarItem(upstreamuseLocaleDropdownUtilsrefactor)onBrokenMarkdownLinkstomarkdown.hooks.onBrokenMarkdownLinks_search.scssto DocSearch v4, which appliesall: unsetto the search button and therefore discards the ambientbox-sizing, plus restyles the border, background variable, and shortcut keysPlaygroundTabsits ownTabItem, since@theme/TabItemnow requires Docusaurus's tabs context and threw "useTabsContext() must be used within a Tabs component" on component pagesDoes this introduce a breaking change?
Other information
Preview