v4.0.0 #22
rgrove
announced in
Announcements
v4.0.0
#22
Replies: 1 comment 1 reply
-
Thanks a lot for this awesome library and these improvements! Literally made me enjoy working with XML again haha. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
parse-xml has been rewritten in TypeScript. The API is unchanged, but the
parseXml()
function is now a named export rather than a default export, which will require a small change to how you import it. See below for details.This release also contains major performance improvements. Parsing is now 1.4x to 2.5x as fast as it was in 3.0.0, depending on the document being parsed.
Breaking Changes
The
parseXml()
function is now a named export rather than the default export. Please update yourimport
andrequire
statements accordingly:ESM
CommonJS
XML node classes (
XmlNode
,XmlDocument
,XmlElement
, etc.) are now named exports of the@rgrove/parse-xml
package rather than properties on theparseXml()
function. This is unlikely to affect most people since there aren't many reasons to use these classes directly.ESM
CommonJS
The minified browser-ready global bundle, which was previously located at
dist/umd/parse-xml.min.js
, is now located atdist/global.min.js
. This is unlikely to affect most people because this file isn't used by Node.js or by browser bundlers like webpack. It's only a convenience for people who want to load parse-xml directly from a CDN like unpkg with a<script>
element and use it via aparseXml()
global.Node.js 12 is no longer supported. Node.js 14 is now the minimum supported version.
Other Changes
Parsing performance has been improved significantly, and is now 1.4 to 2.5 times as fast as it was in 3.0.0, depending on the document being parsed.
The package now includes a browser-specific entry point that's optimized for minification. Using parse-xml with a minifying bundler like webpack or esbuild should now result in a smaller bundle.
This discussion was created from the release v4.0.0.
Beta Was this translation helpful? Give feedback.
All reactions