Skip to content

Latest commit

 

History

History
308 lines (218 loc) · 21.8 KB

CHANGELOG.md

File metadata and controls

308 lines (218 loc) · 21.8 KB

4.0.0-alpha.13 (2020-06-18)

Bug Fixes

  • allow arbitrary selectors starting with # (14b859d)
  • use assign to align with Vue browser support (#311) (f80b670), closes #304
  • hash: use location.pathname (0078147), closes #261
  • matcher: correct check when removing existing records on add (2c267f5)
  • matcher: override records by name when adding (07100fc)
  • scroll: avoid reusing scroll position (dfc1fb3)

Features

  • scroll: allow passing behavior option (12e9209)
  • scroll: replace selector with el (ab8a01c)
  • warn: warn if component is a promise (4b2bfa8)
  • warn: warn when routes are not found (#279) (d125356)
  • allow props for named views (dbe2344)
  • warn: warn multiple params with same name (5c8cd6e)

BREAKING CHANGES

  • selector is renamed into el
  • el also accepts an Element
  • left and top are passed along el instead of inside an object passed as offset
  • scroll: scrollBehavior doesn't accept an object with x and y coordinates anymore. Instead it accepts an object like ScrollToOptions with left and top properties. You can now also pass the behavior property to enable smooth scrolling in most browsers.
  • It is now necessary to escape id selectors like explained at https://mathiasbynens.be/notes/css-escapes. This was necessary to allow selectors like #container > child.

4.0.0-alpha.12 (2020-05-19)

Bug Fixes

  • hash: allow base with non trailing slash (f5cc050), closes #247
  • prevent error on initial navigation to //invalid (e72e4ba)

Features

  • warn: warn multiple leading slashes (87c5e53)

BREAKING CHANGES

  • hash: When providing a base for hash histories, it is now necessary to include a trailing slash to create a url that starts with /#/, otherwise it will result in a url starting with #/. This allows users to use the routing system directly in simple files without needing to configure a server at all:
    • https://example.com/file.html + base: 'file.html will produce a final url of https://example.com/file.html#/
    • https://example.com/folder + base: 'folder will produce a final url of https://example.com/folder#/
    • https://example.com/folder + base: 'folder/ will produce a final url of https://example.com/folder/#/

4.0.0-alpha.11 (2020-05-12)

Bug Fixes

  • scroll: change scrollRestoration if scrollBehavior is provided (5cf2e61)
  • match base in a non-sensitive way (7087bbc)
  • router: allow multiple router instance (24d3d49)
  • router: unique first navigation with multi app (33172af)

Features

  • types: export NavigationGuardNext (#229) (888bf4d)
  • explicit injection symbols in dev mode (#228) (fab88ee)
  • support jsx and tsx for RouterLink and RouterView (1d3dce3), closes #226
  • router: allow functional components for routes (096d864)
  • scroll: scroll to the same location like regular links (5f22d4f)
  • warn: warn if next was called multiple times (dce2612)

4.0.0-alpha.10 (2020-05-05)

Bug Fixes

  • scroll: do not restore on push (3f79195)

Features

  • warn: warn invalid hash (fcf2365)
  • allow numbers as params (ef0920a), closes #206
  • router: allow global router classes (388735b)
  • router: go, back and forward can be awaited (eb87757)
  • warn: detect missing param in nested absolute paths (f5b5949)
  • warn: warn for invalid path+params and redirect (91f4de9)
  • warn: warn missing params in alias (186e275)
  • warn: warn when params are provided alongside path (8a8ddf1)

4.0.0-alpha.9 (2020-04-29)

  • Removed sourcemaps from build

4.0.0-alpha.8 (2020-04-29)

Bug Fixes

  • default matcher options (cea397b)
  • guards: preserve navigation options when redirecting (9effd81)
  • html5: correctly preserve current history.state (0586394), closes #180
  • link: make alias of empty child active (cfe5993)
  • encode hash (85bb7e1)
  • link: preserve the alias path (fffa585)
  • matcher: merge params (d8a6b25), closes #189
  • router: make redirect relative to target location (e878e91)
  • router: preserve navigation options with redirects (9732758)
  • view: render slot with no match (5873296)

Code Refactoring

  • Link and View renamed to RouterLink and RouterView (030bbc4)

Features

  • link: make empty child active with adjacent children (4b813b1)
  • router: add global pathOptions (7383564)
  • add navigation duplicated failure (9570416)
  • add onBeforeRouteUpdate (96c9503)
  • resolve relative paths (eae833e)
  • router: add back,forward,go (5e927b5)
  • router: add beforeResolve (9697134)
  • scroll: handle scroll on reload (617f131)

Performance Improvements

  • use index access for strings (971fea4)

BREAKING CHANGES

  • exported components Link and View have been renamed to be include the Router prefix and to have the same export name as their component name

4.0.0-alpha.7 (2020-04-17)

Features

  • add $route and $router types (a4f80aa)
  • add guards types (c7ccd5a)
  • refactor navigation to comply with vuejs/rfcs#150 (290c3be)

BREAKING CHANGES

  • This follows the RFC at vuejs/rfcs#150 Summary: router.afterEach and router.onError are now the global equivalent of router.push/router.replace as well as navigation through the interface (history.go()). A navigation only rejects if there was an unexpected error. A navigation failure will still resolve the promise returned by router.push and be exposed as the resolved value.

4.0.0-alpha.6 (2020-04-17)

Bug Fixes

  • history: allow base with / and base tag (d7c71b5), closes #164
  • history: allow hash history with no origin (760d216), closes #163
  • scroll: only apply on browser (cf53192)
  • revert history navigation if navigation is cancelled (d8a0d11)

Code Refactoring

  • router: merge createHref into resolve (66b2db9)

Features

Reverts

  • Revert "test: only call browser.end on the last test" (d3221f1)

BREAKING CHANGES

  • router: createHref is removed from the router. Instead, resolve returns a location object with the corresponding href property

4.0.0-alpha.5 (2020-04-08)

Bug Fixes

  • link: not active when matched is empty (acd644d)
  • check query and hash when navigating (3862ad9)
  • ignore order of keys in query and params (643bd15)
  • skip initial guards with static redirect (c76bb93)
  • types: add missing exported types (ec241f7), closes #147

Features

  • allow symbols as route record name (f42ab3f)
  • link: activeClass and exactActiveClass props (d53b383)
  • link: allow custom prop (874510b)

BREAKING CHANGES

  • Renamed types by removing suffix Normalized and using Raw instead
    • RouteLocation -> RouteLocationRaw
    • RouteLocationNormalized -> RouteLocation
    • RouteLocationNormalized is now a location that can be displayed (not a static redirect)
    • RouteLocationNormalizedResolved -> RouteLocationNormalizedLoaded
    • RouteRecord -> RouteRecordRaw
    • RouteRecordNormalized -> RouteRecord
    • RouteRecordNormalized is now a record that is not a static redirect

4.0.0-alpha.4 (2020-03-28)

Bug Fixes

  • history: use current history state when replacing (5d80209)
  • export more types (1583d48), closes #137
  • guards: free instances only if navigation is confirmed (d0514e1)
  • hash: fix base position for hash routing (ba40b8f)
  • initial location with base (d05208b)
  • router: prevent duplicated navigation on aliases (e825586)

Features

  • allow passing state to history (ac1c96f)
  • improve route access (baf266c)
  • history: expose state on html5 (3f83607)
  • matcher: remove aliases alongside the original record (26b71b2)
  • router: support custom parseQuery and stringifyQuery (#136) (5dce7bc)
  • view: add props option as boolean (7fe1e7d)
  • view: allow passing props as a function (494fc5e)
  • view: useView to customize router-view (06b0c34)
  • allow true in next (d76c6aa)
  • invoke guards with the right context (7053413)
  • lazy loading (6ecdc70)
  • view: allow props as object in record (fd4dc06)

BREAKING CHANGES

  • useRoute now retrieves a reactive RouteLocationNormalized instead of a Ref. This means there is no need to use .value when accessing the route. You still need to wrap it with toRefs if you want to expose parts of the route:
    setup () {
      return { params: toRefs(useRoute()).params }
    }

4.0.0-alpha.3 (2020-03-14)

Bug Fixes

  • add missing type definitions

4.0.0-alpha.2 (2020-03-14)

Bug Fixes

  • history: correct url when replacing current location (704b45e)
  • link: allow attrs to override behavior (4cae9db)
  • link: allow custom classes (#134) (392c295), closes #133
  • link: navigate to the alias path (3284110)
  • link: non active repeatable params (0ccbc1e)

Features

  • add aliasOf to normalized records (d9f3174)
  • handle active/exact in Link (6f49dce)
  • matcher: link aliases to their original record (e9eb648)

4.0.0-alpha.1 (2020-02-26)

Code Refactoring

  • rename createHistory and createHashHistory (7dbebb6)

Features

  • add dynamic routing at router level (a7943c6)

BREAKING CHANGES

  • createHistory is now named createWebHistory. createHashHistory is now named createWebHashHistory.

    Both createHistory and createHashHistory are renamed to better reflect that they must be used in a browser environment while createMemoryHistory doesn't.

4.0.0-alpha.0 (2020-02-26)

Known issues

Breaking changes compared to [email protected]

  • mode: 'history' -> history: createHistory()
  • Catch all routes (/*) must now be defined using a parameter with a custom regex: /:catchAll(.*)

Missing features

  • keep-alive is not yet supported
  • Partial support of per-component navigation guards. No beforeRouteEnter yet