feat: upgrade to vue-router v5 to migrate away from unplugin-vue-router#2184
feat: upgrade to vue-router v5 to migrate away from unplugin-vue-router#2184trueberryless wants to merge 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThe pull request removes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 Tip Migrating from UI to YAML configuration.Use the |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6418d24e-e16f-40a0-90fa-9ff6da762818
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
CONTRIBUTING.mdknip.tspackage.jsontest/fixtures/npm-registry/packuments/nuxt.json
💤 Files with no reviewable changes (2)
- knip.ts
- package.json
| "untyped": "^2.0.0", | ||
| "vue": "^3.5.27", | ||
| "vue-router": "^4.6.4", | ||
| "vue-router": "^5.0.4", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Compare local fixture vs live npm packument for representative Nuxt versions.
python - <<'PY'
import json, urllib.request
local_path = "test/fixtures/npm-registry/packuments/nuxt.json"
versions_to_check = ["1.4.5", "3.20.0", "3.21.1", "4.3.1"]
with open(local_path, "r", encoding="utf-8") as f:
local = json.load(f)
with urllib.request.urlopen("https://registry.npmjs.org/nuxt", timeout=20) as r:
live = json.load(r)
print("version | local vue-router | live vue-router")
print("-" * 70)
for v in versions_to_check:
local_dep = (local.get("versions", {}).get(v, {}).get("dependencies", {}) or {}).get("vue-router")
live_dep = (live.get("versions", {}).get(v, {}).get("dependencies", {}) or {}).get("vue-router")
print(f"{v:8} | {str(local_dep):16} | {str(live_dep)}")
PYRepository: npmx-dev/npmx.dev
Length of output: 2642
🏁 Script executed:
# First, check the size and structure of the nuxt.json fixture
wc -l test/fixtures/npm-registry/packuments/nuxt.jsonRepository: npmx-dev/npmx.dev
Length of output: 113
🏁 Script executed:
# Inspect the changed dependency lines to see which Nuxt versions they correspond to
# Check a few key lines to understand the version mapping
sed -n '100,110p' test/fixtures/npm-registry/packuments/nuxt.json | cat -n
sed -n '2015,2030p' test/fixtures/npm-registry/packuments/nuxt.json | cat -nRepository: npmx-dev/npmx.dev
Length of output: 1108
🌐 Web query:
vue-router 5.0 nuxt 1.4.5 compatibility
💡 Result:
No, vue-router 5.0 is not compatible with Nuxt 1.4.5. Nuxt 1.4.5 was released in 2018 and uses Vue 2 with vue-router 3.x. Vue Router 5.0 was released in January 2026 for Vue 3+, making it incompatible due to major API changes and Vue version mismatch. Modern Nuxt 4.x uses vue-router ^5.0.3.
Citations:
- 1: https://www.npmjs.com/package/nuxt/v/1.4.5
- 2: https://stackoverflow.com/questions/55691937/why-does-create-nuxt-app-installs-nuxt-version-1-4-5
- 3: https://github.com/nuxt/nuxt/releases/tag/v1.4.0
- 4: https://www.npmjs.com/package/vue-router/v/4.4.5
- 5: https://develop365.gitlab.io/nuxtjs-1.4.0-doc/de/guide/routing/
- 6: https://registry.npmjs.org/nuxt
- 7: https://www.bitterbrains.com
- 8: https://router.vuejs.org/guide/migration/index.html
- 9: https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md
Revert bulk replacement of vue-router to v5.0.4 in historical Nuxt versions.
This fixture modification corrupts packument realism across the board. Vue Router 5.0 (released January 2026) requires Vue 3+, but Nuxt 1.4.5 and early Nuxt 3 releases use Vue 2, where they depend on vue-router 3.x or 4.x. The blanket replacement at lines 105, 326, 505, 683, 876, 1073, 1267, 1464, 1662, 1856, 2021, 2336, 2543 applies an incompatible version across all historical Nuxt releases, invalidating any test assertions that depend on accurate dependency trees from these fixtures.
Regenerate the fixture from source data or revert to actual packument values for each version, rather than applying a blanket regex replacement.
|
I think we should do this work in #2047 as I think the Nuxt upgrade is also required? WDYT? @trueberryless |
Yeah, I didn't see that one, but I don't have write access to those Renovate branches anyway. I get the same type errors tho as in that upgrade. So this might wanna wait for the other PR |
|
I'll close this for now then, but we can reopen this one if you have an idea of how to fix it but my guess currently is that it may've been an accidental breaking change in Nuxt that needs addressing, and as such we need Daniel. |
🧭 Context
Renovate's Dependency Dashboard shows that the
unplugin-vue-routeris depricated and should be migrated according to https://router.vuejs.org/guide/migration/v4-to-v5.html#From-unplugin-vue-router:PR link: #2
📚 Description
This PR updates all occurances of
vue-routerto at least v5 and removes mostunplugin-vue-routerpackages (for some reason, there are still some occurances in the lockfile 🤔)