Skip to content

Remove force writing **/*.mts to tsconfig - #83967

Merged
devjiwonchoi merged 2 commits into
canaryfrom
jiwon/09-19-remove_force_writing___.mts_to_tsconfig
Sep 18, 2025
Merged

devjiwonchoi merged 2 commits into
canaryfrom
jiwon/09-19-remove_force_writing___.mts_to_tsconfig

Conversation

@devjiwonchoi

@devjiwonchoi devjiwonchoi commented Sep 18, 2025 •

Copy link
Copy Markdown
Member

It was added at #83556. We don't force writing **/*.tsx or **/*.ts to tsconfig, but forcing **/*.mts is too harsh, when its intention was to support next.config.mts. Just for the empty tsconfig or empty include was enough.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels Sep 18, 2025

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ijjk

ijjk commented Sep 18, 2025 •

Copy link
Copy Markdown
Member

Failing test suites

Commit: cfe5c22 | About building and testing Next.js

pnpm test-dev-turbo test/development/api-cors-with-rewrite/index.test.ts (turbopack)

  • Rewritten API Requests should pass OPTIONS requests to the api function > should pass OPTIONS requests to the api function (DD)
Expand output

● Rewritten API Requests should pass OPTIONS requests to the api function › should pass OPTIONS requests to the api function

next dev exited unexpectedly with code/signal 1

  91 |           if (code || signal) {
  92 |             this.childProcess = undefined
> 93 |             const error = new Error(
     |                           ^
  94 |               `next dev exited unexpectedly with code/signal ${code || signal}`
  95 |             )
  96 |             clearTimeout(serverReadyTimeoutId)

  at ChildProcess.<anonymous> (lib/next-modes/next-dev.ts:93:27)

● Test suite failed to run

TypeError: Cannot read properties of undefined (reading 'destroy')

  32 |     })
  33 |   })
> 34 |   afterAll(() => next.destroy())
     |                       ^
  35 |
  36 |   it('should pass OPTIONS requests to the api function', async () => {
  37 |     const res = await fetchViaHTTP(next.url, '/some-endpoint', null, {

  at Object.destroy (development/api-cors-with-rewrite/index.test.ts:34:23)

pnpm test-dev-turbo test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts (turbopack)

  • parallel-routes-and-interception > route intercepting > should support intercepting local dynamic sibling routes (DD)
  • parallel-routes-and-interception > route intercepting with prerendered dynamic routes > should render intercepted route (DD)
Expand output

● parallel-routes-and-interception › route intercepting with prerendered dynamic routes › should render intercepted route

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#photo-intercepted-1') to be visible

  511 |
  512 |     return this.startChain(async () => {
> 513 |       const el = await page.waitForSelector(selector, {
      |                             ^
  514 |         timeout,
  515 |         state,
  516 |       })

  at waitForSelector (lib/browsers/playwright.ts:513:29)
  at Playwright._chain (lib/browsers/playwright.ts:643:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:624:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:512:17)
  at waitForElementByCss (e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts:506:25)
  at fn (lib/next-test-utils.ts:828:20)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts:504:7)
  at Proxy._chain (lib/browsers/playwright.ts:643:23)
  at Proxy._chain (lib/browsers/playwright.ts:619:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:425:17)
  at text (e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts:506:69)
  at fn (lib/next-test-utils.ts:828:20)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts:504:7)

● parallel-routes-and-interception › route intercepting › should support intercepting local dynamic sibling routes

TIMED OUT: 1

(.)_NEXTSEP_(.)_NEXTSEP_(.)_NEXTSEP_1

undefined

  753 |
  754 |   if (hardError) {
> 755 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  756 |   }
  757 |   return false
  758 | }

  at check (lib/next-test-utils.ts:755:11)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts:839:7)

@devjiwonchoi
devjiwonchoi marked this pull request as ready for review September 18, 2025 22:08
Comment thread packages/next/src/lib/typescript/writeConfigurationDefaults.test.ts
@devjiwonchoi
devjiwonchoi merged commit 1d4017e into canary Sep 18, 2025
162 of 166 checks passed
@devjiwonchoi
devjiwonchoi deleted the jiwon/09-19-remove_force_writing___.mts_to_tsconfig branch September 18, 2025 22:31
@github-actions github-actions Bot added the locked label Oct 3, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants