Commit a8fbf5ea authored by Niklas Mischkulnig's avatar Niklas Mischkulnig

Update snapshots

parent 0ef0cdef
......@@ -27,7 +27,7 @@ describe('after() - invalid usages', () => {
await waitForRedbox(session)
expect(await getRedboxSource(session)).toMatch(
/You're importing a component that needs "?after"?\. That only works in a Server Component but one of its parents is marked with "use client", so it's a Client Component\./
/'after' cannot be imported from a Client Component module/
)
expect(getAfterLogs()).toHaveLength(0)
})
......
......@@ -192,11 +192,12 @@ describe('react-dom/server in React Server environment', () => {
} else if (isRspack) {
await expect(browser).toDisplayRedbox(`
{
"description": " ╰─▶ × Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.",
"description": " ╰─▶ × Error: x 'react-dom/server' cannot be imported from a Server Component module.",
"environmentLabel": null,
"label": "Build Error",
"source": "<FIXME-nextjs-internal-source>
╰─▶ × Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
╰─▶ × Error: x 'react-dom/server' cannot be imported from a Server Component module.
│ | To fix it, render or return the content directly as a Server Component instead for perf and security.
│ | Learn more: https://nextjs.org/docs/app/building-your-application/rendering
│ ,-[1:1]
│ 1 | import * as ReactDOMServerEdge from 'react-dom/server'
......@@ -204,7 +205,8 @@ describe('react-dom/server in React Server environment', () => {
│ 2 | // Fine to drop once React is on ESM
│ 3 | import ReactDOMServerEdgeDefault from 'react-dom/server'
│ \`----
│ x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
│ x 'react-dom/server' cannot be imported from a Server Component module.
│ | To fix it, render or return the content directly as a Server Component instead for perf and security.
│ | Learn more: https://nextjs.org/docs/app/building-your-application/rendering
│ ,-[3:1]
│ 1 | import * as ReactDOMServerEdge from 'react-dom/server'
......@@ -224,11 +226,12 @@ describe('react-dom/server in React Server environment', () => {
// Observed: `./node_modules/.pnpm/next@file+..+next-repo.../page.js?__next_edge_ssr_entry__
await expect(browser).toDisplayRedbox(`
{
"description": " x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.",
"description": " x 'react-dom/server' cannot be imported from a Server Component module.",
"environmentLabel": null,
"label": "Build Error",
"source": "<FIXME-nextjs-internal-source>
Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
Error: x 'react-dom/server' cannot be imported from a Server Component module.
| To fix it, render or return the content directly as a Server Component instead for perf and security.
| Learn more: https://nextjs.org/docs/app/building-your-application/rendering
,-[1:1]
1 | import * as ReactDOMServerEdge from 'react-dom/server'
......@@ -236,7 +239,8 @@ describe('react-dom/server in React Server environment', () => {
2 | // Fine to drop once React is on ESM
3 | import ReactDOMServerEdgeDefault from 'react-dom/server'
\`----
x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
x 'react-dom/server' cannot be imported from a Server Component module.
| To fix it, render or return the content directly as a Server Component instead for perf and security.
| Learn more: https://nextjs.org/docs/app/building-your-application/rendering
,-[3:1]
1 | import * as ReactDOMServerEdge from 'react-dom/server'
......@@ -340,9 +344,10 @@ describe('react-dom/server in React Server environment', () => {
} else if (isRspack) {
expect(redbox).toMatchInlineSnapshot(`
{
"description": " ╰─▶ × Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.",
"description": " ╰─▶ × Error: x 'react-dom/server' cannot be imported from a Server Component module.",
"source": "./app/exports/app-code/react-dom-server-node-implicit/page.js
╰─▶ × Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
╰─▶ × Error: x 'react-dom/server' cannot be imported from a Server Component module.
│ | To fix it, render or return the content directly as a Server Component instead for perf and security.
│ | Learn more: https://nextjs.org/docs/app/building-your-application/rendering
│ ,-[1:1]
│ 1 | import * as ReactDOMServerNode from 'react-dom/server'
......@@ -350,7 +355,8 @@ describe('react-dom/server in React Server environment', () => {
│ 2 | // Fine to drop once React is on ESM
│ 3 | import ReactDOMServerNodeDefault from 'react-dom/server'
│ \`----
│ x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
│ x 'react-dom/server' cannot be imported from a Server Component module.
│ | To fix it, render or return the content directly as a Server Component instead for perf and security.
│ | Learn more: https://nextjs.org/docs/app/building-your-application/rendering
│ ,-[3:1]
│ 1 | import * as ReactDOMServerNode from 'react-dom/server'
......@@ -366,9 +372,10 @@ describe('react-dom/server in React Server environment', () => {
} else {
expect(redbox).toMatchInlineSnapshot(`
{
"description": " x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.",
"description": " x 'react-dom/server' cannot be imported from a Server Component module.",
"source": "./app/exports/app-code/react-dom-server-node-implicit/page.js
Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
Error: x 'react-dom/server' cannot be imported from a Server Component module.
| To fix it, render or return the content directly as a Server Component instead for perf and security.
| Learn more: https://nextjs.org/docs/app/building-your-application/rendering
,-[1:1]
1 | import * as ReactDOMServerNode from 'react-dom/server'
......@@ -376,7 +383,8 @@ describe('react-dom/server in React Server environment', () => {
2 | // Fine to drop once React is on ESM
3 | import ReactDOMServerNodeDefault from 'react-dom/server'
\`----
x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
x 'react-dom/server' cannot be imported from a Server Component module.
| To fix it, render or return the content directly as a Server Component instead for perf and security.
| Learn more: https://nextjs.org/docs/app/building-your-application/rendering
,-[3:1]
1 | import * as ReactDOMServerNode from 'react-dom/server'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment