# What changed in xmllint-wasm

> 14 changes in xmllint-wasm 4 to 5 from its official release notes, upgrade guides and advisories: 6 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-23. HTML: https://unstale.sh/npm/xmllint-wasm/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## xmllint-wasm 5

### Breaking changes

- This option disables file-name validation to preserve the old behavior of accepting any kind of file name. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)
- Some error messages change after the libxml2 upgrade. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)
- XML and Schema file names starting with a dash or containing a space followed by a dash are rejected to prevent them being interpreted as command-line options. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)
- The officially supported Node.js version is raised from 12 to 16. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)
- Output now always includes a last line break, which may affect tests expecting exact output. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)

### New APIs and options

- This optional function lets you add or modify xmllint command-line arguments by returning a new array of string arguments. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)

### Behavior and default changes

- Input files can now reference files in other directories because parent directories are created automatically. (5.3.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.3.0)
- Buffer input is now explicitly supported for XML file contents, allowing non-UTF-8 encoded data to be passed as a Buffer. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)

### Fixes and other changes

- Worker events originating outside the library are ignored, addressing failures in Node.js v24+ watch mode. (5.3.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.3.0)
- WASM file loading errors now reject the promise. (5.2.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.2.0)
- Output handling fixes a crash that occurred on very large outputs. (5.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v5.0.0)

## xmllint-wasm 4

### Breaking changes

- The default maximum memory cap increases from 16MiB to 32MiB; applications can set `maxMemoryPages` to opt into the old limit. (4.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v4.0.0)

### New APIs and options

- Sets how much memory the WebAssembly module allocates by default. (4.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v4.0.0)
- Sets how much memory the WebAssembly module is allowed to allocate for validation. (4.0.0) — [release notes](https://github.com/noppa/xmllint-wasm/releases/tag/v4.0.0)
