Skip to content

chore: mark defineNitroConfig and CacheOptions as deprecated - #4838

Merged
pi0 merged 1 commit into
mainfrom
chore/deprecate-legacy-aliases
Oct 18, 2026
Merged

pi0 merged 1 commit into
mainfrom
chore/deprecate-legacy-aliases

Conversation

@pi0x

@pi0x pi0x commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Marks the last two v2 migration aliases in the public API as @deprecated, so editors flag them before RC. Both keep working.

  • defineNitroConfig (nitro/config): use defineConfig from nitro.
  • CacheOptions (nitro/types): use CachedFunctionOptions. It is now a deprecated alias instead of a plain ocache re-export.

test/minimal now uses defineConfig from nitro, and the utils docs call the alias deprecated.

🤖 Generated with AI assistant

@pi0x
pi0x requested a review from pi0 as a code owner October 18, 2026 02:52
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro.build Ready Ready Preview Oct 18, 2026 2:52am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e99a2fda-49ba-442c-a28e-33590030cef1
📥 Commits

Reviewing files that changed from the base of the PR and between 6fe4056 and 6b3694b.

📒 Files selected for processing: 4
  • docs/1.docs/62.utils.md
  • src/runtime/config.ts
  • src/types/runtime/cache.ts
  • test/minimal/nitro.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The PR marks defineNitroConfig as a deprecated alias, updates the minimal config to use defineConfig, and adds a deprecated local CacheOptions type alias.

Changes: Config alias

Layer / File(s) Summary
Config alias and usage
src/runtime/config.ts, docs/1.docs/62.utils.md, test/minimal/nitro.config.ts
defineNitroConfig is declared as a deprecated alias of defineConfig. The documentation marks the alias as deprecated, and the minimal config uses defineConfig.

Cache option types

Layer / File(s) Summary
Cache option type aliases
src/types/runtime/cache.ts
CachedFunctionOptions now uses the imported OCacheOptions type. A deprecated generic CacheOptions alias points to CachedFunctionOptions.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 6b369

The deprecated configuration alias remains available, the replacement import is supported, and the cache type alias preserves compatibility. No actionable merge risk remains.

Security architecture risk: ⚪ Minimal · up to 6b369

The deprecated names remain available. The configuration helper still calls the same implementation, and the cache-option aliases retain the same underlying type. No material security risk was identified in these changes.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated impact is limited to public API consumers receiving deprecation guidance and the minimal fixture adopting an existing export. The inspected changes do not expand attacker-controlled reachability into cache execution or configuration processing.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title follows Conventional Commits with the chore: prefix and accurately describes the deprecation changes.
Description check Passed The description accurately explains the deprecation of defineNitroConfig and CacheOptions, the replacement APIs, and related documentation and test updates.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4838

commit: 6b3694b

@pi0
pi0 merged commit e3378f9 into main Oct 18, 2026
15 checks passed
@pi0
pi0 deleted the chore/deprecate-legacy-aliases branch October 18, 2026 04:11

This branch was successfully deployed

1 active deployment
Preview — 6b3694b1 Deployed Oct 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants