Skip to content

fix: decode Uint8Array XML input as UTF-8 - #875

Merged
amitguptagwl merged 2 commits into
NaturalIntelligence:masterfrom
emme1t:fix/uint8array-xml-input
Sep 14, 2026
Merged

amitguptagwl merged 2 commits into
NaturalIntelligence:masterfrom
emme1t:fix/uint8array-xml-input

Conversation

@emme1t

@emme1t emme1t commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #874.

Purpose / Goal

Decode plain Uint8Array input as UTF-8 before parsing or validating it. parse(new TextEncoder().encode('<root>hello</root>')) currently returns {} although the public TypeScript overloads accept Uint8Array. With this change it returns { root: 'hello' }.

Node Buffer inputs retain their existing toString() conversion. TextDecoder.decode(view) respects a Uint8Array subview's byte offset and length. The decoder retains a UTF-8 BOM so captured character offsets match string and Buffer input. Tests cover accented text and emoji, subviews, valid and invalid XML with validation enabled, preserved node order, BOM metadata offsets, and UTF-8 Buffer input.

Type

  • Bug Fix
  • Refactoring / Technology upgrade
  • New Feature

Validation

  • Five input-type regression cases failed against the original implementation.
  • Patched input-type suite: eight specs, zero failures.
  • npm test: 332 specs, zero failures, two existing pending specs. Original HEAD: 325 specs, zero failures, two pending.
  • npm run test-types: passing.
  • Source lint passes with the repository configuration. The existing input test uses import.meta, which needs a newer parser setting than the repository's ES2015 configuration; lint passes for that file with ecmaVersion: 2022 and the ES6 environment enabled.
  • git diff --check: passing.
  • Browser bundle smoke test: Chromium 151, with no global Buffer, correctly parses a UTF-8 subview containing accented text, CJK text and emoji with validation enabled, and preserves BOM metadata offsets.
  • node benchmark/XmlParser.mjs before/after: default parsing 27,514 / 30,133 requests per second; preserved order 24,394 / 33,180. Timings vary on this shared machine. An additional seven-round alternating check using the same fixture recorded median paired throughput ratios of 0.988 for strings and 1.002 for Buffers.

Investigated and implemented with OpenAI Codex assistance; reproduction and tests were executed locally.

@amitguptagwl
amitguptagwl merged commit bb2ec6c into NaturalIntelligence:master Sep 14, 2026
13 checks passed
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Oct 12, 2026
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Oct 12, 2026
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Oct 12, 2026
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Oct 12, 2026
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Oct 12, 2026
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Oct 12, 2026
penberg added a commit to tursodatabase/turso that referenced this pull request Nov 25, 2026
…amples/react-native' from app/dependabot

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-
parser) from 5.11.1 to 5.12.1. <details> <summary>Release
notes</summary> <p><em>Sourced from <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-xml-">https://github.com/NaturalIntelligence/fast-xml-
parser/releases">fast-xml-parser's releases</a>.</em></p> <blockquote>
<h2>v5.12.1</h2> <h2>What's Changed</h2> <ul> <li>fix: correct demo
parser and builder options by <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/arba-">https://github.com/arba-
octo"><code>@​arba-octo</code></a> in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/897">NaturalIntelligence/fast-xml-parser#897</a></li>
<li>Bump github/codeql-action/init from 4.36.2 to 4.39.1 by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/dependabot"><code>@​dependabot</code></a>[bot]">https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/907">NaturalIntelligence/fast-xml-parser#907</a></li>
<li>Bump github/codeql-action/analyze from 4.36.2 to 4.39.1 by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/dependabot"><code>@​dependabot</code></a>[bot]">https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/905">NaturalIntelligence/fast-xml-parser#905</a></li>
<li>perf: skip quoted attribute values in one step (long SVG path data
4-5x faster) by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a">https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a> in
<a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/919">NaturalIntelligence/fast-xml-parser#919</a></li> </ul>
<h2>New Contributors</h2> <ul> <li><a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/arba-">https://github.com/arba-
octo"><code>@​arba-octo</code></a> made their first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/897">NaturalIntelligence/fast-xml-parser#897</a></li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a">https://github.com/deadstrobe5"><code>@​deadstrobe5</code></a>
made their first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/919">NaturalIntelligence/fast-xml-parser#919</a></li> </ul>
<p><strong>Full Changelog</strong>: <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5">https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.
12.0...v5.12.1">https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.12.0...v5.12.1</a></p> <h2>v5.12.0</h2> <h2>What's
Changed</h2> <ul> <li>fix: add endIndex to the CommonJS XMLMetaData
declaration by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/dualfroz"><code>@​dualfroz</code></a">https://github.com/dualfroz"><code>@​dualfroz</code></a> in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/896">NaturalIntelligence/fast-xml-parser#896</a></li>
<li>Bump zizmorcore/zizmor-action from 0.6.1 to 0.8.0 by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/dependabot"><code>@​dependabot</code></a>[bot]">https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/906">NaturalIntelligence/fast-xml-parser#906</a></li>
<li>Bump actions/setup-node from 7.0.0 to 7.1.0 by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/dependabot"><code>@​dependabot</code></a>[bot]">https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/904">NaturalIntelligence/fast-xml-parser#904</a></li>
<li>fix: preserve original metadata offsets for CRLF input by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/Sskift"><code>@​Sskift</code></a">https://github.com/Sskift"><code>@​Sskift</code></a> in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/911">NaturalIntelligence/fast-xml-parser#911</a></li>
<li>docs: update NASA link in users list by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/CodeVertex55"><code>@​CodeVertex55</code></a">https://github.com/CodeVertex55"><code>@​CodeVertex55</code></a>
in <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/885">NaturalIntelligence/fast-xml-parser#885</a></li>
<li>README.md: fix documentation links by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/maxlath"><code>@​maxlath</code></a">https://github.com/maxlath"><code>@​maxlath</code></a> in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/872">NaturalIntelligence/fast-xml-parser#872</a></li>
<li>test: drop shadowed ignoreAttributes option by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/rajanpanth"><code>@​rajanpanth</code></a">https://github.com/rajanpanth"><code>@​rajanpanth</code></a> in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/863">NaturalIntelligence/fast-xml-parser#863</a></li> </ul>
<h2>New Contributors</h2> <ul> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/dualfroz"><code>@​dualfroz</code></a">https://github.com/dualfroz"><code>@​dualfroz</code></a> made
their first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/896">NaturalIntelligence/fast-xml-parser#896</a></li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/Sskift"><code>@​Sskift</code></a">https://github.com/Sskift"><code>@​Sskift</code></a> made their
first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/911">NaturalIntelligence/fast-xml-parser#911</a></li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/CodeVertex55"><code>@​CodeVertex55</code></a">https://github.com/CodeVertex55"><code>@​CodeVertex55</code></a>
made their first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/885">NaturalIntelligence/fast-xml-parser#885</a></li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/maxlath"><code>@​maxlath</code></a">https://github.com/maxlath"><code>@​maxlath</code></a> made their
first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/872">NaturalIntelligence/fast-xml-parser#872</a></li> </ul>
<p><strong>Full Changelog</strong>: <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5">https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.
11.2...v5.12.0">https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.11.2...v5.12.0</a></p> <h2>v5.11.2</h2> <h2>What's
Changed</h2> <ul> <li>fix: decode Uint8Array XML input as UTF-8 by <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/emme1t"><code>@​emme1t</code></a">https://github.com/emme1t"><code>@​emme1t</code></a> in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/875">NaturalIntelligence/fast-xml-parser#875</a></li>
<li>fix: type EntityDecoderOptions.setXmlVersion's version as a number
by <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/YevheniiKotyrlo"><code>@​YevheniiKotyrlo">https://github.com/YevheniiKotyrlo"><code>@​YevheniiKotyrlo<
/code></a> in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/880">NaturalIntelligence/fast-xml-parser#880</a></li> </ul>
<h2>New Contributors</h2> <ul> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/emme1t"><code>@​emme1t</code></a">https://github.com/emme1t"><code>@​emme1t</code></a> made their
first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/875">NaturalIntelligence/fast-xml-parser#875</a></li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/YevheniiKotyrlo"><code>@​YevheniiKotyrlo</code">https://github.com/YevheniiKotyrlo"><code>@​YevheniiKotyrlo</code>
</a> made their first contribution in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/pull/880">NaturalIntelligence/fast-xml-parser#880</a></li> </ul>
<p><strong>Full Changelog</strong>: <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5">https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.
11.1...v5.11.2">https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.11.1...v5.11.2</a></p> </blockquote> </details>
<details> <summary>Changelog</summary> <p><em>Sourced from <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-xml-">https://github.com/NaturalIntelligence/fast-xml-
parser/blob/master/CHANGELOG.md">fast-xml-parser's
changelog</a>.</em></p> <blockquote> <p><!-- raw HTML omitted -->Note:
If you find missing information about particular minor version, that
version must have been changed without any functional change in this
library.<!-- raw HTML omitted --></p> <p>Note: Due to some last quick
changes on v4, detail of v4.5.3 &amp; v4.5.4 are not updated here.
v4.5.4x is the last tag of v4 in github repository. I'm extremely sorry
for the confusion</p> <p><strong>5.12.1 / 2026-11-13</strong></p> <ul>
<li>deps: fast-xml-builder v1.3.2</li> <li>perf: skip quoted attribute
values in one step (long SVG path data 4-5x faster) (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/919">#919</a>) (By Afonso Ribeiro)</li> <li>perf:
validator; attr scan</li> </ul> <p><strong>5.12.0 /
2026-11-03</strong></p> <ul> <li>perf improvement for stop node: After
the first failure in a given stop node, the function stops using
readTagExp and switches to a cheap fallback.</li> <li>devdep:jasmine
7.0</li> <li>deps: <ul> <li><code>@​nodable/entities</code> v3.1.0</li>
<li>fast-xml-builder v1.3.1</li> <li>is-unsafe v2.0.3</li> <li>strnum
v2.5.1</li> </ul> </li> <li>fix cjs typing</li> <li>fix: preserve
original metadata offsets for CRLF input (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/911">#911</a>) (By <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/sskift">sskift</a>)</li">https://github.com/sskift">sskift</a>)</li> </ul>
<p><strong>5.11.2 / 2026-09-29</strong></p> <ul> <li>fix (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/875">#875</a>): decode Uint8Array XML input as UTF-8 (By
emme1t)</li> <li>fix (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/880">#880</a>) :type EntityDecoderOptions.setXmlVersion's
version as a number (By Yevhenii Kotyrlo)</li> </ul> <p><strong>5.11.1 /
2026-08-27</strong></p> <ul> <li>fix: validator; Replace regex with a
single-pass scanner for attribute tokens, eliminating quadratic behavior
on long whitespace runs.</li> </ul> <p><strong>5.11.0 /
2026-08-16</strong></p> <ul> <li>feat: support for endIndex in node
metadata (<a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-">https://redirect.github.com/NaturalIntelligence/fast-
xml-parser/issues/850">#850</a>) [By <a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/Wain-">https://github.com/Wain-
PC">Pavel Dranichnikov</a>]</li> <li>fix: don't crash on a closing tag
with no matching opening tag (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/861">#861</a>) [By <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/hdimer">Haïm">https://github.com/hdimer">Haïm Dimer</a>]</li> <li>fix: DOCTYPE
to read SYSTEM/PUBLIC</li> <li>deps: strnum v2.4.2</li> </ul>
<p><strong>5.10.1 / 2026-07-17</strong></p> <ul> <li>fix: multiple
DOCTYPE declarations.</li> <li>deps: <code>@nodable/entities</code> for
treeshaking</li> </ul> <p><strong>5.10.0 / 2026-07-11</strong></p> <ul>
<li>upgrade: <ul> <li>xml-naming v0.3.0: cache support</li> <li>PEM
v1.6.2: sibling bug fix</li> <li>is-unsafe v2.0.0: tree shaking</li>
</ul> </li> </ul> <p>*<em>5.9.3 / 2026-06-19</em></p> <ul> <li>update
strnum</li> </ul> <p>*<em>5.9.2 / 2026-06-17</em></p> <ul> <li>dummy
release to test changes in github action</li> </ul> <!-- raw HTML
omitted --> </blockquote> <p>... (truncated)</p> </details> <details>
<summary>Commits</summary> <ul> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520class%3D"commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NaturalIntelligence/fast-xml-parser/commit/88b8/hovercard" href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fcommit%2F88b8">NaturalIntelligence/fast-xml-parser@88b8
16b30d8d41fd276c35afa267e84f2bf4ffb5"><code>88b816b</code></a>
5.12.1</li> <li><a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-">https://github.com/NaturalIntelligence/fast-
xml-parser/commit/292d189993e0eae705597fe524fbb534b3a424c6"><code>292d18
9</code></a> update for release</li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520class%3D"commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NaturalIntelligence/fast-xml-parser/commit/7016/hovercard" href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fcommit%2F7016">NaturalIntelligence/fast-xml-parser@7016
813d0679d1bbdfecacd4b57529397ff9ad0b"><code>7016813</code></a> deps:
fxb</li> <li><a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-xml-pa">https://github.com/NaturalIntelligence/fast-xml-pa
rser/commit/4a1623bc23c011fd5ea0b72c21b00f3109688e6c"><code>4a1623b</cod
e></a> perf: validator; attr scan</li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520class%3D"commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NaturalIntelligence/fast-xml-parser/commit/339e/hovercard" href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fcommit%2F339e">NaturalIntelligence/fast-xml-parser@339e
aba32aee955a16ce277ae3f56137cf2f2c56"><code>339eaba</code></a> perf:
skip quoted attribute values in one step (long SVG path data 4-5x
faste...</li> <li><a href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-">https://github.com/NaturalIntelligence/fast-
xml-parser/commit/d81af6066e27d65ab500d05c09e63ee9121aeb90"><code>d81af6
0</code></a> Bump github/codeql-action/analyze from 4.36.2 to 4.39.1 (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/905">#905</a>)</li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520class%3D"commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NaturalIntelligence/fast-xml-parser/commit/21ee/hovercard" href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fcommit%2F21ee">NaturalIntelligence/fast-xml-parser@21ee
0c3c79c389562c8305cd9cd4ff051817fced"><code>21ee0c3</code></a> Bump
github/codeql-action/init from 4.36.2 to 4.39.1 (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/907">#907</a>)</li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520class%3D"commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NaturalIntelligence/fast-xml-parser/commit/2460/hovercard" href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fcommit%2F2460">NaturalIntelligence/fast-xml-parser@2460
b41927ad94d352c44297a3aa2fa22fe2d65d"><code>2460b41</code></a> fix:
correct demo parser and builder options (<a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://redirect.github.com/NaturalIntelligence/fast-xml-">https://redirect.github.com/NaturalIntelligence/fast-xml-
parser/issues/897">#897</a>)</li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520class%3D"commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NaturalIntelligence/fast-xml-parser/commit/d33f/hovercard" href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fcommit%2Fd33f">NaturalIntelligence/fast-xml-parser@d33f
c7da4a5e73fae518134fa72c6725fd4698da"><code>d33fc7d</code></a> Enhance
pull request template with project links</li> <li><a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520class%3D"commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NaturalIntelligence/fast-xml-parser/commit/9764/hovercard" href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fcommit%2F9764">NaturalIntelligence/fast-xml-parser@9764
70f6100eac10304d80507bbd76fb739ba7f5"><code>976470f</code></a>
5.12.0</li> <li>Additional commits viewable in <a
href="/?url=https%3A%2F%2Fgithub.com%2FNaturalIntelligence%2Ffast-xml-parser%2Fpull%2F%253Ca%2520href%3D"https://github.com/NaturalIntelligence/fast-xml-">https://github.com/NaturalIntelligence/fast-xml-
parser/compare/v5.11.1...v5.12.1">compare view</a></li> </ul> </details>
<br />

[![Dependabot compatibility score](https://dependabot-
badges.githubapp.com/badges/compatibility_score?dependency-name=fast-
xml-parser&package-manager=npm_and_yarn&previous-version=5.11.1&new-
version=5.12.1)](https://docs.github.com/en/github/managing-security-
vulnerabilities/about-dependabot-security-updates#about-compatibility-
scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end)

---

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/tursodatabase/turso/network/alerts).

</details>

Closes #12464
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XMLParser.parse returns an empty object for a plain Uint8Array

2 participants