3 of 6 standards met
Summary by CodeRabbit Documentation Added comprehensive Chinese guides for file-based routing: getting started, file conventions, configuration options, extending routes, HMR, and ESLint guidance, with examples and migration notes. Navigation Updated the Chinese site navigation with a new, expanded "基于文件的路由" section linking the new guides for easier discovery.
Summary This PR adds runtime support to the router, allowing apps to expose path-prefixed URLs without changing route records. This is especially valuable for multi-tenant by path scenarios (e.g. , ). What Changed 1. Added to . 2. Added runtime API on : (getter/setter) 3. Added to resolved/current route objects. 4. Updated duplicated-navigation logic to consider . 5. Kept hooks compatible: Behavior 1. Route matching still runs on clean internal paths. 2. and include current . 3. Prefixing is idempotent (no double prefix). 4. Runtime switching works without recreating router. 5. Root path is normalized correctly ( + => , not ). Why This Is Useful For path-based multi-tenancy, routes can remain standard (, ) while public URLs become tenant-aware () at runtime, including programmatic navigation and link resolution. Hooks Notes 1. is applied in the matching pipeline (after built-in basePath stripping). 2. is applied in the public URL pipeline (after built-in basePath application). 3. Both remain optional and backward-compatible. Tests Covered and validated: 1. Resolve with and without prefix. 2. Push/replace idempotency. 3. Runtime updates. 4. exposure. 5. No duplicated-navigation false positive when only changes. 6. Root path behavior with base path. Playground Updated playground to start with no and provide UI controls to set/clear while preserving current route, query, and hash. Summary by CodeRabbit Release Notes New Features Added runtime base path management to the router with ability to get and set the base path dynamically. New UI controls in the playground app to display, modify, and manage the router base path with Apply and Clear actions. Added support for path normalization and full path transformation to enable multi-tenant routing scenarios. Tests Added comprehensive test coverage for multi-tenant and base path features in the router.
Repository: vuejs/router. Description: 🚦 The official router for Vue.js Stars: 4543, Forks: 1271. Primary language: TypeScript. Languages: TypeScript (91%), Vue (4.9%), JavaScript (3.4%), HTML (0.6%), CSS (0.2%). License: MIT. Homepage: https://router.vuejs.org/ Topics: vue, vue-router. Latest release: v5.0.3 (1w ago). Open PRs: 21, open issues: 34. Last activity: 16h ago. Community health: 75%. Top contributors: posva, dependabot-preview[bot], skirtles-code, nicodevs, pikax, Jinjiang, dependabot[bot], yyx990803, PeterAlfredLee, gophlet and others.
TypeScript
Last 12 weeks · 185 commits
Reproduction https://play.vuejs.org/#eNqFVFtv2jAU/itn2SRAg5iyy0OWonZVtW7apeqmvSx7MImBtIlt2Q6lQvz3Hdu50dsEuZ3r952Ld0FJcx5e6yAK8lIKZWAHqWLUsFMpYQ9LJUoYbCo2SHhroERlmGq1IfGCzsT6NjoqZej9E95GHuI1SjhAWGk29O7+uxQVN8PBS3QbjIJxULsjvtiwUhboP7eG8fpofsGKQthkL2KCn04s3QNftFGCr+ZnlVKMG48ZJDXrKCa1DnY7eOUU4bIqiktUwn7vwhAfJ+Z00wS8cii/5vwGjDhOApIE808C3+FClCwmnf5JD7pASet2ar8e+MWkyRnb3hzG+p2zWyC1Xa2OSVsYrJevZWge6eg3Vgp1d5Frg49xLfRx+52etN1s+2kJutRNUxtB3dmm7ZbQgV0raUeAbZ1pKrium6Lg+ADLcGfprT3M6DHsw9HYmjhvHcEfX6Kd7y4MyADJCYTEsfFRB37vvPqGrh+H1h0Hb/4X73scTSxtn7SdR52qXBrsQM0pY0taFVhv67dgS6E8o3NuWRkxdmUZA9qbkbdCEsxUijvZcLgpR3CMY+lVAJsyXAqB9RksqBp88GKLBu8OXUYNHd6P1bqjbwQcJ7sm7kYbb/jHHWjQ48e9zZrNG6q4V7Nmr3BZLJj93i/H4dgdNLorDmiEJKGgfIXzbzTO/n9zt6Hq5IeJ/KhNSirx1BIcUzm6Sa3ADFFTgCToptmKk2BtjNQRIRWXN6sQu046i5N34TR8QzIcsZ40ZLqcLJS41fh+jdHrUibBCRqRjG2MEIWeUJk/leKB4cn78H14RIp8QTA6yXnGti520x6kaTRuyDJf3SNpBzUvmPohTY4bdECW4mF4+8XJjKpYCzRds/TmEfm13nrIl4ohuw3rkTNUrRieVFZ9/vM7DmdPWYqsKtD6GeUV06KoLEZv9rHiGcLu2Tm0n13Pcr76pc+3hnHdkLJAuyl3jTx7hnoH9034tldFbe4KpsNU29MQj9Ux2DOzXlChMqYimMktINg8g5fT6dTtWInhcj5ZCGNEGcHRVG6dXNIsQ7CtBLMkHMPCHCi8xssFrr0LtsTjpG+5nvUzd+E7AGma9gBEMMXfrI4Q7P8BT1WRTA== Steps to reproduce the bug Run the example, observe the deprecation warning in the console. Expected behavior There should not be a warning, since the function is used as documented. Actual behavior There is a warning. Additional information The official docs mention that the only way of passing data to the component instance in a beforeRouteEnter hook is via the callback. Is there a new (undocumented) way? Or is the deprecation warning a mistake?
I discovered this problem while migrating from . Problem When overriding route via `definePage()/path:id?:id+:id:id(.)params.path` parser overrides to inferred params. 3. Treat absolute override paths as inheritance boundaries: stop inheriting ancestor params/query above that node. 4. Keep relative override paths inheriting parent params/query as-is. Summary by CodeRabbit Tests Added comprehensive tests covering path override scenarios and parameter extraction behavior. Bug Fixes Corrected path-override handling so absolute overrides do not inherit parent params while relative overrides do. Ensured inheritance stops at the nearest absolute override ancestor. Improved parsing and application of parameter overrides for optional, repeatable, and splat params.
Reproduction https://github.com/robbiedhall/edge-router-bug Steps to reproduce the bug 1. Clone reproduction repo 2. 3. 4. Open localhost:5173 in MS Edge (I have Version 145.0.3800.82 (Official build) (64-bit)) 5. Click 'minimize' button 6. Be sad that the window really doesn't want to be minimized Expected behavior I would expect the window to minimize, and stay that way Actual behavior The window minimizes and instantly re-instates the previous state. Additional information I have tried this with FF and Chrome and it doesn't occur. I did have a bit of a fiddle around with some of the Edge 'System and Performance' settings but it didn't seem to have any effect. I disabled all extensions and it still occurs, however it doesn't seem to happen in a InPrivate session. I also tried using V5.0.x and still had this happen. It doesn't seem to exist in 4.5.1.