Repository navigation
perf(xml): replace fast-xml-parser with @nodable/flexible-xml-parser - #2
Merged
Merged
Conversation
Parse PEPPOL documents with @nodable/flexible-xml-parser + @nodable/compact-builder, matching the previous fast-xml-parser output shape (attribute prefix, number coercion, ns stripping). Measured ~1.6x faster on small invoices and ~2.9x on large ones. fast-xml-builder stays: no @nodable XML string builder exists.
|
🎉 This PR is included in version 0.1.1-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Export 25 file-private opaque Schema classes referenced by public signatures so their types are nameable, re-export XmlNode alongside parseXmlNodable, and set private-type-leaks off: the rule is opt-in upstream and 4 remaining cases cannot be exported without silently dropping identically named schemas from the export-star barrel. Also drop the stale script-only dependency exemptions for the @nodable packages now used at runtime.
|
🎉 This PR is included in version 0.1.1-alpha.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 0.1.1-alpha.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 0.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the runtime XML parser in
peppol-document-schema.tswith@nodable/flexible-xml-parser+@nodable/compact-builder, keeping output parity with the previous fast-xml-parser shape (attribute prefix@, number coercion withhex: false, leadingZeros: false, namespace stripping).Benchmarks (since removed) showed ~1.6x faster parsing on small invoices and ~2.9x on large (~1MB) ones.
src/xml/nodable-parser.ts, also exported from./xml@nodable/*added to peerDependencies (same pattern as fast-xml)./xmlstill exportsparserOptions)Verification: 1901 tests pass, oxlint 0 errors, tsdown build clean.
Known parity notes (outside business data, decoders ignore root attributes):
@xmlnsstripped in wrapper (nodable keeps it, FXP drops it)@schemaLocationgets XML-spec newline normalization under nodable