Last 12 weeks · 0 commits
4 of 6 standards met
Summary Fixes #3566 - The type definition of Route.query was missing as a valid type When parsing URLs like where a query parameter has no value, the parser correctly returns for that parameter value This fix updates the Route interface to properly reflect this behavior Technical Details The query parsing code in (line 64) sets for parameters without values: The type definition was: But should be: Test Plan [x] Verified eslint passes [x] Verified TypeScript type tests pass () [x] Verified unit tests pass (115 specs, 0 failures) AI Transparency This PR was created with AI assistance (Claude claude-opus-4-5). The fix was identified and implemented by analyzing the issue description and the source code to understand the correct type for query parameter values. Co-Authored-By: Claude (claude-opus-4-5)
Repository: vuejs/vue-router. Description: 🚦 The official router for Vue 2 Stars: 18942, Forks: 5019. Primary language: JavaScript. Languages: JavaScript (97.1%), TypeScript (2.6%), Shell (0.3%). License: MIT. Homepage: http://v3.router.vuejs.org/ Topics: javascript, router, vue. Latest release: v3.6.5 (3y ago). Open PRs: 54, open issues: 65. Last activity: 1d ago. Community health: 50%. Top contributors: posva, yyx990803, dependabot[bot], fnlctrl, Alex-Sokolov, MachinisteWeb, kazupon, Jinjiang, nicodevs, LinusBorg and others.
JavaScript
What problem does this feature solve? Every language in the docs show version 2.0 and I think it should be the last updated version. Right now if a user wants to learn about a new feature (let's say, implemented in v2.6) there is no way of knowing if the docs in the desired language are up to date What does the proposed API look like?
This PR enhances and expands the existing guide for Route Meta Fields () in the Advanced Guide section. Changes include: 1. Improved overall structure, clarity, and explanations of the object and the use of the array for nested routes. 2. Added a crucial, second real-world use case: Setting dynamic page titles** using the global hook. This update provides a more comprehensive and practical guide for developers using metadata in the Vue 2 version of Vue Router.
What problem does this feature solve? Allow less hierarchical and shorter urls for nested routes and general wide usecase flexibility. Due to limitations of simple pattern matching the example from https://router.vuejs.org/guide/essentials/nested-routes.html require hierarchical urls for nesting routes and router-views e.g. and , routes without a common parent-path can't be nested. Example: Let's say we want a tabbed overview page with different topics like this The routes would look like this The pattern matching dictates hierarchical urls like above , , . Shorter urls like , , can't be achieved (while still keeping the overview page with the tabs). With custom matcher (functions) that would be possible. This is especially important when migrating from other frameworks, where the url structure can't be changed for SEO and other reasons. What does the proposed API look like? For the example above that could look like this: This is similar to the how Angular handles it: https://angular.io/api/router/UrlMatcher
Hello Vue Router team, I have encountered an issue with the vue-router.global.js build in the dist folder. Specifically, the isSameRouteLocationParamsValue function inside the globally distributed file contains the optional chaining (?.) operator, which is not transpiled to ES5. This could cause compatibility issues in environments that don’t support optional chaining, such as older browsers. Here’s the snippet from the distributed vue-router.global.js file: