fix: mark unhead peer dependency as optional#824
Conversation
|
@stuible is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change updates packages/script/package.json to add an entry for " Estimated code review effort: 1 (Trivial) | ~2 minutes Changes
Related issues: None specified. Related PRs: None specified. Suggested labels: dependencies, package.json Suggested reviewers: None specified. Poem 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
@unhead/vueas an optional peer dependencyWhy
@nuxt/scriptssupports both Unhead v2 and v3, but npm currently auto-installs@unhead/vue@3.xfor Nuxt 4.4.8 apps that do not directly declare the peer. That can create mixed Unhead v2/v3 installs and Nitro node-server output can package an incompleteunheadruntime, causing SSR imports likeunhead/serverto fail at runtime.Making the peer optional keeps the existing compatibility range, while allowing the consuming Nuxt app's existing Unhead version to be reused.
Verification
@unhead/vue@2.1.15with this metadata change@nuxt/scriptsand imported the generated renderer successfully