- maintenance: added a bunch of files to the
.npmignore
to reduce the package download size
- bug fix: update the hash-brown-router dependency to fix an issue where calling
evaluateCurrent('somestate')
wouldn't do anything whensomestate
's route was/
and the current url was also/
. Issue #116 in abstract-state-router, commit #56c207f0 in hash-brown-router. If you're passing in your own hash-brown-router instance, make sure to update it to 3.3.1 to avoid the bug.
- bug fix: point package.main at the ES5 bundle instead of the ES2015 code :-x 34ea0baa
- bug fix: fixed a crash that would happen if you didn't pass an options object in 3b60669b
- dependency update: changed hash-brown-router dependency from ~3.2.0 to ^3.3.0 a593408b
Promise
andObject.assign
polyfills are now required for older browsers- refactor: updated all the source code to ES2015 (though the published version is still compiled down to ES5)
- functional:
stateChangeStart
andstateChangeEnd
events now also emit the full array of states being transitioned to. #113
- documentation: added a table of contents to the API section of the readme #111
- drop dependencies on the
process
andevents
polyfills and bump hash-brown-router dependency, saving about 25KB
- documentation: fixed a requre/require typo #103
- documentation: added "inherit" to the documented
go()
options #104 - documentation: in the rendered docs, fixed the link to the ractive example source code 8511b651
- updated hash-brown-router to 3.1.0, making the
/
route equivalent to an empty route string #102
- updated hash-brown-router #93
- compatibility: switched from
require('events').EventEmitter
torequire('events')
for better Rollup compatibility. c861f5ab
- functional: renderers may now return a new DOM API from the reset function. c07a45fb
- bug fix: empty strings in default parameters would cause the state router to stop cold without any error message #2abf9361
- functional: replaced the
defaultQuerystringParameters
property on states withdefaultParameters
, which applies to both querystring and route parameters. If you don't specifydefaultParameters
,defaultQuerystringParameters
will be checked too (though it will now apply to route parameters as well). #91
- functional: made
stateName
optional forgo
/replace
/makePath
#83
- dependency update: require page-path-builder 1.0.3, fixing a path-building bug #650af6af
- bug fix:
stateIsActive
was doing an extremely naive check #71
- bug fix:
makePath(stateName, params, { inherit: true })
now properly inherits route parameters during the render/activate phases #7617d74b
- bug fix: fixed Webpack build by changing a JSON file to CommonJS #65
- bug fix: states that had child states without routes weren't necessarily loading the correct child state when you browsed to them #85112c79
- documentation: documented the
stateChangeError
event - documentation: documented the
stateError
event - functional: added the
routeNotFound
event when a route is visited that doesn't have any states associated with it https://github.com/TehShrike/abstract-state-router/commit/f3e2fbda5fa85068df3aa9f9539d61bb95667caf
- functional: added a
parameters
property to the context objects emitted with thebeforeCreateState
,afterCreateState
,beforeResetState
, andafterResetState
events. https://github.com/TehShrike/abstract-state-router/commit/c81228b49d0808fe722cda718598816e3c8ac5b3
- functional: changed
destroy
to be emitted to the active states afterbeforeDestroyState
/beforeResetState
is emitted on the state router https://github.com/TehShrike/abstract-state-router/commit/8522a300ad23ed45dce0c6be1398bfb3883dd98c - documentation: added the event list TehShrike#58
- functional: added an "inherit" option when navigating to a new state TehShrike#57
- added an "inherit" option to makePath
- functional: added emitting events before and after calling every dom rendering function TehShrike#54
- functional: added console warnings if you call
stateRouter.addState
passing in an object with unexpected properties https://github.com/TehShrike/abstract-state-router/commit/67618b75e7a4e310cb8c3e15f31e3157e2921f6f - tests/documentation: fixed some discrepencies highlighted by the above warnings https://github.com/TehShrike/abstract-state-router/commit/438e0a14ad16181f16881f771d543ccdada8d690
- documentation: changed
params
/stateParameters
naming to be consistent by changing everything tostateParameters
- functional: changed parameters objects passed to the DOM rendering functions to be mutable copies instead of being frozen