Single Spa Versions Save

The router for easy microfrontends

v5.5.4

3 years ago

Fixes

  • Improve activeWhen to support query-strings in URL (#594 #593 via @Sauloxd)
  • Fix types for parcel props (#596 via @kuitos)
  • Add console warning when single-spa is loaded twice on the same page. (#577)

Maintenance

v5.5.3

3 years ago

Fixes

  • Fix bug with delayed call to start() where applications would remain unmounted. (#573 #555)

v5.5.2

3 years ago

Fixes

  • Small ie11 fixes, and adding lint safe guards for ie11 (#559 via @Sauloxd)
  • fix(activeWhen): activeWhen with string literal should be exact match (#565 via @kuitos)
import { registerApplication, checkActivityFunctions } from 'single-spa'

registerApplication({
  name: "app1",
  app: () => System.import('app1'),
  activeWhen: '/app1'
})

// Both 5.5.1 and 5.5.2
checkActivityFunctions(new URL('http://localhost:8080/app1')) // ['app1']
checkActivityFunctions(new URL('http://localhost:8080/app1/sub')) // ['app1']

// With 5.5.1, single-spa did not require the location to have a slash after the prefix
checkActivityFunctions(new URL('http://localhost:8080/app1WithExtra')) // ['app1']

// Changed with 5.5.2 - single-spa now requires the location to have a slash after the prefix
checkActivityFunctions(new URL('http://localhost:8080/app1WithExtra')) // []

Maintenance

  • Fix Github issue template (#567 via @kuitos)

v5.5.1

4 years ago

Fixes

  • Change includes to indexOf for IE11 support. (#558)

v5.5.0

4 years ago

Features

  • Allow calling checkActivityFunctions without location object as an argument. This is already in the documentation, but wasn't implemented (#544)
  • New single-spa:before-app-change and single-spa:before-no-app-change events. (#545 #547)

Fixes

  • The CustomEvent.detail for single-spa:before-routing-event and single-spa:before-mount-routing-event now shows the new statuses for apps, meaning the status that the app will be in after the routing event finishes. Previously the current, older status was being reported as the new status. (#547)

Performance

  • Refactor: only call activity functions one time per reroute. This is better for performance because each URL reroute results in less work. (#546)

Maintenance

  • update tagline and description (#549)
  • Add npm downloads badge (#542)

v4.4.4

4 years ago

Patches

v5.4.0

4 years ago

Features

Fixes

v5.3.4

4 years ago

Fixes

  • Fix bug in navigateToUrl with URL query comparison #519 (@DuLinRain)

v5.3.3

4 years ago

Fixes

v5.3.2

4 years ago

Fixes

window.addEventListener('single-spa:app-change', evt => {
  console.log(evt.newAppStatuses) // { app1: MOUNTED, app2: NOT_MOUNTED }
  console.log(evt.appsByNewStatus) // { MOUNTED: ['app1'], NOT_MOUNTED: ['app2'] }
  console.log(evt.totalAppChanges) // 2
})