github ItalyPaleAle/svelte-spa-router v2.0.0

latest releases: v4.0.1, v4.0.0, v3.3.0...
4 years ago

Breaking changes:

Check out the UPGRADING.md file for instructions on updating your code.

  • New syntax for use:active parameters, compatible with Svelte 3.13+
  • New list of arguments for route pre-conditions functions, which now receive a single object rather than two values
  • Updated event.detail object in the routeLoaded and conditionsFailed events. event.detail.component is now the actual Svelte component (a JavaScript function), while the name (the previous component property) is now event.detail.name

New features:

  • The wrap function can now be used to add a custom user dictionary to routes, which will be passed to the routeLoaded and conditionsFailed events under event.detail.userData, as well as to the route pre-condition functions.
  • The Router component now supports a prefix that will be added to all route paths; this is useful for nested routers
  • The route pre-condition functions and the routeLoaded and conditionsFailed events now receive more data and unlock more opportunities for developers

Fixes:

  • Make use:active action compatible with Svelte 3.13+

Misc:

  • Replaced Azure Pipelines with GitHub Actions for Continuous Integration tests

Don't miss a new svelte-spa-router release

NewReleases is sending notifications on new releases.