Skip to content

fix(deps): declare vue as a peer dependency - #7529

Open
lazerg wants to merge 1 commit into
nuxt:v4from
lazerg:fix/issue-7527-vue-peer-dependency
Open

lazerg wants to merge 1 commit into
nuxt:v4from
lazerg:fix/issue-7527-vue-peer-dependency

Conversation

@lazerg

@lazerg lazerg commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Resolves #7527

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The published component declarations import from vue, but vue was only a devDependency. With pnpm's enableGlobalVirtualStore, @nuxt/ui is linked from a store directory that holds only its declared dependencies, so TypeScript can't resolve vue there and every U* component types as any.

This adds vue as a required peer with ^3.5.0, since the runtime already relies on 3.5 APIs like useTemplateRef. I checked it against a global virtual store install: vue doesn't resolve from the linked package before, and resolves with the same peer applied through packageExtensions. The lockfile doesn't change.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
ui Ready Ready Preview Nov 30, 2026 4:25pm UTC
ui-repl Ready Ready Preview Nov 30, 2026 4:25pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The package manifest adds vue as a peer dependency with the version range ^3.5.0.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 112a0

This declares Vue as a peer dependency so TypeScript can resolve component types under pnpm's global virtual store. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: adding vue as a peer dependency in package.json. It is a fix to the dependency declarations, which matches the raw summary and the objectives.
Description check Passed The description explains the problem (published declarations import from vue, which was only a devDependency), the fix (vue added as a ^3.5.0 peer), and links issue #7527. It relates directly to the o…
Linked Issues check Passed [#7527] The issue asks that @nuxt/ui declare vue so that component declarations resolve under pnpm's global virtual store. The proposed fix is a vue peer dependency of ^3.5.0. At the reviewed head, pa…
Out of Scope Changes check Passed The supplied summary reports one changed line (+1/-0) in package.json, which adds the vue peer dependency. This change directly implements the objective of #7527. No unrelated changes are reported. Th…
Full details: Description check

Explanation

The description explains the problem (published declarations import from vue, which was only a devDependency), the fix (vue added as a ^3.5.0 peer), and links issue #7527. It relates directly to the one-line package.json change.

Full details: Linked Issues check

Explanation

[#7527] The issue asks that @nuxt/ui declare vue so that component declarations resolve under pnpm's global virtual store. The proposed fix is a vue peer dependency of ^3.5.0. At the reviewed head, package.json lists "vue": "^3.5.0" under peerDependencies, without a peerDependenciesMeta optional flag, which matches the issue's fix. The issue's other undeclared imports (@vue/reactivity, @tanstack/table-core, embla-carousel, nuxt, eslint) are stated as additional context, not as requested work, so their absence does not fail this assessment. The issue requests no automated test, and none is required here. The issue's reproduction passes with the same peer applied through packageExtensions, which supports the fix. Evidence limit: the base blob of package.json could not be read, so the +1/-0 change size relies on the supplied summary. The head content confirms the required declaration.

Full details: Out of Scope Changes check

Explanation

The supplied summary reports one changed line (+1/-0) in package.json, which adds the vue peer dependency. This change directly implements the objective of #7527. No unrelated changes are reported. The base blob of package.json could not be read, so the change size is based on the summary, not a text diff. The head content shows no unrelated package.json edits that could be identified from the readable content.

  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d5dd3a48-f39a-48c4-a25a-311bcd0a73a2
Commits

Reviewing files that changed from the base of the PR and between 6c162f7 and 112a09d.

Files selected for processing: 1

  • package.json

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

@codspeed

codspeed Bot commented Nov 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 33 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing lazerg:fix/issue-7527-vue-peer-dependency (112a09d) with v4 (6c162f7)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@pkg-pr-new

pkg-pr-new Bot commented Nov 30, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@7529

commit: 112a09d

This branch was successfully deployed

2 active deployments
Preview – ui — 112a09d9 Deployed Nov 30, 2026 by vercel[bot]
Preview – ui-repl — 112a09d9 Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vue is not declared as a dependency, so every component types as any under pnpm's global virtual store

1 participant