Skip to content

Releases: Dogstudio/highway

v2.2.1

21 Apr 01:25
Compare
Choose a tag to compare
  • πŸ”’ Update dependencies for security purposes

v2.2.0

20 Apr 23:28
Compare
Choose a tag to compare

Breaking Changes

Bundle Size & Browser Support

Thanks to @mikehwagz the bundle size has be reduced significantly with microbundle. This improvement removes the polyfills for modern JavaScript features such as the Fetch API, Promises and Maps from Highway in order to have the lightest library. The library now supports the most recent browsers and browser versions. Older ones can be supported by using polyfills out of the box.

A new example, Polyfills, has been added to the documentation to ease the configuration of the required polyfills. The homepage of the documentation has been updated as well to better reflect the browsers supported by the library. So, refer to the documentation to make sure this release doesn't break projects when older browser have to be supported.

Note: The bundle name hasn't changed but more bundles are now available with microbundle. Please open an issue for further problems with this breaking change.

Changelog

  • πŸŽ‰ Add new websites in the Hall of Fame
  • πŸŽ‰ Add Polyfills example to documentation
  • ✨ Reduce bundle size significantly with microbundle
  • 🎨 Update browser support in documentation
  • 🎨 Update browser support in README.md
  • πŸ› Fix Slack URL in documentation
  • πŸ› Fix Slack URL in README.md

v2.1.3

14 Jul 18:48
Compare
Choose a tag to compare
  • πŸ”’ Update dependencies for security purposes

v2.1.2

21 Jan 22:01
Compare
Choose a tag to compare

⚑️ Parameters Destructuration (Breaking Change)

This is a breaking change about the way parameters are exposed in transitions and events methods. In order to be more flexible for future releases all parameters are now grouped in a single object that can be destructured to only get the informations needed. This means you don't need to bother anymore with the order of the parameters of with parameters you don't need. This also let us add as many entries in the object as we want in the future to expose more informations if needed for those methods without deprecating your code anymore.

Before v2.1.2:

// Events
H.on('NAVIGATE_IN', (to, location) => {});
H.on('NAVIGATE_OUT', (from, location) => {});
H.on('NAVIGATE_END', (from, to, location) => {});

// Transitions
class Transition extends Highway.Transition {
  in(from, to, done) {
    // [...]
  }

  out(from, done) {
    // [...]
  }
}

Now in v2.1.2:

// Events
// Use ES6 Object-Destructuring to filter parameters
H.on('NAVIGATE_IN', ({ to, trigger, location }) => {});
H.on('NAVIGATE_OUT', ({ from, trigger, location }) => {});
H.on('NAVIGATE_END', ({ from, to, trigger, location }) => {});

// Transitions
class Transition extends Highway.Transition {
  in({ from, to, trigger, done }) {
    // [...]
  }

  out({ from, trigger, done }) {
    // [...]
  }
}

πŸŽ‰ Trigger Informations

This update is about informations on what has triggered the navigation process of Highway. You now have access to those informations inside the parameters of the transitions and events methods with the trigger keyword. This will return either:

  • The DOM Element
  • The popstate string when the back/forward browser's buttons trigger the navigation process
  • The script string when the redirect method of Highway.Core instance is called

Now in V2.1.2:

// Events
H.on('NAVIGATE_IN', ({ to, trigger, location }) => {});
H.on('NAVIGATE_OUT', ({ from, trigger, location }) => {});
H.on('NAVIGATE_END', ({ from, to, trigger, location }) => {});

// Transitions
class Transition extends Highway.Transition {
  in({ from, to, trigger, done }) {
    // [...]
  }

  out({ from, trigger, done }) {
    // [...]
  }
}

For further readings:

v2.1.1

11 Dec 15:29
Compare
Choose a tag to compare

v2.1.0

03 Dec 09:27
Compare
Choose a tag to compare
  • πŸŽ‰ Add contextual transitions
  • πŸŽ‰ Add overlapping transitions
  • ✨ Improve documentation website
  • ✨ Improve Core.redirect(href, transition) method
  • ✨ Improve Core.attach(links) method
  • ✨ Improve Core.detach(links) method
  • 🎨 Invert from and to parameters of the NAVIGATE_END event

v2.0.8

25 Sep 13:49
Compare
Choose a tag to compare
  • πŸ› Fix pushState location in the process
  • πŸ› Fix CMD/CTRL + click behavior of browsers

v2.0.7

25 Sep 10:36
Compare
Choose a tag to compare
  • πŸ› Fix Issue #29

v2.0.6

21 Sep 13:19
Compare
Choose a tag to compare
  • πŸ› Fix undefined entries in cache

v2.0.5

21 Sep 13:07
Compare
Choose a tag to compare
  • πŸ› Fix missing cache