Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/development/acceptance-app/ReactRefreshLogBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ describe('ReactRefreshLogBox app', () => {
"description": "no",
"environmentLabel": null,
"label": "Runtime Error",
"source": "index.js (3:7) @ {module evaluation}
"source": "index.js (3:7) @ module evaluation
> 3 | throw new Error('no')
| ^",
"stack": [
"{module evaluation} index.js (3:7)",
"{module evaluation} app/page.js (2:1)",
"module evaluation index.js (3:7)",
"module evaluation app/page.js (2:1)",
],
}
`)
Expand Down Expand Up @@ -1722,12 +1722,12 @@ export default function Home() {
"description": "utils error",
"environmentLabel": null,
"label": "Runtime Error",
"source": "app/utils.ts (1:7) @ {module evaluation}
"source": "app/utils.ts (1:7) @ module evaluation
> 1 | throw new Error('utils error')
| ^",
"stack": [
"{module evaluation} app/utils.ts (1:7)",
"{module evaluation} app/page.js (2:1)",
"module evaluation app/utils.ts (1:7)",
"module evaluation app/page.js (2:1)",
],
}
`)
Expand Down
16 changes: 8 additions & 8 deletions test/development/acceptance/ReactRefreshLogBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ describe('ReactRefreshLogBox', () => {
"description": "no",
"environmentLabel": null,
"label": "Runtime Error",
"source": "index.js (3:7) @ {module evaluation}
"source": "index.js (3:7) @ module evaluation
> 3 | throw new Error('no')
| ^",
"stack": [
"{module evaluation} index.js (3:7)",
"{module evaluation} pages/index.js (1:1)",
"{module evaluation} pages/index.js (1:1)",
"module evaluation index.js (3:7)",
"module evaluation pages/index.js (1:1)",
"module evaluation pages/index.js (1:1)",
"<FIXME-next-dist-dir>",
],
}
Expand Down Expand Up @@ -163,13 +163,13 @@ describe('ReactRefreshLogBox', () => {
"description": "no",
"environmentLabel": null,
"label": "Runtime Error",
"source": "index.js (3:7) @ {module evaluation}
"source": "index.js (3:7) @ module evaluation
> 3 | throw new Error('no')
| ^",
"stack": [
"{module evaluation} index.js (3:7)",
"{module evaluation} pages/index.js (1:1)",
"{module evaluation} pages/index.js (1:1)",
"module evaluation index.js (3:7)",
"module evaluation pages/index.js (1:1)",
"module evaluation pages/index.js (1:1)",
"<FIXME-next-dist-dir>",
],
}
Expand Down
16 changes: 8 additions & 8 deletions test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
"source": "app/exports/app-code/react-dom-server-node-explicit/page.js (1:1) @ {module evaluation}
"source": "app/exports/app-code/react-dom-server-node-explicit/page.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerNode from 'react-dom/server.node'
| ^
Expand All @@ -282,7 +282,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "react-dom/server is not supported in React Server Components.",
"source": "app/exports/app-code/react-dom-server-node-explicit/page.js (1:1) @ {module evaluation}
"source": "app/exports/app-code/react-dom-server-node-explicit/page.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerNode from 'react-dom/server.node'
| ^
Expand Down Expand Up @@ -409,7 +409,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
"source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
"source": "internal-pkg/server.node.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
| ^
Expand All @@ -422,7 +422,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "react-dom/server is not supported in React Server Components.",
"source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
"source": "internal-pkg/server.node.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
| ^
Expand Down Expand Up @@ -610,7 +610,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
"source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
"source": "internal-pkg/server.node.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
| ^
Expand All @@ -623,7 +623,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "react-dom/server is not supported in React Server Components.",
"source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
"source": "internal-pkg/server.node.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
| ^
Expand Down Expand Up @@ -668,7 +668,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
"source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
"source": "internal-pkg/server.node.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
| ^
Expand All @@ -681,7 +681,7 @@ describe('react-dom/server in React Server environment', () => {
expect(redbox).toMatchInlineSnapshot(`
{
"description": "react-dom/server is not supported in React Server Components.",
"source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
"source": "internal-pkg/server.node.js (1:1) @ module evaluation

> 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
| ^
Expand Down
6 changes: 3 additions & 3 deletions test/development/middleware-errors/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ describe('middleware - development errors', () => {
isTurbopack
? '\n ⨯ Error: booooom!' +
// TODO(veil): Should be sourcemapped
'\n at __TURBOPACK__module__evaluation__ (middleware.js:3:13)'
'\n at module evaluation (middleware.js:3:13)'
: '\n ⨯ Error: booooom!' +
// TODO: Should be anonymous method without a method name
'\n at <unknown> (middleware.js:3)' +
Expand All @@ -317,11 +317,11 @@ describe('middleware - development errors', () => {
"description": "booooom!",
"environmentLabel": null,
"label": "Runtime Error",
"source": "middleware.js (3:13) @ {module evaluation}
"source": "middleware.js (3:13) @ module evaluation
> 3 | throw new Error('booooom!')
| ^",
"stack": [
"{module evaluation} middleware.js (3:13)",
"module evaluation middleware.js (3:13)",
],
}
`)
Expand Down
4 changes: 2 additions & 2 deletions test/development/pages-dir/client-navigation/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@ describe('Client Navigation', () => {
"description": "An Expected error occurred",
"environmentLabel": null,
"label": "Runtime Error",
"source": "pages/error-in-the-browser-global-scope.js (2:9) @ {module evaluation}
"source": "pages/error-in-the-browser-global-scope.js (2:9) @ module evaluation
> 2 | throw new Error('An Expected error occurred')
| ^",
"stack": [
"{module evaluation} pages/error-in-the-browser-global-scope.js (2:9)",
"module evaluation pages/error-in-the-browser-global-scope.js (2:9)",
],
}
`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ describe('Client Navigation rendering', () => {
"description": "aa is not defined",
"environmentLabel": null,
"label": "Runtime ReferenceError",
"source": "pages/error-in-the-global-scope.js (1:1) @ {module evaluation}
"source": "pages/error-in-the-global-scope.js (1:1) @ module evaluation
> 1 | aa = 10 //eslint-disable-line
| ^",
"stack": [
"{module evaluation} pages/error-in-the-global-scope.js (1:1)",
"module evaluation pages/error-in-the-global-scope.js (1:1)",
"<FIXME-next-dist-dir>",
],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2699,11 +2699,11 @@ describe('Cache Components Errors', () => {
"description": ""use cache: private" must not be used within \`unstable_cache()\`.",
"environmentLabel": null,
"label": "Runtime Error",
"source": "app/use-cache-private-in-unstable-cache/page.tsx (21:38) @ {module evaluation}
"source": "app/use-cache-private-in-unstable-cache/page.tsx (21:38) @ module evaluation
> 21 | const getCachedData = unstable_cache(async () => {
| ^",
"stack": [
"{module evaluation} app/use-cache-private-in-unstable-cache/page.tsx (21:38)",
"module evaluation app/use-cache-private-in-unstable-cache/page.tsx (21:38)",
"<FIXME-next-dist-dir>",
],
}
Expand Down Expand Up @@ -2758,7 +2758,7 @@ describe('Cache Components Errors', () => {
if (isDebugPrerender) {
expect(output).toMatchInlineSnapshot(`
"Error: "use cache: private" must not be used within \`unstable_cache()\`.
at __TURBOPACK__module__evaluation__ (bundler:///app/use-cache-private-in-unstable-cache/page.tsx:21:38)
at module evaluation (bundler:///app/use-cache-private-in-unstable-cache/page.tsx:21:38)
at a (<next-dist-dir>)
19 | }
20 |
Expand All @@ -2776,7 +2776,7 @@ describe('Cache Components Errors', () => {
} else {
expect(output).toMatchInlineSnapshot(`
"Error: "use cache: private" must not be used within \`unstable_cache()\`.
at __TURBOPACK__module__evaluation__ (bundler:///app/use-cache-private-in-unstable-cache/page.tsx:21:38)
at module evaluation (bundler:///app/use-cache-private-in-unstable-cache/page.tsx:21:38)
19 | }
20 |
> 21 | const getCachedData = unstable_cache(async () => {
Expand Down Expand Up @@ -2870,11 +2870,11 @@ describe('Cache Components Errors', () => {
"description": ""use cache: private" must not be used within "use cache". It can only be nested inside of another "use cache: private".",
"environmentLabel": null,
"label": "Runtime Error",
"source": "app/use-cache-private-in-use-cache/page.tsx (15:1) @ {module evaluation}
"source": "app/use-cache-private-in-use-cache/page.tsx (15:1) @ module evaluation
> 15 | async function Private() {
| ^",
"stack": [
"{module evaluation} app/use-cache-private-in-use-cache/page.tsx (15:1)",
"module evaluation app/use-cache-private-in-use-cache/page.tsx (15:1)",
"<FIXME-next-dist-dir>",
],
}
Expand Down Expand Up @@ -2930,7 +2930,7 @@ describe('Cache Components Errors', () => {
if (isDebugPrerender) {
expect(output).toMatchInlineSnapshot(`
"Error: "use cache: private" must not be used within "use cache". It can only be nested inside of another "use cache: private".
at __TURBOPACK__module__evaluation__ (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
at module evaluation (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
at a (<next-dist-dir>)
13 | }
14 |
Expand All @@ -2940,7 +2940,7 @@ describe('Cache Components Errors', () => {
17 |
18 | return <p>Private</p>
Error: "use cache: private" must not be used within "use cache". It can only be nested inside of another "use cache: private".
at __TURBOPACK__module__evaluation__ (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
at module evaluation (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
at b (<next-dist-dir>)
13 | }
14 |
Expand All @@ -2958,7 +2958,7 @@ describe('Cache Components Errors', () => {
} else {
expect(output).toMatchInlineSnapshot(`
"Error: "use cache: private" must not be used within "use cache". It can only be nested inside of another "use cache: private".
at __TURBOPACK__module__evaluation__ (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
at module evaluation (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
13 | }
14 |
> 15 | async function Private() {
Expand All @@ -2967,7 +2967,7 @@ describe('Cache Components Errors', () => {
17 |
18 | return <p>Private</p>
Error: "use cache: private" must not be used within "use cache". It can only be nested inside of another "use cache: private".
at __TURBOPACK__module__evaluation__ (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
at module evaluation (bundler:///app/use-cache-private-in-use-cache/page.tsx:15:1)
13 | }
14 |
> 15 | async function Private() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ describe('non-root-project-monorepo', () => {
if (isTurbopack) {
// TODO the function name should be hidden
expect(await getRedboxSource(browser)).toMatchInlineSnapshot(`
"app/separate-file.ts (1:7) @ {module evaluation}
"app/separate-file.ts (1:7) @ module evaluation

> 1 | throw new Error('Expected error')
| ^
2 |"
`)
expect(await getRedboxCallStack(browser)).toMatchInlineSnapshot(`
[
"{module evaluation} app/separate-file.ts (1:7)",
"module evaluation app/separate-file.ts (1:7)",
"innerArrowFunction app/source-maps-rsc/page.tsx (13:28)",
"innerFunction app/source-maps-rsc/page.tsx (10:3)",
"Page app/source-maps-rsc/page.tsx (4:5)",
Expand Down Expand Up @@ -153,15 +153,15 @@ describe('non-root-project-monorepo', () => {
if (isTurbopack) {
// TODO the function name should be hidden
expect(await getRedboxSource(browser)).toMatchInlineSnapshot(`
"app/separate-file.ts (1:7) @ {module evaluation}
"app/separate-file.ts (1:7) @ module evaluation

> 1 | throw new Error('Expected error')
| ^
2 |"
`)
expect(await getRedboxCallStack(browser)).toMatchInlineSnapshot(`
[
"{module evaluation} app/separate-file.ts (1:7)",
"module evaluation app/separate-file.ts (1:7)",
"innerArrowFunction app/source-maps-ssr/page.tsx (15:28)",
"innerFunction app/source-maps-ssr/page.tsx (12:3)",
"Page app/source-maps-ssr/page.tsx (6:5)",
Expand Down Expand Up @@ -216,15 +216,15 @@ describe('non-root-project-monorepo', () => {
if (isTurbopack) {
// TODO the function name should be hidden
expect(await getRedboxSource(browser)).toMatchInlineSnapshot(`
"app/separate-file.ts (1:7) @ {module evaluation}
"app/separate-file.ts (1:7) @ module evaluation

> 1 | throw new Error('Expected error')
| ^
2 |"
`)
expect(await getRedboxCallStack(browser)).toMatchInlineSnapshot(`
[
"{module evaluation} app/separate-file.ts (1:7)",
"module evaluation app/separate-file.ts (1:7)",
"innerArrowFunction app/source-maps-client/page.tsx (16:28)",
"innerFunction app/source-maps-client/page.tsx (13:3)",
"effectCallback app/source-maps-client/page.tsx (7:5)",
Expand Down
16 changes: 8 additions & 8 deletions test/e2e/app-dir/server-source-maps/server-source-maps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,10 @@ describe('app-dir - server source maps', () => {
'' +
'\nError: module-evaluation' +
// TODO(veil): Should map to no name like you'd get with native stacks without a bundler.
'\n at __TURBOPACK__module__evaluation__ (app/module-evaluation/module.js:1:22)' +
'\n at module evaluation (app/module-evaluation/module.js:1:22)' +
// TODO(veil): Added frames from bundler should be sourcemapped (https://linear.app/vercel/issue/NDX-509/)
'\n at __TURBOPACK__module__evaluation__ (app/module-evaluation/page.js:1:1)' +
'\n at __TURBOPACK__module__evaluation__ (.next'
'\n at module evaluation (app/module-evaluation/page.js:1:1)' +
'\n at module evaluation (.next'
)
} else {
expect(cliOutput).toContain(
Expand All @@ -474,13 +474,13 @@ describe('app-dir - server source maps', () => {
"description": "module-evaluation",
"environmentLabel": "Prerender",
"label": "Console Error",
"source": "app/module-evaluation/module.js (1:22) @ {module evaluation}
"source": "app/module-evaluation/module.js (1:22) @ module evaluation
> 1 | export const error = new Error('module-evaluation')
| ^",
"stack": [
"{module evaluation} app/module-evaluation/module.js (1:22)",
"{module evaluation} app/module-evaluation/page.js (1:1)",
"{module evaluation} app/module-evaluation/page.js (6:1)",
"module evaluation app/module-evaluation/module.js (1:22)",
"module evaluation app/module-evaluation/page.js (1:1)",
"module evaluation app/module-evaluation/page.js (6:1)",
"Array.map <anonymous>",
"Function.all <anonymous>",
"Page <anonymous>",
Expand Down Expand Up @@ -536,7 +536,7 @@ describe('app-dir - server source maps', () => {
'' +
'\nError: module-evaluation' +
// TODO(veil): Turbopack internals. Feel free to update. Tracked in https://linear.app/vercel/issue/NEXT-4362
'\n at __TURBOPACK__module__evaluation__ (bundler:///app/module-evaluation/module.js:1:22)'
'\n at module evaluation (bundler:///app/module-evaluation/module.js:1:22)'
)
expect(normalizeCliOutput(next.cliOutput)).toContain(
'' +
Expand Down
Loading
Loading