diff --git a/examples/reproduction-template/package.json b/examples/reproduction-template/package.json
index e46540ae538d74..c8f51d82ac2fb4 100644
--- a/examples/reproduction-template/package.json
+++ b/examples/reproduction-template/package.json
@@ -7,8 +7,8 @@
},
"dependencies": {
"next": "canary",
- "react": "19.0.0-rc-7771d3a7-20240827",
- "react-dom": "19.0.0-rc-7771d3a7-20240827"
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "20.12.12",
diff --git a/package.json b/package.json
index 1402a0e080b8e8..0e2fb1518b5588 100644
--- a/package.json
+++ b/package.json
@@ -206,10 +206,10 @@
"pretty-bytes": "5.3.0",
"pretty-ms": "7.0.0",
"random-seed": "0.3.0",
- "react": "19.0.0-rc-7771d3a7-20240827",
+ "react": "18.3.1",
"react-17": "npm:react@17.0.2",
"react-builtin": "npm:react@19.0.0-rc-7771d3a7-20240827",
- "react-dom": "19.0.0-rc-7771d3a7-20240827",
+ "react-dom": "18.3.1",
"react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@19.0.0-rc-7771d3a7-20240827",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-7771d3a7-20240827",
@@ -269,10 +269,10 @@
"@babel/traverse": "7.22.5",
"@types/react": "npm:types-react@19.0.0-rc.0",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0",
- "react": "19.0.0-rc-7771d3a7-20240827",
- "react-dom": "19.0.0-rc-7771d3a7-20240827",
- "react-is": "19.0.0-rc-7771d3a7-20240827",
- "scheduler": "0.25.0-rc-7771d3a7-20240827"
+ "react": "18.3.1",
+ "react-dom": "18.3.1",
+ "react-is": "18.3.1",
+ "scheduler": "0.23.2"
},
"patchedDependencies": {
"webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch"
diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts
index 8c6e59a5e94ef4..2dfe1bce666f68 100644
--- a/packages/create-next-app/templates/index.ts
+++ b/packages/create-next-app/templates/index.ts
@@ -13,7 +13,7 @@ import { GetTemplateFileArgs, InstallTemplateArgs } from "./types";
// Do not rename or format. sync-react script relies on this line.
// prettier-ignore
-const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827";
+const nextjsReactPeerVersion = "^18.2.0";
/**
* Get the file path for a given file in a template, e.g. "next.config.js".
diff --git a/packages/next/package.json b/packages/next/package.json
index 729c1eabe7d6bd..dbc81affecab0e 100644
--- a/packages/next/package.json
+++ b/packages/next/package.json
@@ -108,8 +108,8 @@
"@opentelemetry/api": "^1.1.0",
"@playwright/test": "^1.41.2",
"babel-plugin-react-compiler": "*",
- "react": "19.0.0-rc-7771d3a7-20240827",
- "react-dom": "19.0.0-rc-7771d3a7-20240827",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
"sass": "^1.3.0"
},
"peerDependenciesMeta": {
diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts
index 9b12bf14ce0bb9..7d8d39e6a59865 100644
--- a/packages/next/src/build/webpack-config.ts
+++ b/packages/next/src/build/webpack-config.ts
@@ -107,8 +107,8 @@ const NEXT_PROJECT_ROOT_DIST_CLIENT = path.join(
'client'
)
-if (parseInt(React.version) < 19) {
- throw new Error('Next.js requires react >= 19.0.0 to be installed.')
+if (parseInt(React.version) !== 18) {
+ throw new Error('Next.js requires react@^18.2.0 to be installed.')
}
export const babelIncludeRegexes: RegExp[] = [
diff --git a/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx b/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx
index 38587213a6f595..74df140a255c3f 100644
--- a/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx
+++ b/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx
@@ -238,7 +238,6 @@ export function Errors({
)
const errorDetails: HydrationErrorState = (error as any).details || {}
- const notes = errorDetails.notes || ''
const [warningTemplate, serverContent, clientContent] =
errorDetails.warning || [null, '', '']
@@ -252,6 +251,7 @@ export function Errors({
.replace(/^Warning: /, '')
.replace(/^Error: /, '')
: null
+ const notes = isAppDir ? errorDetails.notes || '' : hydrationWarning
return (
@@ -307,7 +307,9 @@ export function Errors({
{/* If there's hydration warning, skip displaying the error name */}
{hydrationWarning ? '' : error.name + ': '}
diff --git a/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.tsx b/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.tsx
index 6b2c858d6f3466..58b2e2d199665e 100644
--- a/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.tsx
+++ b/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.tsx
@@ -66,7 +66,7 @@ export function PseudoHtmlDiff({
firstContent: string
secondContent: string
reactOutputComponentDiff: string | undefined
- hydrationMismatchType: 'tag' | 'text'
+ hydrationMismatchType: 'tag' | 'text' | 'text-in-tag'
} & React.HTMLAttributes) {
const isHtmlTagsWarning = hydrationMismatchType === 'tag'
const isReactHydrationDiff = !!reactOutputComponentDiff
diff --git a/packages/next/src/client/components/react-dev-overlay/internal/helpers/hydration-error-info.ts b/packages/next/src/client/components/react-dev-overlay/internal/helpers/hydration-error-info.ts
index f99a6e41c55d0c..413b0746008ea9 100644
--- a/packages/next/src/client/components/react-dev-overlay/internal/helpers/hydration-error-info.ts
+++ b/packages/next/src/client/components/react-dev-overlay/internal/helpers/hydration-error-info.ts
@@ -23,15 +23,42 @@ const htmlTagsWarnings = new Set([
"In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.",
])
-export const getHydrationWarningType = (msg: NullableText): 'tag' | 'text' => {
+// In React 18, the warning message is prefixed with "Warning: "
+const normalizeWarningMessage = (msg: string) => msg.replace(/^Warning: /, '')
+
+// Note: React 18 only
+const textAndTagsMismatchWarnings = new Set([
+ 'Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s',
+ 'Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s',
+])
+
+// Note: React 18 only
+const textMismatchWarning =
+ 'Warning: Text content did not match. Server: "%s" Client: "%s"%s'
+
+const isTextMismatchWarning = (msg: NullableText) => textMismatchWarning === msg
+const isTextInTagsMismatchWarning = (msg: NullableText) =>
+ Boolean(msg && textAndTagsMismatchWarnings.has(msg))
+
+export const getHydrationWarningType = (
+ msg: NullableText
+): 'tag' | 'text' | 'text-in-tag' => {
if (isHtmlTagsWarning(msg)) return 'tag'
return 'text'
}
-const isHtmlTagsWarning = (msg: NullableText) =>
- Boolean(msg && htmlTagsWarnings.has(msg))
+const isHtmlTagsWarning = (msg: NullableText) => {
+ if (msg && typeof msg === 'string') {
+ return htmlTagsWarnings.has(normalizeWarningMessage(msg))
+ }
+
+ return false
+}
-const isKnownHydrationWarning = (msg: NullableText) => isHtmlTagsWarning(msg)
+const isKnownHydrationWarning = (msg: NullableText) =>
+ isHtmlTagsWarning(msg) ||
+ isTextInTagsMismatchWarning(msg) ||
+ isTextMismatchWarning(msg)
export const getReactHydrationDiffSegments = (msg: NullableText) => {
if (msg) {
@@ -51,14 +78,18 @@ export const getReactHydrationDiffSegments = (msg: NullableText) => {
export function storeHydrationErrorStateFromConsoleArgs(...args: any[]) {
const [msg, serverContent, clientContent, componentStack] = args
if (isKnownHydrationWarning(msg)) {
- hydrationErrorState.warning = [
- // remove the last %s from the message
- msg,
- serverContent,
- clientContent,
- ]
+ hydrationErrorState.warning = [msg, serverContent, clientContent]
hydrationErrorState.componentStack = componentStack
hydrationErrorState.serverContent = serverContent
hydrationErrorState.clientContent = clientContent
+
+ return [
+ ...args,
+ // We tack on the hydration error message to the console.error message so that
+ // it matches the error we display in the redbox overlay
+ `\nSee more info here: https://nextjs.org/docs/messages/react-hydration-error`,
+ ]
}
+
+ return args
}
diff --git a/packages/next/src/client/components/react-dev-overlay/pages/client.ts b/packages/next/src/client/components/react-dev-overlay/pages/client.ts
index e10ddbd1b15940..e60871157f4b89 100644
--- a/packages/next/src/client/components/react-dev-overlay/pages/client.ts
+++ b/packages/next/src/client/components/react-dev-overlay/pages/client.ts
@@ -52,11 +52,13 @@ function handleError(error: unknown) {
let origConsoleError = console.error
function nextJsHandleConsoleError(...args: any[]) {
+ // To support React 19, this will need to be updated as follows:
+ // const error = process.env.NODE_ENV !== 'production' ? args[1] : args[0]
// See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78
- const error = process.env.NODE_ENV !== 'production' ? args[1] : args[0]
- storeHydrationErrorStateFromConsoleArgs(...args)
+ const error = args[0]
+ const errorArgs = storeHydrationErrorStateFromConsoleArgs(...args)
handleError(error)
- origConsoleError.apply(window.console, args)
+ origConsoleError.apply(window.console, errorArgs)
}
function onUnhandledError(event: ErrorEvent) {
diff --git a/packages/next/src/client/legacy/image.tsx b/packages/next/src/client/legacy/image.tsx
index aa79f37ac05f58..40116cea747e86 100644
--- a/packages/next/src/client/legacy/image.tsx
+++ b/packages/next/src/client/legacy/image.tsx
@@ -9,6 +9,8 @@ import React, {
useState,
type JSX,
} from 'react'
+import * as ReactDOM from 'react-dom'
+import Head from '../../shared/lib/head'
import {
imageConfigDefault,
VALID_LOADERS,
@@ -26,6 +28,8 @@ function normalizeSrc(src: string): string {
return src[0] === '/' ? src.slice(1) : src
}
+const supportsFloat = typeof ReactDOM.preload === 'function'
+
const configEnv = process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete
const loadedImageURLs = new Set()
const allImgs = new Map<
@@ -978,6 +982,20 @@ export default function Image({
}
}
+ const linkProps:
+ | React.DetailedHTMLProps<
+ React.LinkHTMLAttributes,
+ HTMLLinkElement
+ >
+ | undefined = supportsFloat
+ ? undefined
+ : {
+ imageSrcSet: imgAttributes.srcSet,
+ imageSizes: imgAttributes.sizes,
+ crossOrigin: rest.crossOrigin,
+ referrerPolicy: rest.referrerPolicy,
+ }
+
const useLayoutEffect =
typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect
const onLoadingCompleteRef = useRef(onLoadingComplete)
@@ -1044,6 +1062,27 @@ export default function Image({
) : null}
+ {!supportsFloat && priority ? (
+ // Note how we omit the `href` attribute, as it would only be relevant
+ // for browsers that do not support `imagesrcset`, and in those cases
+ // it would likely cause the incorrect image to be preloaded.
+ //
+ // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset
+
+
+
+ ) : null}
>
)
}
diff --git a/packages/next/src/client/use-merged-ref.ts b/packages/next/src/client/use-merged-ref.ts
index 7fce7fb1f0ee12..65bb8dd4dcb428 100644
--- a/packages/next/src/client/use-merged-ref.ts
+++ b/packages/next/src/client/use-merged-ref.ts
@@ -1,29 +1,34 @@
-import { useMemo, type Ref } from 'react'
+import { useMemo, useRef, type Ref } from 'react'
+// This is a compatibility hook to support React 18 and 19 refs.
+// In 19, a cleanup function from refs may be returned.
+// In 18, returning a cleanup function creates a warning.
+// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.
+// This implements cleanup functions with the old behavior in 18.
+// We know refs are always called alternating with `null` and then `T`.
+// So a call with `null` means we need to call the previous cleanup functions.
export function useMergedRef(
refA: Ref,
refB: Ref
): Ref {
- return useMemo(() => mergeRefs(refA, refB), [refA, refB])
-}
+ const cleanupA = useRef<() => void>(() => {})
+ const cleanupB = useRef<() => void>(() => {})
-export function mergeRefs(
- refA: Ref,
- refB: Ref
-): Ref {
- if (!refA || !refB) {
- return refA || refB
- }
-
- return (current: TElement) => {
- const cleanupA = applyRef(refA, current)
- const cleanupB = applyRef(refB, current)
+ return useMemo(() => {
+ if (!refA || !refB) {
+ return refA || refB
+ }
- return () => {
- cleanupA()
- cleanupB()
+ return (current: TElement | null): void => {
+ if (current === null) {
+ cleanupA.current()
+ cleanupB.current()
+ } else {
+ cleanupA.current = applyRef(refA, current)
+ cleanupB.current = applyRef(refB, current)
+ }
}
- }
+ }, [refA, refB])
}
function applyRef(
diff --git a/packages/next/src/compiled/unistore/unistore.js b/packages/next/src/compiled/unistore/unistore.js
index ecfa6bcdddea5e..0e80a94691cc43 100644
--- a/packages/next/src/compiled/unistore/unistore.js
+++ b/packages/next/src/compiled/unistore/unistore.js
@@ -1 +1 @@
-(()=>{var t={583:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a{var t={302:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a {
const content = renderContent(EnhancedApp, EnhancedComponent)
return await renderToInitialFizzStream({
- ReactDOMServer: ReactDOMServerEdge,
+ ReactDOMServer: ReactDOMServerBrowser,
element: content,
})
}
diff --git a/packages/next/types/react-dom.d.ts b/packages/next/types/react-dom.d.ts
index 9b811922e4d557..7c11484f3bb368 100644
--- a/packages/next/types/react-dom.d.ts
+++ b/packages/next/types/react-dom.d.ts
@@ -70,6 +70,10 @@ declare module 'react-dom/server.edge' {
>
}
+declare module 'react-dom/server.browser' {
+ export * from 'react-dom/server.edge'
+}
+
declare module 'react-dom/static.edge' {
import type { JSX } from 'react'
/**
diff --git a/packages/next/webpack.config.js b/packages/next/webpack.config.js
index 51e2090a116431..7f4af265bf73ce 100644
--- a/packages/next/webpack.config.js
+++ b/packages/next/webpack.config.js
@@ -13,6 +13,7 @@ const pagesExternals = [
'react-dom/package.json',
'react-dom/client',
'react-dom/server',
+ 'react-dom/server.browser',
'react-dom/server.edge',
'react-server-dom-webpack/client',
'react-server-dom-webpack/client.edge',
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 808e8f1d6118e9..9950e303010638 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -15,10 +15,10 @@ overrides:
'@babel/traverse': 7.22.5
'@types/react': npm:types-react@19.0.0-rc.0
'@types/react-dom': npm:types-react-dom@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
- react-is: 19.0.0-rc-7771d3a7-20240827
- scheduler: 0.25.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
+ react-is: 18.3.1
+ scheduler: 0.23.2
patchedDependencies:
webpack-sources@3.2.3:
@@ -64,7 +64,7 @@ importers:
version: 11.11.0
'@emotion/react':
specifier: 11.11.1
- version: 11.11.1(react@19.0.0-rc-7771d3a7-20240827)(types-react@19.0.0-rc.0)
+ version: 11.11.1(react@18.3.1)(types-react@19.0.0-rc.0)
'@fullhuman/postcss-purgecss':
specifier: 1.3.0
version: 1.3.0
@@ -73,7 +73,7 @@ importers:
version: 2.2.1(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)))
'@mdx-js/react':
specifier: 2.2.1
- version: 2.2.1(react@19.0.0-rc-7771d3a7-20240827)
+ version: 2.2.1(react@18.3.1)
'@next/bundle-analyzer':
specifier: workspace:*
version: link:packages/next-bundle-analyzer
@@ -139,7 +139,7 @@ importers:
version: 6.1.2(@jest/globals@29.7.0)(@types/jest@29.5.5)(jest@29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0))
'@testing-library/react':
specifier: ^15.0.5
- version: 15.0.7(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(types-react@19.0.0-rc.0)
+ version: 15.0.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(types-react@19.0.0-rc.0)
'@types/busboy':
specifier: 1.5.3
version: 1.5.3
@@ -450,8 +450,8 @@ importers:
specifier: 0.3.0
version: 0.3.0
react:
- specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827
+ specifier: 18.3.1
+ version: 18.3.1
react-17:
specifier: npm:react@17.0.2
version: react@17.0.2
@@ -459,17 +459,17 @@ importers:
specifier: npm:react@19.0.0-rc-7771d3a7-20240827
version: react@19.0.0-rc-7771d3a7-20240827
react-dom:
- specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ specifier: 18.3.1
+ version: 18.3.1(react@18.3.1)
react-dom-17:
specifier: npm:react-dom@17.0.2
- version: react-dom@17.0.2(react@19.0.0-rc-7771d3a7-20240827)
+ version: react-dom@17.0.2(react@18.3.1)
react-dom-builtin:
specifier: npm:react-dom@19.0.0-rc-7771d3a7-20240827
- version: react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ version: react-dom@19.0.0-rc-7771d3a7-20240827(react@18.3.1)
react-dom-experimental-builtin:
specifier: npm:react-dom@0.0.0-experimental-7771d3a7-20240827
- version: react-dom@0.0.0-experimental-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ version: react-dom@0.0.0-experimental-7771d3a7-20240827(react@18.3.1)
react-experimental-builtin:
specifier: npm:react@0.0.0-experimental-7771d3a7-20240827
version: react@0.0.0-experimental-7771d3a7-20240827
@@ -478,22 +478,22 @@ importers:
version: react-is@19.0.0-rc-7771d3a7-20240827
react-server-dom-turbopack:
specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)
+ version: 19.0.0-rc-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react-server-dom-turbopack-experimental:
specifier: npm:react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827
- version: react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)
+ version: react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react-server-dom-webpack:
specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)))
+ version: 19.0.0-rc-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)))
react-server-dom-webpack-experimental:
specifier: npm:react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827
- version: react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)))
+ version: react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)))
react-ssr-prepass:
specifier: 1.0.8
- version: 1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@19.0.0-rc-7771d3a7-20240827)
+ version: 1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@18.3.1)
react-virtualized:
specifier: 9.22.3
- version: 9.22.3(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)
+ version: 9.22.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
relay-compiler:
specifier: 13.0.2
version: 13.0.2
@@ -535,16 +535,16 @@ importers:
version: 6.0.0
styled-components:
specifier: 6.0.0-rc.3
- version: 6.0.0-rc.3(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)
+ version: 6.0.0-rc.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
styled-jsx:
specifier: 5.1.6
- version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-7771d3a7-20240827)
+ version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@18.3.1)
styled-jsx-plugin-postcss:
specifier: 3.0.2
version: 3.0.2
swr:
specifier: ^2.2.4
- version: 2.2.4(react@19.0.0-rc-7771d3a7-20240827)
+ version: 2.2.4(react@18.3.1)
tailwindcss:
specifier: 3.2.7
version: 3.2.7(postcss@8.4.31)
@@ -871,17 +871,17 @@ importers:
specifier: 8.4.31
version: 8.4.31
react:
- specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827
+ specifier: 18.3.1
+ version: 18.3.1
react-dom:
- specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ specifier: 18.3.1
+ version: 18.3.1(react@18.3.1)
sass:
specifier: ^1.3.0
version: 1.77.8
styled-jsx:
specifier: 5.1.6
- version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-7771d3a7-20240827)
+ version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@18.3.1)
optionalDependencies:
sharp:
specifier: ^0.33.5
@@ -1462,7 +1462,7 @@ importers:
version: 1.0.35
unistore:
specifier: 3.4.1
- version: 3.4.1(react@19.0.0-rc-7771d3a7-20240827)
+ version: 3.4.1(react@18.3.1)
util:
specifier: 0.12.4
version: 0.12.4
@@ -1596,8 +1596,8 @@ importers:
packages/third-parties:
dependencies:
react:
- specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827
+ specifier: 18.3.1
+ version: 18.3.1
third-party-capital:
specifier: 1.0.20
version: 1.0.20
@@ -1657,14 +1657,14 @@ importers:
specifier: 29.5.0
version: 29.5.0
react:
- specifier: 19.0.0-rc-7771d3a7-20240827
- version: 19.0.0-rc-7771d3a7-20240827
+ specifier: 18.3.1
+ version: 18.3.1
react-test-renderer:
specifier: 18.2.0
- version: 18.2.0(react@19.0.0-rc-7771d3a7-20240827)
+ version: 18.2.0(react@18.3.1)
styled-jsx:
specifier: ^5.1.2
- version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-7771d3a7-20240827)
+ version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@18.3.1)
turbopack/packages/devlow-bench:
dependencies:
@@ -3276,7 +3276,7 @@ packages:
resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==}
peerDependencies:
'@types/react': '*'
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -3293,7 +3293,7 @@ packages:
'@emotion/use-insertion-effect-with-fallbacks@1.0.1':
resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
'@emotion/utils@1.2.1':
resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==}
@@ -3486,14 +3486,14 @@ packages:
'@floating-ui/react-dom@2.1.0':
resolution: {integrity: sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
'@floating-ui/react@0.26.16':
resolution: {integrity: sha512-HEf43zxZNAI/E781QIVpYSF3K2VH4TTYZpqecjdsFkjsaU1EbaWcM++kw0HXFffj7gDUcBFevX8s0rQGQpxkow==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
'@floating-ui/utils@0.2.2':
resolution: {integrity: sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==}
@@ -4133,13 +4133,13 @@ packages:
resolution: {integrity: sha512-l9ypojKN3PjwO1CSLIsqxi7mA25+7w+xc71Q+JuCCREI0tuGwkZsKbIOpuTATIJOjPh8ycLiW7QxX1LYsRTq6w==}
peerDependencies:
'@mantine/hooks': 7.10.1
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
'@mantine/hooks@7.11.2':
resolution: {integrity: sha512-jhyVe/sbDEG2U8rr2lMecUPgQxcfr5hh9HazqGfkS7ZRIMDO7uJ947yAcTMGGkp5Lxtt5TBFt1Cb6tiB2/1agg==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
'@mapbox/node-pre-gyp@1.0.5':
resolution: {integrity: sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==}
@@ -4156,7 +4156,7 @@ packages:
'@mdx-js/react@2.2.1':
resolution: {integrity: sha512-YdXcMcEnqZhzql98RNrqYo9cEhTTesBiCclEtoiQUbJwx87q9453GTapYU6kJ8ZZ2ek1Vp25SiAXEFy5O/eAPw==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
'@mswjs/cookies@1.1.0':
resolution: {integrity: sha512-0ZcCVQxifZmhwNBoQIrystCb+2sWBY2Zw8lpfJBPCHGCA/HWqehITeCRVIv4VMy8MPlaHo2w2pTHFV2pFfqKPw==}
@@ -4839,8 +4839,8 @@ packages:
engines: {node: '>=18'}
peerDependencies:
'@types/react': npm:types-react@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -10368,7 +10368,7 @@ packages:
lucide-react@0.383.0:
resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
lz-string@1.5.0:
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
@@ -12607,22 +12607,30 @@ packages:
react-dom@0.0.0-experimental-7771d3a7-20240827:
resolution: {integrity: sha512-lgOBiTipHJIKgJyiaV/YhL28X0vdt30fuHQxiW73/3WSu/ePSO/hV8uSefpiPhqMTq4TUKKylOBHhcG1/fy3Jw==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
react-dom@17.0.2:
resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+
+ react-dom@18.3.1:
+ resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
+ peerDependencies:
+ react: 18.3.1
react-dom@19.0.0-rc-7771d3a7-20240827:
resolution: {integrity: sha512-EMgZJX6EEQEr+pso+9ySkrEMPv3N7zF2fbi0f6uB+X7r8E+O2GqPRcIHtFigMdW8uS0XCVFHAocMnIc4yPULYQ==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
react-dom@19.0.0-rc-f90a6bcc-20240827:
resolution: {integrity: sha512-oUa/reDvGtjRcxi8u+GYHaDHanudaO28+G+Wvxm50CItW1xwIFN2Nn7foJxxDS9lFLGdRWZvjxldZEPAUSuXbg==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+
+ react-is@18.3.1:
+ resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==}
react-is@19.0.0-rc-7771d3a7-20240827:
resolution: {integrity: sha512-vy9RwFmrhsGQAJEbFQyTskRWXVm39Ax2Ikao51VX2GBXoV2XOQ17vdhyhltCOa+yuoNj0p3X2C90+bxG+w2u0Q==}
@@ -12636,8 +12644,8 @@ packages:
react-number-format@5.4.0:
resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
react-refresh@0.12.0:
resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==}
@@ -12648,7 +12656,7 @@ packages:
engines: {node: '>=10'}
peerDependencies:
'@types/react': npm:types-react@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -12658,7 +12666,7 @@ packages:
engines: {node: '>=10'}
peerDependencies:
'@types/react': npm:types-react@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -12667,49 +12675,49 @@ packages:
resolution: {integrity: sha512-5j6sur5W5Oj7XZfS8EjvwmnbvaW42HHPY00ur0/HCvUxZNEPsTg7Ri4y3WlP4ebZTKdubCU5hD/Nt5/GkxvnuQ==}
engines: {node: '>=0.10.0'}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
react-server-dom-turbopack@19.0.0-rc-7771d3a7-20240827:
resolution: {integrity: sha512-KkipAuYaTTQivseV0DNwRS8K6o8K5YuohXlXS5NY9QPXAyyk/Q2LSFUayMrk9ICAmty+Fs5xVjN4UAIpi1gmOQ==}
engines: {node: '>=0.10.0'}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827:
resolution: {integrity: sha512-swlsAzmGKLEp+afolIWJo8jIwt0GLux2j4IQzqVRRw1j/1nn7aO6a5po/rveOMR6XT/ktsE307vre8rEBungxQ==}
engines: {node: '>=0.10.0'}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
webpack: 5.90.0
react-server-dom-webpack@19.0.0-rc-7771d3a7-20240827:
resolution: {integrity: sha512-2r7481kcNjYtQ97f9fuVnT6YSPk4b6RCno+4UoBSKYDq1nCU/Ybj0b1O/68BqYGdpu5fYI0UVDrfI3ywWVuvbg==}
engines: {node: '>=0.10.0'}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
webpack: 5.90.0
react-shallow-renderer@16.15.0:
resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
react-ssr-prepass@1.0.8:
resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-is: 18.3.1
react-style-singleton@2.2.1:
resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==}
engines: {node: '>=10'}
peerDependencies:
'@types/react': npm:types-react@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -12717,19 +12725,19 @@ packages:
react-test-renderer@18.2.0:
resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
react-textarea-autosize@8.5.3:
resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==}
engines: {node: '>=10'}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
react-virtualized@9.22.3:
resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
react@0.0.0-experimental-7771d3a7-20240827:
resolution: {integrity: sha512-Jh40juQIRyTl4q5yH53JzVLCP5h5CcnDBgfcz8hYQTLvvKoxWFr5dR78mUIrc8IPInn8bcOconodGJaXYVqTSQ==}
@@ -12739,6 +12747,10 @@ packages:
resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==}
engines: {node: '>=0.10.0'}
+ react@18.3.1:
+ resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
+ engines: {node: '>=0.10.0'}
+
react@19.0.0-rc-7771d3a7-20240827:
resolution: {integrity: sha512-Xg6LoxgPpT4efYHzRB2gUUQCoNXu2df3sOBRgiUvzTVT1qQNOV611/w80JiOmnTWlIyCaUfSkNrMG8OUO/D+AA==}
engines: {node: '>=0.10.0'}
@@ -13269,6 +13281,9 @@ packages:
scheduler@0.0.0-experimental-7771d3a7-20240827:
resolution: {integrity: sha512-/5YtUIFqGx1aHcSLqT9VBmzJ1nX8XOYkooipvfwH4ZRYuGptkHypXx+FUO4caZoN0O29dI3yUBUk3msVp6wMyg==}
+ scheduler@0.23.2:
+ resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
+
scheduler@0.25.0-rc-7771d3a7-20240827:
resolution: {integrity: sha512-n4nHmAoerbIOSrH24w0+fcdCUwQ4Npm7yXfsrn09FL01OWIaxpuo4P0rj3qPyLFgsJDbn18sWvLVB/e/KPnR+A==}
@@ -13844,8 +13859,8 @@ packages:
engines: {node: '>= 16'}
peerDependencies:
babel-plugin-styled-components: '>= 2'
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-dom: 18.3.1
peerDependenciesMeta:
babel-plugin-styled-components:
optional: true
@@ -13859,7 +13874,7 @@ packages:
peerDependencies:
'@babel/core': '*'
babel-plugin-macros: '*'
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@babel/core':
optional: true
@@ -13936,7 +13951,7 @@ packages:
swr@2.2.4:
resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
symbol-observable@1.0.1:
resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==}
@@ -14674,7 +14689,7 @@ packages:
engines: {node: '>=10'}
peerDependencies:
'@types/react': npm:types-react@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -14682,13 +14697,13 @@ packages:
use-composed-ref@1.3.0:
resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
use-isomorphic-layout-effect@1.1.2:
resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==}
peerDependencies:
'@types/react': '*'
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -14697,7 +14712,7 @@ packages:
resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==}
peerDependencies:
'@types/react': '*'
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -14707,7 +14722,7 @@ packages:
engines: {node: '>=10'}
peerDependencies:
'@types/react': npm:types-react@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
peerDependenciesMeta:
'@types/react':
optional: true
@@ -14715,7 +14730,7 @@ packages:
use-sync-external-store@1.2.0:
resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==}
peerDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
use@3.1.1:
resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==}
@@ -17103,17 +17118,17 @@ snapshots:
'@emotion/memoize@0.8.1': {}
- '@emotion/react@11.11.1(react@19.0.0-rc-7771d3a7-20240827)(types-react@19.0.0-rc.0)':
+ '@emotion/react@11.11.1(react@18.3.1)(types-react@19.0.0-rc.0)':
dependencies:
'@babel/runtime': 7.22.5
'@emotion/babel-plugin': 11.11.0
'@emotion/cache': 11.11.0
'@emotion/serialize': 1.1.2
- '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.0.0-rc-7771d3a7-20240827)
+ '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.3.1)
'@emotion/utils': 1.2.1
'@emotion/weak-memoize': 0.3.1
hoist-non-react-statics: 3.3.2
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
optionalDependencies:
'@types/react': types-react@19.0.0-rc.0
@@ -17129,9 +17144,9 @@ snapshots:
'@emotion/unitless@0.8.1': {}
- '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.0.0-rc-7771d3a7-20240827)':
+ '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.3.1)':
dependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
'@emotion/utils@1.2.1': {}
@@ -18491,11 +18506,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@mdx-js/react@2.2.1(react@19.0.0-rc-7771d3a7-20240827)':
+ '@mdx-js/react@2.2.1(react@18.3.1)':
dependencies:
'@types/mdx': 2.0.3
'@types/react': types-react@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
'@mdx-js/react@2.2.1(react@19.0.0-rc-f90a6bcc-20240827)':
dependencies:
@@ -19314,13 +19329,13 @@ snapshots:
'@types/jest': 29.5.5
jest: 29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0)
- '@testing-library/react@15.0.7(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(types-react@19.0.0-rc.0)':
+ '@testing-library/react@15.0.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(types-react@19.0.0-rc.0)':
dependencies:
'@babel/runtime': 7.22.5
'@testing-library/dom': 10.1.0
'@types/react-dom': types-react-dom@19.0.0-rc.0
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
optionalDependencies:
'@types/react': types-react@19.0.0-rc.0
@@ -24247,7 +24262,7 @@ snapshots:
hoist-non-react-statics@3.3.2:
dependencies:
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react-is: 18.3.1
homedir-polyfill@1.0.3:
dependencies:
@@ -28686,25 +28701,25 @@ snapshots:
'@jest/types': 24.9.0
ansi-regex: 4.1.0
ansi-styles: 3.2.1
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react-is: 18.3.1
pretty-format@27.5.1:
dependencies:
ansi-regex: 5.0.1
ansi-styles: 5.2.0
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react-is: 18.3.1
pretty-format@29.5.0:
dependencies:
'@jest/schemas': 29.4.3
ansi-styles: 5.2.0
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react-is: 18.3.1
pretty-format@29.7.0:
dependencies:
'@jest/schemas': 29.6.3
ansi-styles: 5.2.0
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react-is: 18.3.1
pretty-ms@7.0.0:
dependencies:
@@ -28761,7 +28776,7 @@ snapshots:
dependencies:
loose-envify: 1.4.0
object-assign: 4.1.1
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react-is: 18.3.1
property-information@5.6.0:
dependencies:
@@ -28933,27 +28948,35 @@ snapshots:
minimist: 1.2.8
strip-json-comments: 2.0.1
- react-dom@0.0.0-experimental-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827):
+ react-dom@0.0.0-experimental-7771d3a7-20240827(react@18.3.1):
dependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- scheduler: 0.25.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ scheduler: 0.23.2
- react-dom@17.0.2(react@19.0.0-rc-7771d3a7-20240827):
+ react-dom@17.0.2(react@18.3.1):
dependencies:
loose-envify: 1.4.0
object-assign: 4.1.1
- react: 19.0.0-rc-7771d3a7-20240827
- scheduler: 0.25.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ scheduler: 0.23.2
+
+ react-dom@18.3.1(react@18.3.1):
+ dependencies:
+ loose-envify: 1.4.0
+ react: 18.3.1
+ scheduler: 0.23.2
- react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827):
+ react-dom@19.0.0-rc-7771d3a7-20240827(react@18.3.1):
dependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- scheduler: 0.25.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ scheduler: 0.23.2
react-dom@19.0.0-rc-f90a6bcc-20240827(react@19.0.0-rc-f90a6bcc-20240827):
dependencies:
react: 19.0.0-rc-f90a6bcc-20240827
- scheduler: 0.25.0-rc-7771d3a7-20240827
+ scheduler: 0.23.2
+
+ react-is@18.3.1: {}
react-is@19.0.0-rc-7771d3a7-20240827: {}
@@ -28988,48 +29011,48 @@ snapshots:
optionalDependencies:
'@types/react': types-react@19.0.0-rc.0
- react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827):
+ react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
acorn-loose: 8.3.0
neo-async: 2.6.1
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
- react-server-dom-turbopack@19.0.0-rc-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827):
+ react-server-dom-turbopack@19.0.0-rc-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
acorn-loose: 8.3.0
neo-async: 2.6.1
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
- react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))):
+ react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))):
dependencies:
acorn-loose: 8.3.0
neo-async: 2.6.1
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))
webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq)
- react-server-dom-webpack@19.0.0-rc-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))):
+ react-server-dom-webpack@19.0.0-rc-7771d3a7-20240827(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))):
dependencies:
acorn-loose: 8.3.0
neo-async: 2.6.1
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))
webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq)
- react-shallow-renderer@16.15.0(react@19.0.0-rc-7771d3a7-20240827):
+ react-shallow-renderer@16.15.0(react@18.3.1):
dependencies:
object-assign: 4.1.1
- react: 19.0.0-rc-7771d3a7-20240827
- react-is: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-is: 18.3.1
- react-ssr-prepass@1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@19.0.0-rc-7771d3a7-20240827):
+ react-ssr-prepass@1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@18.3.1):
dependencies:
object-is: 1.0.2
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
react-is: 19.0.0-rc-f90a6bcc-20240827
react-style-singleton@2.2.1(react@19.0.0-rc-f90a6bcc-20240827)(types-react@19.0.0-rc.0):
@@ -29041,12 +29064,12 @@ snapshots:
optionalDependencies:
'@types/react': types-react@19.0.0-rc.0
- react-test-renderer@18.2.0(react@19.0.0-rc-7771d3a7-20240827):
+ react-test-renderer@18.2.0(react@18.3.1):
dependencies:
- react: 19.0.0-rc-7771d3a7-20240827
- react-is: 19.0.0-rc-7771d3a7-20240827
- react-shallow-renderer: 16.15.0(react@19.0.0-rc-7771d3a7-20240827)
- scheduler: 0.25.0-rc-7771d3a7-20240827
+ react: 18.3.1
+ react-is: 18.3.1
+ react-shallow-renderer: 16.15.0(react@18.3.1)
+ scheduler: 0.23.2
react-textarea-autosize@8.5.3(react@19.0.0-rc-f90a6bcc-20240827)(types-react@19.0.0-rc.0):
dependencies:
@@ -29057,15 +29080,15 @@ snapshots:
transitivePeerDependencies:
- '@types/react'
- react-virtualized@9.22.3(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827):
+ react-virtualized@9.22.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@babel/runtime': 7.22.5
clsx: 1.1.1
dom-helpers: 5.2.1
loose-envify: 1.4.0
prop-types: 15.8.1
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
react-lifecycles-compat: 3.0.4
react@0.0.0-experimental-7771d3a7-20240827: {}
@@ -29075,6 +29098,10 @@ snapshots:
loose-envify: 1.4.0
object-assign: 4.1.1
+ react@18.3.1:
+ dependencies:
+ loose-envify: 1.4.0
+
react@19.0.0-rc-7771d3a7-20240827: {}
react@19.0.0-rc-f90a6bcc-20240827: {}
@@ -29767,6 +29794,10 @@ snapshots:
scheduler@0.0.0-experimental-7771d3a7-20240827: {}
+ scheduler@0.23.2:
+ dependencies:
+ loose-envify: 1.4.0
+
scheduler@0.25.0-rc-7771d3a7-20240827: {}
schema-utils@2.7.1:
@@ -30419,7 +30450,7 @@ snapshots:
dependencies:
inline-style-parser: 0.1.1
- styled-components@6.0.0-rc.3(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827):
+ styled-components@6.0.0-rc.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@babel/cli': 7.21.5(@babel/core@7.22.5)
'@babel/core': 7.22.5
@@ -30434,8 +30465,8 @@ snapshots:
'@emotion/unitless': 0.8.1
css-to-react-native: 3.2.0
postcss: 8.4.31
- react: 19.0.0-rc-7771d3a7-20240827
- react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
shallowequal: 1.1.0
stylis: 4.2.0
tslib: 2.5.3
@@ -30447,10 +30478,10 @@ snapshots:
postcss: 7.0.32
postcss-load-plugins: 2.3.0
- styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-7771d3a7-20240827):
+ styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@18.3.1):
dependencies:
client-only: 0.0.1
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
optionalDependencies:
'@babel/core': 7.22.5
babel-plugin-macros: 3.1.0
@@ -30540,11 +30571,11 @@ snapshots:
picocolors: 1.0.1
stable: 0.1.8
- swr@2.2.4(react@19.0.0-rc-7771d3a7-20240827):
+ swr@2.2.4(react@18.3.1):
dependencies:
client-only: 0.0.1
- react: 19.0.0-rc-7771d3a7-20240827
- use-sync-external-store: 1.2.0(react@19.0.0-rc-7771d3a7-20240827)
+ react: 18.3.1
+ use-sync-external-store: 1.2.0(react@18.3.1)
symbol-observable@1.0.1: {}
@@ -31229,9 +31260,9 @@ snapshots:
unist-util-is: 5.2.0
unist-util-visit-parents: 5.1.3
- unistore@3.4.1(react@19.0.0-rc-7771d3a7-20240827):
+ unistore@3.4.1(react@18.3.1):
optionalDependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
universal-github-app-jwt@1.1.1:
dependencies:
@@ -31356,9 +31387,9 @@ snapshots:
optionalDependencies:
'@types/react': types-react@19.0.0-rc.0
- use-sync-external-store@1.2.0(react@19.0.0-rc-7771d3a7-20240827):
+ use-sync-external-store@1.2.0(react@18.3.1):
dependencies:
- react: 19.0.0-rc-7771d3a7-20240827
+ react: 18.3.1
use@3.1.1: {}
diff --git a/run-tests.js b/run-tests.js
index f1f00f88e64c11..35e34f65862767 100644
--- a/run-tests.js
+++ b/run-tests.js
@@ -18,9 +18,10 @@ const exec = promisify(execOrig)
const core = require('@actions/core')
const { getTestFilter } = require('./test/get-test-filter')
+// TODO: Base this off of test matrix
// Do not rename or format. sync-react script relies on this line.
// prettier-ignore
-const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827";
+const nextjsReactPeerVersion = "^18.2.0";
let argv = require('yargs/yargs')(process.argv.slice(2))
.string('type')
diff --git a/test/.stats-app/package.json b/test/.stats-app/package.json
index 58cf2ed6c29fde..992116f073459f 100644
--- a/test/.stats-app/package.json
+++ b/test/.stats-app/package.json
@@ -4,8 +4,8 @@
"license": "MIT",
"dependencies": {
"next": "latest",
- "react": "19.0.0-rc-7771d3a7-20240827",
- "react-dom": "19.0.0-rc-7771d3a7-20240827"
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0"
},
"engines": {
"node": ">=18.18.0"
diff --git a/test/development/acceptance/hydration-error-react-19.test.ts b/test/development/acceptance/hydration-error-react-19.test.ts
index 21ea0b97563a04..f1e5ae181acd57 100644
--- a/test/development/acceptance/hydration-error-react-19.test.ts
+++ b/test/development/acceptance/hydration-error-react-19.test.ts
@@ -4,7 +4,8 @@ import { FileRef, nextTestSetup } from 'e2e-utils'
import { outdent } from 'outdent'
import path from 'path'
-describe('Error overlay for hydration errors (React 19)', () => {
+// TODO: Enable once React 19 support is added to pages.
+describe.skip('Error overlay for hydration errors (React 19)', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
skipStart: true,
diff --git a/test/development/acceptance/hydration-error.test.ts b/test/development/acceptance/hydration-error.test.ts
index af299cf5b52283..dfcb2c7dbc196a 100644
--- a/test/development/acceptance/hydration-error.test.ts
+++ b/test/development/acceptance/hydration-error.test.ts
@@ -4,8 +4,7 @@ import { FileRef, nextTestSetup } from 'e2e-utils'
import { outdent } from 'outdent'
import path from 'path'
-// TODO: Enable this test once react 18 is supported for pages router
-describe.skip('Error overlay for hydration errors (React 18)', () => {
+describe('Error overlay for hydration errors (React 18)', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
@@ -38,7 +37,7 @@ describe.skip('Error overlay for hydration errors (React 18)', () => {
await session.assertHasRedbox()
expect(await session.getRedboxDescription()).toMatchInlineSnapshot(`
- "Error: Text content does not match server-rendered HTML.
+ "Text content does not match server-rendered HTML.
See more info here: https://nextjs.org/docs/messages/react-hydration-error"
`)
diff --git a/test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts b/test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts
index 2f38cf34080cbb..53fdb6b5772934 100644
--- a/test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts
+++ b/test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts
@@ -8,6 +8,7 @@ import {
} from 'next-test-utils'
const isReactExperimental = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
+const isReact18 = true
describe('react-dom/server in React Server environment', () => {
const dependencies = (global as any).isNextDeploy
@@ -317,23 +318,45 @@ describe('react-dom/server in React Server environment', () => {
source: await getRedboxSource(browser),
}
if (isTurbopack) {
- expect(redbox).toMatchInlineSnapshot(`
- {
- "description": "Error: react-dom/server is not supported in React Server Components.",
- "source": "app/exports/app-code/react-dom-server-node-explicit/page.js (0:0) @
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": "app/exports/app-code/react-dom-server-node-explicit/page.js (0:0) @
- 1 | import * as ReactDOMServerNode from 'react-dom/server.node'
- 2 | // Fine to drop once React is on ESM
- 3 | import ReactDOMServerNodeDefault from 'react-dom/server.node'",
- }
- `)
+ 1 | import * as ReactDOMServerNode from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerNodeDefault from 'react-dom/server.node'",
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "Error: react-dom/server is not supported in React Server Components.",
+ "source": "app/exports/app-code/react-dom-server-node-explicit/page.js (0:0) @
+
+ 1 | import * as ReactDOMServerNode from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerNodeDefault from 'react-dom/server.node'",
+ }
+ `)
+ }
} else {
- expect(redbox).toMatchInlineSnapshot(`
- {
- "description": "Error: react-dom/server is not supported in React Server Components.",
- "source": null,
- }
- `)
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": null,
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "Error: react-dom/server is not supported in React Server Components.",
+ "source": null,
+ }
+ `)
+ }
}
})
@@ -404,23 +427,45 @@ describe('react-dom/server in React Server environment', () => {
source: await getRedboxSource(browser),
}
if (isTurbopack) {
- expect(redbox).toMatchInlineSnapshot(`
- {
- "description": "Error: react-dom/server is not supported in React Server Components.",
- "source": "internal-pkg/server.node.js (0:0) @
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": "internal-pkg/server.node.js (0:0) @
- 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
- 2 | // Fine to drop once React is on ESM
- 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
- }
- `)
+ 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "Error: react-dom/server is not supported in React Server Components.",
+ "source": "internal-pkg/server.node.js (0:0) @
+
+ 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
+ }
+ `)
+ }
} else {
- expect(redbox).toMatchInlineSnapshot(`
- {
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": null,
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
"description": "Error: react-dom/server is not supported in React Server Components.",
- "source": null,
- }
- `)
+ "source": null,
+ }
+ `)
+ }
}
})
@@ -501,26 +546,27 @@ describe('react-dom/server in React Server environment', () => {
}"
`)
} else {
+ await assertNoRedbox(browser)
expect(await browser.elementByCss('main').text())
.toMatchInlineSnapshot(`
- "{
- "default": {
- "default": [
- "renderToReadableStream",
- "renderToStaticMarkup",
- "renderToString",
- "version"
- ],
- "named": [
- "default",
- "renderToReadableStream",
- "renderToStaticMarkup",
- "renderToString",
- "version"
- ]
- }
- }"
- `)
+ "{
+ "default": {
+ "default": [
+ "renderToReadableStream",
+ "renderToStaticMarkup",
+ "renderToString",
+ "version"
+ ],
+ "named": [
+ "default",
+ "renderToReadableStream",
+ "renderToStaticMarkup",
+ "renderToString",
+ "version"
+ ]
+ }
+ }"
+ `)
}
}
const redbox = {
@@ -675,23 +721,45 @@ describe('react-dom/server in React Server environment', () => {
source: await getRedboxSource(browser),
}
if (isTurbopack) {
- expect(redbox).toMatchInlineSnapshot(`
- {
- "description": "Error: react-dom/server is not supported in React Server Components.",
- "source": "internal-pkg/server.node.js (0:0) @
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": "internal-pkg/server.node.js (0:0) @
- 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
- 2 | // Fine to drop once React is on ESM
- 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
- }
- `)
+ 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "Error: react-dom/server is not supported in React Server Components.",
+ "source": "internal-pkg/server.node.js (0:0) @
+
+ 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
+ }
+ `)
+ }
} else {
- expect(redbox).toMatchInlineSnapshot(`
- {
- "description": "Error: react-dom/server is not supported in React Server Components.",
- "source": null,
- }
- `)
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": null,
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "Error: react-dom/server is not supported in React Server Components.",
+ "source": null,
+ }
+ `)
+ }
}
})
@@ -707,23 +775,45 @@ describe('react-dom/server in React Server environment', () => {
}
if (isTurbopack) {
- expect(redbox).toMatchInlineSnapshot(`
- {
- "description": "Error: react-dom/server is not supported in React Server Components.",
- "source": "internal-pkg/server.node.js (0:0) @
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": "internal-pkg/server.node.js (0:0) @
- 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
- 2 | // Fine to drop once React is on ESM
- 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
- }
- `)
+ 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "Error: react-dom/server is not supported in React Server Components.",
+ "source": "internal-pkg/server.node.js (0:0) @
+
+ 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
+ 2 | // Fine to drop once React is on ESM
+ 3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'",
+ }
+ `)
+ }
} else {
- expect(redbox).toMatchInlineSnapshot(`
- {
- "description": "Error: react-dom/server is not supported in React Server Components.",
- "source": null,
- }
- `)
+ if (isReact18) {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+ "source": null,
+ }
+ `)
+ } else {
+ expect(redbox).toMatchInlineSnapshot(`
+ {
+ "description": "Error: react-dom/server is not supported in React Server Components.",
+ "source": null,
+ }
+ `)
+ }
}
})
})
diff --git a/test/development/basic/hmr.test.ts b/test/development/basic/hmr.test.ts
index 3dad5302c2cb82..b065a1af3b0412 100644
--- a/test/development/basic/hmr.test.ts
+++ b/test/development/basic/hmr.test.ts
@@ -18,6 +18,8 @@ import { NextInstance } from 'e2e-utils'
import { outdent } from 'outdent'
import type { NextConfig } from 'next'
+const isReact18 = true
+
describe.each([
{ basePath: '', assetPrefix: '' },
{ basePath: '', assetPrefix: '/asset-prefix' },
@@ -41,11 +43,14 @@ describe.each([
})
await retry(async () => {
const logs = await browser.log()
+
expect(logs).toEqual(
expect.arrayContaining([
{
message: expect.stringContaining(
- 'https://react.dev/link/hydration-mismatch'
+ isReact18
+ ? 'https://nextjs.org/docs/messages/react-hydration-error'
+ : 'https://react.dev/link/hydration-mismatch'
),
source: 'error',
},
diff --git a/test/development/pages-dir/client-navigation/index.test.ts b/test/development/pages-dir/client-navigation/index.test.ts
index 80b50b9195f413..6627edda91db46 100644
--- a/test/development/pages-dir/client-navigation/index.test.ts
+++ b/test/development/pages-dir/client-navigation/index.test.ts
@@ -13,6 +13,8 @@ import webdriver from 'next-webdriver'
import path from 'path'
import { nextTestSetup } from 'e2e-utils'
+const isReact18 = true
+
describe('Client Navigation', () => {
const { next } = nextTestSetup({
files: path.join(__dirname, 'fixture'),
@@ -1669,19 +1671,19 @@ describe.each([[false], [true]])(
expect(
Number(await browser.eval('window.__test_async_executions'))
).toBe(
- strictNextHead
+ strictNextHead || isReact18
? 1
: // is floated before .
- // head-manager thinks it needs t add these again resulting in another execution.
+ // head-manager thinks it needs to add these again resulting in another execution.
2
)
expect(
Number(await browser.eval('window.__test_defer_executions'))
).toBe(
- strictNextHead
+ strictNextHead || isReact18
? 1
: // is floated before .
- // head-manager thinks it needs t add these again resulting in another execution.
+ // head-manager thinks it needs to add these again resulting in another execution.
2
)
@@ -1690,20 +1692,20 @@ describe.each([[false], [true]])(
expect(
Number(await browser.eval('window.__test_async_executions'))
- ).toBe(strictNextHead ? 1 : 2)
+ ).toBe(strictNextHead || isReact18 ? 1 : 2)
expect(
Number(await browser.eval('window.__test_defer_executions'))
- ).toBe(strictNextHead ? 1 : 2)
+ ).toBe(strictNextHead || isReact18 ? 1 : 2)
await browser.elementByCss('#toggleScript').click()
await waitFor(2000)
expect(
Number(await browser.eval('window.__test_async_executions'))
- ).toBe(strictNextHead ? 1 : 2)
+ ).toBe(strictNextHead || isReact18 ? 1 : 2)
expect(
Number(await browser.eval('window.__test_defer_executions'))
- ).toBe(strictNextHead ? 1 : 2)
+ ).toBe(strictNextHead || isReact18 ? 1 : 2)
} finally {
if (browser) {
await browser.close()
diff --git a/test/development/pages-dir/client-navigation/rendering.test.ts b/test/development/pages-dir/client-navigation/rendering.test.ts
index 8e407a877e1217..ac3f040dd127ea 100644
--- a/test/development/pages-dir/client-navigation/rendering.test.ts
+++ b/test/development/pages-dir/client-navigation/rendering.test.ts
@@ -609,7 +609,11 @@ describe.each([[false], [true]])(
const documentHeadElement =
''
- expect(html).toContain(`${nextHeadElement}${documentHeadElement}`)
+ // charset is not actually at the top.
+ // data-next-hide-fouc comes first
+ expect(html).toContain(
+ `${nextHeadElement}${documentHeadElement}`
+ )
})
}
)
diff --git a/test/e2e/app-dir/rsc-basic/rsc-basic.test.ts b/test/e2e/app-dir/rsc-basic/rsc-basic.test.ts
index c72afdc0f2a09b..14272d386e341b 100644
--- a/test/e2e/app-dir/rsc-basic/rsc-basic.test.ts
+++ b/test/e2e/app-dir/rsc-basic/rsc-basic.test.ts
@@ -486,8 +486,7 @@ describe('app dir - rsc basics', () => {
const bundledReactVersionPattern =
process.env.__NEXT_EXPERIMENTAL_PPR === 'true' ? '-experimental-' : '-rc-'
- // TODO: (React 19) During Beta, bundled and installed version match.
- it.skip('should not use bundled react for pages with app', async () => {
+ it('should not use bundled react for pages with app', async () => {
const ssrPaths = ['/pages-react', '/edge-pages-react']
const promises = ssrPaths.map(async (pathname) => {
const resPages$ = await next.render$(pathname)
@@ -507,7 +506,6 @@ describe('app dir - rsc basics', () => {
const ssrAppReactVersions = [
await resApp$('#react').text(),
await resApp$('#react-dom').text(),
- await resApp$('#react-dom-server').text(),
]
ssrAppReactVersions.forEach((version) =>
diff --git a/test/e2e/next-test/first-time-setup-js/package.json b/test/e2e/next-test/first-time-setup-js/package.json
index a135b40a27c11b..8e949d122db4b6 100644
--- a/test/e2e/next-test/first-time-setup-js/package.json
+++ b/test/e2e/next-test/first-time-setup-js/package.json
@@ -8,7 +8,7 @@
},
"dependencies": {
"next": "canary",
- "react": "19.0.0-rc-7771d3a7-20240827",
- "react-dom": "19.0.0-rc-7771d3a7-20240827"
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0"
}
}
diff --git a/test/e2e/next-test/first-time-setup-ts/package.json b/test/e2e/next-test/first-time-setup-ts/package.json
index 107dfe0c5b5f70..d85d37ff59ee1d 100644
--- a/test/e2e/next-test/first-time-setup-ts/package.json
+++ b/test/e2e/next-test/first-time-setup-ts/package.json
@@ -8,8 +8,8 @@
},
"dependencies": {
"next": "canary",
- "react": "19.0.0-rc-7771d3a7-20240827",
- "react-dom": "19.0.0-rc-7771d3a7-20240827"
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18",
diff --git a/test/e2e/prerender-native-module.test.ts b/test/e2e/prerender-native-module.test.ts
index 55d89295b02874..ef78015125e748 100644
--- a/test/e2e/prerender-native-module.test.ts
+++ b/test/e2e/prerender-native-module.test.ts
@@ -3,6 +3,8 @@ import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'e2e-utils'
import webdriver from 'next-webdriver'
+const isReact18 = true
+
describe('prerender native module', () => {
let next: NextInstance
@@ -70,7 +72,9 @@ describe('prerender native module', () => {
/webpack-runtime\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
],
notTests: [],
},
@@ -80,7 +84,9 @@ describe('prerender native module', () => {
/webpack-runtime\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/sqlite3\/.*?\.js/,
/node_modules\/sqlite3\/.*?\.node/,
/node_modules\/sqlite\/.*?\.js/,
diff --git a/test/e2e/prerender.test.ts b/test/e2e/prerender.test.ts
index 4b426406c1b098..5d60ccc2ae7592 100644
--- a/test/e2e/prerender.test.ts
+++ b/test/e2e/prerender.test.ts
@@ -19,6 +19,8 @@ import {
import webdriver from 'next-webdriver'
import stripAnsi from 'strip-ansi'
+const isReact18 = true
+
describe('Prerender', () => {
let next: NextInstance
@@ -2062,7 +2064,9 @@ describe('Prerender', () => {
/webpack-runtime\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
],
notTests: [],
},
@@ -2073,7 +2077,9 @@ describe('Prerender', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
/\/world.txt/,
],
notTests: [
@@ -2088,7 +2094,9 @@ describe('Prerender', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/@firebase\/firestore\/.*?\.js/,
],
notTests: [/\/world.txt/],
@@ -2109,7 +2117,7 @@ describe('Prerender', () => {
)
)
} catch (error) {
- error.message += `\n\nFiles:\n${files.join('\n')}`
+ error.message += `\n\nPage: ${check.page}\nFiles:\n${files.join('\n')}`
throw error
}
diff --git a/test/integration/amphtml/test/index.test.js b/test/integration/amphtml/test/index.test.js
index 252854df6949a2..f44aa7ffb5a99f 100644
--- a/test/integration/amphtml/test/index.test.js
+++ b/test/integration/amphtml/test/index.test.js
@@ -30,10 +30,6 @@ describe('AMP Usage', () => {
let output = ''
beforeAll(async () => {
- await rename(
- join(appDir, 'pages/custom-scripts.js'),
- join(appDir, 'pages/custom-scripts.js.bak')
- )
await rename(
join(appDir, 'pages/invalid-amp.js'),
join(appDir, 'pages/invalid-amp.js.bak')
@@ -49,10 +45,6 @@ describe('AMP Usage', () => {
app = await nextStart(appDir, context.appPort)
})
afterAll(async () => {
- await rename(
- join(appDir, 'pages/custom-scripts.js.bak'),
- join(appDir, 'pages/custom-scripts.js')
- )
await rename(
join(appDir, 'pages/invalid-amp.js.bak'),
join(appDir, 'pages/invalid-amp.js')
@@ -565,25 +557,6 @@ describe('AMP Usage', () => {
expect(inspectPayload).toContain('error')
})
- it('should detect amp validator warning on custom scripts', async () => {
- let inspectPayload = ''
- dynamicAppPort = await findPort()
- ampDynamic = await launchApp(join(__dirname, '../'), dynamicAppPort, {
- onStdout(msg) {
- inspectPayload += msg
- },
- onStderr(msg) {
- inspectPayload += msg
- },
- })
-
- await renderViaHTTP(dynamicAppPort, '/custom-scripts')
-
- await killApp(ampDynamic)
-
- expect(inspectPayload).toContain('error')
- })
-
// eslint-disable-next-line jest/no-identical-title
it('should not contain missing files warning', async () => {
expect(output).toContain('Compiled /only-amp')
diff --git a/test/integration/auto-export/test/index.test.js b/test/integration/auto-export/test/index.test.js
index e90f76052c129a..6c3b87c089c258 100644
--- a/test/integration/auto-export/test/index.test.js
+++ b/test/integration/auto-export/test/index.test.js
@@ -15,6 +15,8 @@ const appDir = path.join(__dirname, '..')
let appPort
let app
+const isReact18 = true
+
const runTests = () => {
it('Supports commonjs 1', async () => {
const browser = await webdriver(appPort, '/commonjs1')
@@ -99,7 +101,19 @@ describe('Auto Export', () => {
expect.arrayContaining([
{
message: expect.stringContaining(
- 'https://react.dev/link/hydration-mismatch'
+ 'See more info here: https://nextjs.org/docs/messages/react-hydration-error'
+ ),
+ source: 'error',
+ },
+ ])
+ )
+ expect(logs).toEqual(
+ expect.arrayContaining([
+ {
+ message: expect.stringContaining(
+ isReact18
+ ? 'https://nextjs.org/docs/messages/react-hydration-error'
+ : 'https://react.dev/link/hydration-mismatch'
),
source: 'error',
},
diff --git a/test/integration/link-ref/app/layout.js b/test/integration/link-ref/app/layout.js
new file mode 100644
index 00000000000000..8525f5f8c0b2a1
--- /dev/null
+++ b/test/integration/link-ref/app/layout.js
@@ -0,0 +1,12 @@
+export const metadata = {
+ title: 'Next.js',
+ description: 'Generated by Next.js',
+}
+
+export default function RootLayout({ children }) {
+ return (
+
+ {children}
+
+ )
+}
diff --git a/test/integration/module-id-strategies/components/CustomComponent.tsx b/test/integration/module-id-strategies/components/CustomComponent.tsx
index 279e4861a926db..3396ee90bbeeb8 100644
--- a/test/integration/module-id-strategies/components/CustomComponent.tsx
+++ b/test/integration/module-id-strategies/components/CustomComponent.tsx
@@ -1,6 +1,6 @@
import React from 'react'
-async function CustomComponent() {
+function CustomComponent() {
return (
the content of a dynamic component
diff --git a/test/integration/next-image-new/default/test/index.test.ts b/test/integration/next-image-new/default/test/index.test.ts
index 26b604c394de67..58a69270958061 100644
--- a/test/integration/next-image-new/default/test/index.test.ts
+++ b/test/integration/next-image-new/default/test/index.test.ts
@@ -1180,7 +1180,7 @@ function runTests(mode) {
expect(warnings).toEqual([])
- expect(await browser.elementById('img').getAttribute('src')).toBe(null)
+ expect(await browser.elementById('img').getAttribute('src')).toBe('')
expect(await browser.elementById('img').getAttribute('srcset')).toBe(null)
expect(await browser.elementById('img').getAttribute('width')).toBe('200')
expect(await browser.elementById('img').getAttribute('height')).toBe(
@@ -1195,7 +1195,7 @@ function runTests(mode) {
)
expect(warnings).toEqual([])
- expect(await browser.elementById('img').getAttribute('src')).toBe(null)
+ expect(await browser.elementById('img').getAttribute('src')).toBe('')
expect(await browser.elementById('img').getAttribute('srcset')).toBe(null)
expect(await browser.elementById('img').getAttribute('width')).toBe('200')
expect(await browser.elementById('img').getAttribute('height')).toBe(
diff --git a/test/integration/react-current-version/test/index.test.js b/test/integration/react-current-version/test/index.test.js
index 50638dcb928e56..c2a57fe80a4ad6 100644
--- a/test/integration/react-current-version/test/index.test.js
+++ b/test/integration/react-current-version/test/index.test.js
@@ -32,7 +32,7 @@ describe('Basics', () => {
const browser = await webdriver(context.appPort, '/')
expect(await browser.eval('window.didHydrate')).toBe(true)
expect(await browser.elementById('react-dom-version').text()).toMatch(
- /19/
+ /18/
)
})
diff --git a/test/lib/next-modes/base.ts b/test/lib/next-modes/base.ts
index 2797fa63a0cc93..3eecaba4be75e0 100644
--- a/test/lib/next-modes/base.ts
+++ b/test/lib/next-modes/base.ts
@@ -49,9 +49,10 @@ type OmitFirstArgument = F extends (
? (...args: P) => R
: never
+// TODO: Base this off of test matrix
// Do not rename or format. sync-react script relies on this line.
// prettier-ignore
-const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827";
+const nextjsReactPeerVersion = "^18.2.0";
export class NextInstance {
protected files: FileRef | { [filename: string]: string | FileRef }
diff --git a/test/production/custom-server/custom-server.test.ts b/test/production/custom-server/custom-server.test.ts
index aa287fdd192700..cc860b8cb24430 100644
--- a/test/production/custom-server/custom-server.test.ts
+++ b/test/production/custom-server/custom-server.test.ts
@@ -28,7 +28,7 @@ describe('custom server', () => {
it('should render pages with installed react', async () => {
const $ = await next.render$(`/2`)
- expect($('body').text()).toMatch(/pages: 19.0.0/)
+ expect($('body').text()).toMatch(/pages: 18\.\d+\.\d+\{/)
})
})
})
diff --git a/test/production/pages-dir/production/test/index.test.ts b/test/production/pages-dir/production/test/index.test.ts
index 8d16e87cdbe457..98b4b50e828dd3 100644
--- a/test/production/pages-dir/production/test/index.test.ts
+++ b/test/production/pages-dir/production/test/index.test.ts
@@ -29,6 +29,8 @@ if (process.env.TEST_WASM) {
jest.setTimeout(120 * 1000)
}
+const isReact18 = true
+
describe('Production Usage', () => {
const { next } = nextTestSetup({
files: path.join(__dirname, '../fixture'),
@@ -181,7 +183,9 @@ describe('Production Usage', () => {
/webpack-runtime\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
],
notTests: [/\0/, /\?/, /!/],
},
@@ -192,7 +196,9 @@ describe('Production Usage', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/next/,
],
notTests: [/\0/, /\?/, /!/],
@@ -204,7 +210,9 @@ describe('Production Usage', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/next/,
/node_modules\/nanoid\/index\.js/,
/node_modules\/nanoid\/url-alphabet\/index\.js/,
@@ -219,7 +227,9 @@ describe('Production Usage', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
- /node_modules\/react\/cjs\/react\.production\.js/,
+ isReact18
+ ? /node_modules\/react\/cjs\/react\.production\.min\.js/
+ : /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/next/,
],
notTests: [