Skip to content

feat: upgrade to vue-router v5 to migrate away from unplugin-vue-router#2184

Closed
trueberryless wants to merge 1 commit intonpmx-dev:mainfrom
trueberryless:feat/migrate-unplugin-vue-router
Closed

feat: upgrade to vue-router v5 to migrate away from unplugin-vue-router#2184
trueberryless wants to merge 1 commit intonpmx-dev:mainfrom
trueberryless:feat/migrate-unplugin-vue-router

Conversation

@trueberryless
Copy link
Contributor

@trueberryless trueberryless commented Mar 21, 2026

🧭 Context

Renovate's Dependency Dashboard shows that the unplugin-vue-router is depricated and should be migrated according to https://router.vuejs.org/guide/migration/v4-to-v5.html#From-unplugin-vue-router:

image

PR link: #2

📚 Description

This PR updates all occurances of vue-router to at least v5 and removes most unplugin-vue-router packages (for some reason, there are still some occurances in the lockfile 🤔)

@vercel
Copy link

vercel bot commented Mar 21, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Mar 21, 2026 7:46pm
npmx.dev Ready Ready Preview, Comment Mar 21, 2026 7:46pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Mar 21, 2026 7:46pm

Request Review

@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

The pull request removes unplugin-vue-router as a dependency from the project and updates related configuration and documentation. The changes include removing the package from package.json, deleting it from the knip.ts configuration's ignoreDependencies list, updating the CONTRIBUTING.md guideline to reference vue-router directly instead of unplugin-vue-router, and modifying test fixtures to upgrade vue-router versions to ^5.0.4 whilst removing unplugin-vue-router from Nuxt package dependency definitions.

Possibly related PRs

Suggested reviewers

  • danielroe
  • firstangler59
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the context and rationale for the changes, referencing the deprecation of unplugin-vue-router and the migration guide, and accurately describes the intended changes to upgrade vue-router to v5.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6418d24e-e16f-40a0-90fa-9ff6da762818

📥 Commits

Reviewing files that changed from the base of the PR and between d86c9c4 and baada37.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • CONTRIBUTING.md
  • knip.ts
  • package.json
  • test/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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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)}")
PY

Repository: 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.json

Repository: 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 -n

Repository: 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:


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.

@ghostdevv
Copy link
Contributor

I think we should do this work in #2047 as I think the Nuxt upgrade is also required? WDYT? @trueberryless

@trueberryless
Copy link
Contributor Author

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

@ghostdevv
Copy link
Contributor

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.

@ghostdevv ghostdevv closed this Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants