From 59ea9d6985567fb2eca72aad2696b3943b622e45 Mon Sep 17 00:00:00 2001 From: Zack Tanner <1939140+ztanner@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:38:10 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"chore(next-codemod):=20move=20app-dir?= =?UTF-8?q?-runtime-config-experimental-edge=20to=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f15a3f48ad10bc45704ee08540a0bb125bff3fd5. --- .../11-upgrading/01-codemods.mdx | 50 +++++++++---------- packages/next-codemod/lib/utils.ts | 12 ++--- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/docs/02-app/01-building-your-application/11-upgrading/01-codemods.mdx b/docs/02-app/01-building-your-application/11-upgrading/01-codemods.mdx index 3a80222447eab..f92b18452438b 100644 --- a/docs/02-app/01-building-your-application/11-upgrading/01-codemods.mdx +++ b/docs/02-app/01-building-your-application/11-upgrading/01-codemods.mdx @@ -26,6 +26,30 @@ Replacing `` and `` with appropriate values. ### 15.0 +#### Transform App Router Route Segment Config `runtime` value from `experimental-edge` to `edge` + +##### `app-dir-runtime-config-experimental-edge` + +> **Note**: This codemod is App Router specific. + +```bash filename="Terminal" +npx @next/codemod@latest app-dir-runtime-config-experimental-edge . +``` + +This codemod transforms [Route Segment Config `runtime`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime) value `experimental-edge` to `edge`. + +For example: + +```ts +export const runtime = 'experimental-edge' +``` + +Transforms into: + +```ts +export const runtime = 'edge' +``` + #### Migrate to async Dynamic APIs APIs that opted into dynamic rendering that previously supported synchronous access are now asynchronous. You can read more about this breaking change in the [upgrade guide](/docs/app/building-your-application/upgrading/version-15). @@ -287,32 +311,6 @@ Transforms into: import { Inter } from 'next/font/google' ``` -### 13.1.2 - -#### Transform App Router Route Segment Config `runtime` value from `experimental-edge` to `edge` - -##### `app-dir-runtime-config-experimental-edge` - -> **Note**: This codemod is App Router specific. - -```bash filename="Terminal" -npx @next/codemod@latest app-dir-runtime-config-experimental-edge . -``` - -This codemod transforms [Route Segment Config `runtime`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime) value `experimental-edge` to `edge`. - -For example: - -```ts -export const runtime = 'experimental-edge' -``` - -Transforms into: - -```ts -export const runtime = 'edge' -``` - ### 13.0 #### Rename Next Image Imports diff --git a/packages/next-codemod/lib/utils.ts b/packages/next-codemod/lib/utils.ts index a7a28a1ce3d63..c895e5315dd0d 100644 --- a/packages/next-codemod/lib/utils.ts +++ b/packages/next-codemod/lib/utils.ts @@ -82,12 +82,6 @@ export const TRANSFORMER_INQUIRER_CHOICES = [ value: 'next-image-to-legacy-image', version: '13.0', }, - { - title: - 'Transform App Router Route Segment Config `runtime` value from `experimental-edge` to `edge`', - value: 'app-dir-runtime-config-experimental-edge', - version: '13.1.2', - }, { title: 'Uninstall `@next/font` and transform imports to `next/font`', value: 'built-in-next-font', @@ -122,4 +116,10 @@ export const TRANSFORMER_INQUIRER_CHOICES = [ value: 'next-async-request-api', version: '15.0.0-canary.171', }, + { + title: + 'Transform App Router Route Segment Config `runtime` value from `experimental-edge` to `edge`', + value: 'app-dir-runtime-config-experimental-edge', + version: '15.0.0-canary.179', + }, ]