This document maintains a list of changes to the bumpover
package with each new version. Until 1.0.0
is released, breaking changes will be added as minor version bumps, and smaller changes and fixes won't be detailed.
-
Add
options.onUnmatch
handler. This handler is called when a node is matched without rules andignoredUnknown
is false, which allows more control on unknown nodes. -
Add
rule.childKey
props. This allows custom child key for different types of nodes.
- When struct validation fails,
StructError
is thrown instead of plain error. This should not affect custom rules for now. Unifying errors thrown by superstruct allows for more accruate operations on specific errors.
-
Actions now have
'next'
value by default. This simplifies resolving API in promise, splitting theaction
boilerplate out. -
Support UMD build. This enables quick prototyping via
<script>
tag inside browser, .e.g., JSFiddle. For nowXMLBumpover
andbumper.assert
are not supported with UMD version. As a workaround, you can extend your own bumpover class parsing XML with UMD build.
options.childrenKey
is renamed asoptions.childKey
. This is more consistent with thechildNodes
API in DOM.
-
Added
bumper.test
andbumper.assert
methods. These methods are borrowed from superstruct. -
Support
rule.struct
for validating nodes. This makes validating bumped node easier, which is optional. -
Added
options.defaultValue
. This value is provided if promise is resolved with a "void" result.
options.silent
is removed. Silently swallowing errors will make debugging much harder.
- Added
XMLBumpover
andJSONBumpover
. These classes provide parsing support out of the box, and user can easily extends the coreBumpover
with custom parsers.
-
Bumpover is exported as ES Module. This avoids the conflict importing with the confusing
.default
keyword. -
bumper.bump
receives raw content instead of structured node. This enables users customizing serializer and deserializer for their own data format.
馃帀