-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix(kit): safe assignment and cleanup of defineNuxtConfig for concurrent calls
#33420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
|
Warning Rate limit exceeded@KazariEX has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 36 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 (1)
WalkthroughIntroduces a new internal helper, withDefineNuxtConfig, that scopes exposure of globalThis.defineNuxtConfig using a per-process reference counter. The previous pattern of assigning globalThis.defineNuxtConfig immediately before calling loadConfig and deleting it after is removed. loadConfig calls are now wrapped with withDefineNuxtConfig so the global is available for the duration of the scoped call and cleaned up when the last consumer finishes. No exported or public API signatures were changed. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/kit/src/loader/config.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Follow standard TypeScript conventions and best practices
Files:
packages/kit/src/loader/config.ts
🔇 Additional comments (1)
packages/kit/src/loader/config.ts (1)
36-48: LGTM!The wrapping of
loadConfigwithwithDefineNuxtConfigcorrectly preserves the original behaviour while adding the reference-counted lifecycle management forglobalThis.defineNuxtConfig.
@nuxt/kit
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
CodSpeed Performance ReportMerging #33420 will not alter performanceComparing Summary
|
|
thank you ❤️ |
🔗 Linked issue
📚 Description
To avoid errors like #33410 from happening again, we need to ensure that the call to
loadNuxtConfigis concurrency-safe.