Skip to content

Commit c226c9a

Browse files
committed
[DevOverlay]: enable by default
1 parent 026f00e commit c226c9a

File tree

24 files changed

+313
-261
lines changed

24 files changed

+313
-261
lines changed

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ jobs:
581581
uses: ./.github/workflows/build_reusable.yml
582582
with:
583583
nodeVersion: 18.18.2
584-
afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" node run-tests.js --timings -c ${TEST_CONCURRENCY} --type integration
584+
afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=false NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" node run-tests.js --timings -c ${TEST_CONCURRENCY} --type integration
585585
stepName: 'test-ppr-integration'
586586
secrets: inherit
587587

@@ -596,7 +596,7 @@ jobs:
596596
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
597597
uses: ./.github/workflows/build_reusable.yml
598598
with:
599-
afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=dev node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type development
599+
afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=false NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=dev node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type development
600600
stepName: 'test-ppr-dev-${{ matrix.group }}'
601601
secrets: inherit
602602

@@ -611,7 +611,7 @@ jobs:
611611
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
612612
uses: ./.github/workflows/build_reusable.yml
613613
with:
614-
afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=start node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type production
614+
afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=false NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=start node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type production
615615
stepName: 'test-ppr-prod-${{ matrix.group }}'
616616
secrets: inherit
617617

packages/next/src/server/config-shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ export const defaultConfig: NextConfig = {
12531253
staticGenerationMinPagesPerWorker: 25,
12541254
dynamicIO: false,
12551255
inlineCss: false,
1256-
newDevOverlay: false,
1256+
newDevOverlay: true,
12571257
streamingMetadata: false,
12581258
htmlLimitedBots: undefined,
12591259
useCache: undefined,

packages/next/src/server/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,8 @@ function assignDefaults(
923923
// TODO(jiwon): remove once we've made new UI default
924924
// Enable reactOwnerStack when newDevOverlay is enabled to have
925925
// better call stack output in the new UI.
926-
if (process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY === 'true') {
927-
result.experimental.newDevOverlay = true
926+
if (process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY === 'false') {
927+
result.experimental.newDevOverlay = false
928928
}
929929
if (result.experimental.newDevOverlay) {
930930
result.experimental.reactOwnerStack = true

run-tests.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ const ENDGROUP = process.env.CI ? '##[endgroup]' : ''
5050

5151
const externalTestsFilter = getTestFilter()
5252

53+
// TODO(new-dev-overlay): Remove this once old dev overlay fork is removed
54+
if (!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY) {
55+
console.log('Setting __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY to true')
56+
process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY = 'true'
57+
} else {
58+
console.log(
59+
'__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY is already set to',
60+
process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY
61+
)
62+
}
63+
5364
const timings = []
5465
const DEFAULT_NUM_RETRIES = 2
5566
const DEFAULT_CONCURRENCY = 2

test/development/acceptance-app/ReactRefreshLogBox-builtins.test.ts

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,27 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
5050
await session.assertHasRedbox()
5151
if (process.env.TURBOPACK) {
5252
expect(await session.getRedboxSource()).toMatchInlineSnapshot(`
53-
"./node_modules/my-package/index.js:1:13
54-
Module not found: Can't resolve 'dns'
55-
> 1 | const dns = require('dns')
56-
| ^^^^^^^^^^^^^^
57-
2 | module.exports = dns
53+
"./node_modules/my-package/index.js (1:13)
54+
Module not found: Can't resolve 'dns'
55+
> 1 | const dns = require('dns')
56+
| ^^^^^^^^^^^^^^
57+
2 | module.exports = dns
5858
59-
https://nextjs.org/docs/messages/module-not-found"
59+
https://nextjs.org/docs/messages/module-not-found"
6060
`)
6161
} else {
6262
expect(await session.getRedboxSource()).toMatchInlineSnapshot(`
63-
"./node_modules/my-package/index.js:1:1
64-
Module not found: Can't resolve 'dns'
65-
> 1 | const dns = require('dns')
66-
| ^
67-
2 | module.exports = dns
63+
"./node_modules/my-package/index.js (1:1)
64+
Module not found: Can't resolve 'dns'
65+
> 1 | const dns = require('dns')
66+
| ^
67+
2 | module.exports = dns
6868
69-
https://nextjs.org/docs/messages/module-not-found
69+
https://nextjs.org/docs/messages/module-not-found
7070
71-
Import trace for requested module:
72-
./index.js
73-
./app/page.js"
71+
Import trace for requested module:
72+
./index.js
73+
./app/page.js"
7474
`)
7575
}
7676
})
@@ -98,30 +98,30 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
9898
const source = await session.getRedboxSource()
9999
if (process.env.TURBOPACK) {
100100
expect(source).toMatchInlineSnapshot(`
101-
"./index.js:1:1
102-
Module not found: Can't resolve 'b'
103-
> 1 | import Comp from 'b'
104-
| ^^^^^^^^^^^^^^^^^^^^
105-
2 | export default function Oops() {
106-
3 | return (
107-
4 | <div>
108-
109-
https://nextjs.org/docs/messages/module-not-found"
101+
"./index.js (1:1)
102+
Module not found: Can't resolve 'b'
103+
> 1 | import Comp from 'b'
104+
| ^^^^^^^^^^^^^^^^^^^^
105+
2 | export default function Oops() {
106+
3 | return (
107+
4 | <div>
108+
109+
https://nextjs.org/docs/messages/module-not-found"
110110
`)
111111
} else {
112112
expect(source).toMatchInlineSnapshot(`
113-
"./index.js:1:1
114-
Module not found: Can't resolve 'b'
115-
> 1 | import Comp from 'b'
116-
| ^
117-
2 | export default function Oops() {
118-
3 | return (
119-
4 | <div>
120-
121-
https://nextjs.org/docs/messages/module-not-found
122-
123-
Import trace for requested module:
124-
./app/page.js"
113+
"./index.js (1:1)
114+
Module not found: Can't resolve 'b'
115+
> 1 | import Comp from 'b'
116+
| ^
117+
2 | export default function Oops() {
118+
3 | return (
119+
4 | <div>
120+
121+
https://nextjs.org/docs/messages/module-not-found
122+
123+
Import trace for requested module:
124+
./app/page.js"
125125
`)
126126
}
127127
})
@@ -150,29 +150,29 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
150150
const source = await session.getRedboxSource()
151151
if (process.env.TURBOPACK) {
152152
expect(source).toMatchInlineSnapshot(`
153-
"./app/page.js:2:1
154-
Module not found: Can't resolve 'b'
155-
1 | 'use client'
156-
> 2 | import Comp from 'b'
157-
| ^^^^^^^^^^^^^^^^^^^^
158-
3 | export default function Oops() {
159-
4 | return (
160-
5 | <div>
161-
162-
https://nextjs.org/docs/messages/module-not-found"
153+
"./app/page.js (2:1)
154+
Module not found: Can't resolve 'b'
155+
1 | 'use client'
156+
> 2 | import Comp from 'b'
157+
| ^^^^^^^^^^^^^^^^^^^^
158+
3 | export default function Oops() {
159+
4 | return (
160+
5 | <div>
161+
162+
https://nextjs.org/docs/messages/module-not-found"
163163
`)
164164
} else {
165165
expect(source).toMatchInlineSnapshot(`
166-
"./app/page.js:2:1
167-
Module not found: Can't resolve 'b'
168-
1 | 'use client'
169-
> 2 | import Comp from 'b'
170-
| ^
171-
3 | export default function Oops() {
172-
4 | return (
173-
5 | <div>
174-
175-
https://nextjs.org/docs/messages/module-not-found"
166+
"./app/page.js (2:1)
167+
Module not found: Can't resolve 'b'
168+
1 | 'use client'
169+
> 2 | import Comp from 'b'
170+
| ^
171+
3 | export default function Oops() {
172+
4 | return (
173+
5 | <div>
174+
175+
https://nextjs.org/docs/messages/module-not-found"
176176
`)
177177
}
178178
})
@@ -199,29 +199,29 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
199199
const source = await session.getRedboxSource()
200200
if (process.env.TURBOPACK) {
201201
expect(source).toMatchInlineSnapshot(`
202-
"./app/page.js:2:1
203-
Module not found: Can't resolve './non-existent.css'
204-
1 | 'use client'
205-
> 2 | import './non-existent.css'
206-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
207-
3 | export default function Page(props) {
208-
4 | return <p>index page</p>
209-
5 | }
210-
211-
https://nextjs.org/docs/messages/module-not-found"
202+
"./app/page.js (2:1)
203+
Module not found: Can't resolve './non-existent.css'
204+
1 | 'use client'
205+
> 2 | import './non-existent.css'
206+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
207+
3 | export default function Page(props) {
208+
4 | return <p>index page</p>
209+
5 | }
210+
211+
https://nextjs.org/docs/messages/module-not-found"
212212
`)
213213
} else {
214214
expect(source).toMatchInlineSnapshot(`
215-
"./app/page.js:2:1
216-
Module not found: Can't resolve './non-existent.css'
217-
1 | 'use client'
218-
> 2 | import './non-existent.css'
219-
| ^
220-
3 | export default function Page(props) {
221-
4 | return <p>index page</p>
222-
5 | }
223-
224-
https://nextjs.org/docs/messages/module-not-found"
215+
"./app/page.js (2:1)
216+
Module not found: Can't resolve './non-existent.css'
217+
1 | 'use client'
218+
> 2 | import './non-existent.css'
219+
| ^
220+
3 | export default function Page(props) {
221+
4 | return <p>index page</p>
222+
5 | }
223+
224+
https://nextjs.org/docs/messages/module-not-found"
225225
`)
226226
}
227227
await session.patch(

0 commit comments

Comments
 (0)