Skip to content

Commit aedeae4

Browse files
authored
clean up REQUIRES_CANARY_FOR_CACHE_COMPONENTS (#65)
1 parent ecbf55b commit aedeae4

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

src/prompts/upgrade-nextjs-16-prompt.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -206,19 +206,6 @@ Run the official codemod to handle most changes automatically:
206206

207207
**Wait for codemod to complete and verify both build and browser tests before proceeding to Phase 3**
208208

209-
{{IF_REQUIRES_CANARY}}
210-
**⚠️ TEMPORARY: Upgrade to Canary (Optional for Advanced Caching)**
211-
212-
If your project already uses `'use cache'` directives from Next.js 15 canary, you may want to continue with canary:
213-
214-
```bash
215-
<pkg-manager> add next@canary
216-
<pkg-manager> add -D eslint-config-next@canary
217-
```
218-
219-
Otherwise, the stable version is recommended for most projects.
220-
{{/IF_REQUIRES_CANARY}}
221-
222209
## PHASE 3: Analyze Remaining Issues
223210
────────────────────────────────────────
224211
After the codemod runs, check for any remaining issues it might have missed:
@@ -344,14 +331,6 @@ After the codemod runs, check for any remaining issues it might have missed:
344331

345332
**📖 For code examples, see: `nextjs16://migration/examples` (Config Migration Examples)**
346333

347-
{{IF_BETA_CHANNEL}}**J. Beta to Stable Migration (REQUIRED for beta channel users)**
348-
349-
You are currently upgrading to Next.js 16 **beta** channel. When Next.js 16 **stable** is released, you will need to apply additional config migrations:
350-
351-
{{BETA_TO_STABLE_GUIDE}}
352-
353-
**Key migration when stable is released**: `experimental.cacheLife` must be moved to top-level `cacheLife`{{/IF_BETA_CHANNEL}}
354-
355334
**K. Edge Cases the Codemod May Miss**
356335
Review these manually:
357336

src/prompts/upgrade-nextjs-16.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ export default function getUpgradeNextjs16Prompt(args: InferSchema<typeof schema
3535

3636
const { version } = checkNextjs16Availability()
3737
const upgradeChannel = "latest"
38-
39-
const REQUIRES_CANARY_FOR_CACHE_COMPONENTS = true
40-
4138
const codemodCommandNote = `**Note**: Next.js 16 stable (version ${version}) is now available.`
4239

4340
let promptTemplate = readResourceFile("prompts/upgrade-nextjs-16-prompt.md")
@@ -47,20 +44,5 @@ export default function getUpgradeNextjs16Prompt(args: InferSchema<typeof schema
4744
promptTemplate = promptTemplate.replace(/{{UPGRADE_CHANNEL}}/g, upgradeChannel)
4845
promptTemplate = promptTemplate.replace(/{{CODEMOD_COMMAND}}/g, codemodCommandNote)
4946

50-
if (REQUIRES_CANARY_FOR_CACHE_COMPONENTS) {
51-
promptTemplate = promptTemplate.replace(/{{IF_REQUIRES_CANARY}}\n?/g, "")
52-
promptTemplate = promptTemplate.replace(/\n?{{\/IF_REQUIRES_CANARY}}/g, "")
53-
} else {
54-
promptTemplate = promptTemplate.replace(
55-
/{{IF_REQUIRES_CANARY}}[\s\S]*?{{\/IF_REQUIRES_CANARY}}\n?/g,
56-
""
57-
)
58-
}
59-
60-
promptTemplate = promptTemplate.replace(
61-
/{{IF_BETA_CHANNEL}}[\s\S]*?{{\/IF_BETA_CHANNEL}}\n?/g,
62-
""
63-
)
64-
6547
return promptTemplate
6648
}

0 commit comments

Comments
 (0)