Vue Router v5.5.2
vuejs/routerBreaking changes
Summary
Vue Router v5.5.2 introduces breaking changes, including the removal of old NavigationResult and improved error handling for match misses. New features include warnings for repeatable params and the addition of several internal helpers, while various bug fixes enhance overall stability and functionality, particularly in the experimental vapor mode.
Breaking changes in v5.5.2
Full release notes
🚨 Breaking Changes
- experimental:
🚀 Features
- Warn on repeatable params being passed as scalars - by @posva in https://github.com/vuejs/router/issues/2879 (17a6d)
- Expose encoding helpers with _ prefix - by @posva in https://github.com/vuejs/router/issues/2910 (7d465)
- Expose internal _parseURL and _stringifyURL - by @posva in https://github.com/vuejs/router/issues/2912 (d293d)
- Expose internal _stripBase helper - by @posva in https://github.com/vuejs/router/issues/2911 (6d76a)
- Expose internal RouterLink click guard helper - by @posva in https://github.com/vuejs/router/issues/2913 (89b72)
- Vapor mode - by @posva in https://github.com/vuejs/router/issues/2944 (1a73c)
- Warn against invalid repeatable subsegments - by @ragib-mrb in https://github.com/vuejs/router/issues/2931 (bde7f)
- experimental:
- Warn on relative object locations before the initial navigation - by @posva in https://github.com/vuejs/router/issues/2895 (b2285)
- Add RouterLink and useLink for experimental_createRouter - by @posva in https://github.com/vuejs/router/issues/2893 (7dc32)
- Normalize string locations with new URL - by @posva in https://github.com/vuejs/router/issues/2932 (d0343)
- types:
- Export RouterLinkSlotScope type - by @VividLemon in https://github.com/vuejs/router/issues/2917 (2c737)
🐞 Bug Fixes
- Escape - by 025cd019 [( in s)](https://github.com/vuejs/router/commit/ in static path tokens (#2897))
- Optional params as sub-segments - by @posva in https://github.com/vuejs/router/issues/2915 (c80ea)
- Avoid runtime errors for warnings - by @posva in https://github.com/vuejs/router/issues/2925 (d61ef)
- ci:
- Report required checks for docs changes - by @posva in https://github.com/vuejs/router/issues/2906 (39e46)
- docs:
- Resolve typedoc paths cross-platform - by @abdul-karim-mia in https://github.com/vuejs/router/issues/2940 (f0608)
- experimental:
- Resolve relative object locations against the current route - by @posva in https://github.com/vuejs/router/issues/2890 (753a0)
- Display location on its own line in VUE_ROUTER_R0129 - by @posva in https://github.com/vuejs/router/issues/2894 (457fa)
- Omit empty arrays from normalized queries - by @posva in https://github.com/vuejs/router/issues/2908 (a11c3)
- Capture browser scroll on native hash links - by @posva in https://github.com/vuejs/router/issues/2929 (d7f47)
- Keep slashes of splat params in sub segments - by @posva in https://github.com/vuejs/router/issues/2951 (b21b2)
- Call root onRouteRendered for the initial navigation in vapor - by @posva in https://github.com/vuejs/router/issues/2954 (e5959)
- Scroll again to the current hash with a router-link - by @posva in https://github.com/vuejs/router/issues/2955 (82b93)
- Support vapor components in scroll restoration - by @posva in https://github.com/vuejs/router/issues/2953 (6c775)
- Type missing query keys as undefined - by @posva in https://github.com/vuejs/router/issues/2959 (a13d1)
- Isolate data loader context between SSR requests - by @posva in https://github.com/vuejs/router/issues/2961 (c258a)
- history:
- Keep userinfo by using relative urls in pushState - by @posva in https://github.com/vuejs/router/issues/2889 (7e754)
- Only notify memory history moves with the actual delta - by @giaBaoJS in https://github.com/vuejs/router/issues/2826 (7b2cd)
- matcher:
- Refine param separator matching - by @danielroe in https://github.com/vuejs/router/issues/2898 (80c71)
- Remove optional params passed as null or undefined - by @posva in https://github.com/vuejs/router/issues/2900 (33d92)
- Keep inherited required param passed as null - by @posva (d9ffc)
- Remove descendants of grouping records - by @boyfeiyu in https://github.com/vuejs/router/issues/2904 (1fb1f)
- Throw for repeatable params that are not alone in their segment - by @posva (bfef5)
- Use a diagnostic for repeatable params not alone in their segment - by @posva in https://github.com/vuejs/router/issues/2952 (e90f5)
- unplugin:
- Read quoted keys in definePage() at build time - by @NgoQuocViet2001 in https://github.com/vuejs/router/issues/2860 (90088)
- Build the matcher from the definePage path override - by @posva in https://github.com/vuejs/router/issues/2899 (abd1b)
- Strip invalid characters from param names - by @posva in https://github.com/vuejs/router/issues/2919 (c2fef)