fix(schema)!: remove top level generate option#32355
Conversation
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR deprecates and removes the top-level generate configuration option from the schema, runtime resolvers, and documentation, guiding users to use nitro.prerender instead.
- Remove
generatefields and related legacy flags from the type schema - Strip out the
generateresolver in config and mark it for future removal - Clean up API docs and add upgrade guide instructions for migrating to
nitro.prerender
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/schema/src/types/schema.ts | Remove deprecated generate option and legacy CLI flags |
| packages/schema/src/config/generate.ts | Delete generate resolver entries and add a TS ignore comment |
| docs/3.api/6.nuxt-config.md | Drop the generate section from Nuxt config documentation |
| docs/1.getting-started/18.upgrade.md | Add instructions for migrating away from top-level generate |
Comments suppressed due to low confidence (4)
packages/schema/src/config/generate.ts:5
- Add a JSDoc @deprecated annotation above this resolver to signal deprecation and point users towards using
nitro.prerender.
generate: {
docs/3.api/6.nuxt-config.md:1342
- Ensure that any remaining table of contents entries or anchor links to the
generatesection are removed or updated to prevent broken links.
## generate
docs/1.getting-started/18.upgrade.md:1009
- [nitpick] Align the impact notation style with other upgrade entries (e.g., use
Impact: Minimal) to maintain consistent formatting across the guide.
🚦 **Impact Level**: Minimal
packages/schema/src/types/schema.ts:1476
- Since the top-level
generateoption is removed, add or update tests to verify that no residual code paths depend on it and that consumers receive appropriate warnings or errors.
- generate: {
|
Warning Rate limit exceeded@danielroe has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 42 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughThis change removes support for the top-level generate configuration option in Nuxt 4, including its properties generate.exclude and generate.routes. Documentation is updated to reflect this removal, providing migration instructions to use nitro.prerender options instead, with exclude mapping to ignore and routes remaining as routes. All references to generate, exclude, and routes are eliminated from the API documentation. In the codebase, JSDoc comments for these properties are removed, and a TypeScript expect-error directive is added as a temporary measure. The ConfigSchema interface is updated to remove the generate property and several private boolean flags. ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@nuxt/kit
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
CodSpeed Performance ReportMerging #32355 will not alter performanceComparing Summary
|
🔗 Linked issue
resolves #12364
📚 Description
this removes top-level
generateoption.I've also removed types for old CLI flags that are no longer used, although the values (for those) are still present so it will still work at runtime