All notable changes to this project are documented in this file. This project adheres to Semantic Versioning.
3.0.2 - 2021-08-10
- Fixed a bug where some predefined entities where not being decoded when parsed (see #99).
3.0.1 - 2021-07-29
- Fixed a bug which prevented web workers from consuming the webpack bundle (see #77).
3.0.0 - 2021-07-29
- Fixed a bug where parsers did not decode predefined entities (see #82, #88 and #98).
- Fixed a bug where XML parser would not always return the last top level element node created (see #81).
- Fixed a bug where JS object parser would fail to parse mixed content (see #90).
- Added the
importfunction to callback API (see #2).
- Removed support for node.js 10.
- Removed the
noDoubleEncodingflag from serializers. Parsers now decode predefined entities (see #82, #88 and #98).
2.4.1 - 2021-04-08
- Fixed node type dependency to
*(see #69 and #84). - Added documentation link to
nextfunction (see #61). - Applied
keepNullNodesoption to all types of text nodes (see #56). - Fixed a typo in
CHANGELOG(see #54).
- Added
sanitizefunction to parsers (see #65).
2.4.0 - 2020-09-14
- Fixed a bug where the input of custom parsers were not sanitized.
- Fixed a bug where attributes would not lookup their namespaces from their parent elements (see #51 and #53).
- Fixed a bug where typings were not included in the package (see #52).
- Added
declarationfunction to serializers. - Add YAML parser to callback builder.
2.3.1 - 2020-08-05
- Fixed a bug where YAML serializer would not escape special characters.
- Fixed a bug where the
elementfunction of a custom parser would throw an error if it changed the node name (see #46). - Fixed a bug where XML parser would ignore
encodingandstandalonein XML declaration. - Fixed a bug where the
elefunction would throw an error if it failed to create any child nodes.
2.3.0 - 2020-08-04
- Fixed a bug where JSON serializer would not escape special characters (see #44).
- Added custom parsers (see #25).
- Added YAML parser and serializer.
2.2.0 - 2020-07-14
- Fixed a bug where
eachwould stop traversing the document tree if the current node was removed inside the callback.
- Added the
verboseoption to object serializer to create consistent yet verbose output (see #30).
2.1.7 - 2020-07-09
- Prevented object converter from grouping attributes into element content (see #29).
2.1.6 - 2020-07-02
- Added minified browser bundle from transpiled ES5 code so that the library can be used on old browsers (see #28). Note that
ProxyandReflectpolyfills are required to use the library on IE 11.
2.1.5 - 2020-06-18
- Fixed a bug where carriage return characters (
'\r') were escaped in text and attribute contents (see #24).
2.1.4 - 2020-06-16
- Fixed a bug where mixin classes overwrote DOM class constructors (see #23).
2.1.3 - 2020-06-11
- Fixed a bug where child nodes did not inherit the parent namespace (see #18).
- Fixed a bug where falsy values passed as node contents caused missing nodes (see #21).
2.1.2 - 2020-04-09
- Fixed a bug where the
noDoubleEncodingflag kept named entities other than those specified in the spec (see #16).
2.1.1 - 2020-04-01
- Fixed a bug where calling
endon a document fragment node would serialize the fragment's owner document not the fragment itself.
2.1.0 - 2020-03-31
- Added the
noDoubleEncodingoption to prevent html entities from being re-encoded when serialized (see #15).
2.0.0 - 2020-03-30
- Fixed namespace inheritance logic, so that a preferred prefix is not retrieved from a parent element if the element has no prefix and its namespace matches the default namespace declaration (see: web-platform-tests/wpt#16703).
- Namespace declaration attributes from JS objects are now applied correctly to their parent elements (see #13).
- Narrowed return value types of functions for better intellisense support with TypeScript (see #14).
- Added
invalidCharReplacementoption to sanitize input strings by replacing invalid characters (see #12). The option has no defaults and must be configured by the user.
- Removed
inheritNSoptions (see #1, #6 and #13). Element nodes now inherit namespaces from their parent element nodes by default. To reset the default namespace declaration create an"xmlns"attribute with an empty value ("") as in the DOM.
1.8.1 - 2020-03-27
- Fixed where JS object, map and JSON serializers'
groupsetting defaulted totrue.
1.8.0 - 2020-03-25
- Added
EventEmitterinterface to callback builder object.
1.7.0 - 2020-03-19
- Added JSON output format to callback API.
1.6.0 - 2020-03-17
- Added converter options to callback API similar to regular API.
1.5.0 - 2020-03-17
- Fixed collection functions to return child node indices not descendant node indices.
- Added JS object and XML string parser to callback API functions.
- Added tree depth to collection function callbacks.
1.4.3 - 2020-03-03
keepNullNodesandkeepNullAttributesflags now properly keepnullandundefinedvalues (see #5). Without these flags,nullandundefinedwill be silently skipped.
1.4.2 - 2020-03-02
- Added
typestopackage.jsonto help IDEs infer types (see #4).
1.4.1 - 2020-02-28
- Renamed callback API functions.
1.4.0 - 2020-02-28
- Added callback API (see #2).
1.3.0 - 2020-02-18
- Added namespace aliases.
1.2.1 - 2020-02-18
- Prevented null namespaces from being converted to the string
"null".
- Removed namespace aliases.
1.2.0 - 2020-02-17
- Added namespace aliases.
1.1.2 - 2020-02-17
- Prevented child element namespaces to be inherited from their parent elements (see #1).
- Fixed JS object parser to allow namespaces for both element nodes and attributes with the
{ "prefix:name@ns": {} }notation.
1.1.1 - 2020-02-13
- Fixed
widthoption to work in pretty-printing mode to wrap attributes.
1.1.0 - 2020-02-12
- A CDATA node will not be indented in pretty-printing mode if it is the single child of its parent element.
- Initial release