fix(module): validate required registry fields after runtime merge#762
fix(module): validate required registry fields after runtime merge#762tsukiyama-3 wants to merge 1 commit into
Conversation
|
@tsukiyama-3 is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change modifies required-field validation for auto-loading registry scripts in the Nuxt scripts module. Instead of checking the raw registry input, the validation now derives an "effective input" from the runtime configuration's public scripts entry (excluding scriptOptions), and falls back to the normalized registry input when unavailable. This ensures that defaults provided via environment variables or runtime configuration are considered when determining whether required schema fields are satisfied. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
🔗 Linked issue
#761
📚 Description
Required-field validation during module setup compared the Valibot schema to the normalized
[input]fromscripts.registryonly.IDs and similar fields are often supplied only through
runtimeConfig.public.scriptsand/orNUXT_PUBLIC_SCRIPTS_*, merged intopublic.scriptsearlier in this module (registryWithDefaults+defu). After that merge, the effective config already includesid, but the check still complained.The WARN now inspects each script’s merged object in
runtimeConfig.public.scripts, droppingscriptOptionskeys that aren’t part of script input schema. Behaviour at runtime is unchanged; this only aligns dev warnings with documented env/runtime configuration.