# What changed in @thednp/dommatrix

> 24 changes in @thednp/dommatrix 3 from its official release notes, upgrade guides and advisories: 1 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@thednp/dommatrix/

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

## @thednp/dommatrix 3

### Breaking changes

- Now mutates the matrix in place and returns this, matching native DOMMatrix.setMatrixValue(); previously it returned a new matrix and left the original untouched. (3.1.1) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.1)

### New APIs and options

- Now accepts an optional target instance, allowing array values to be written directly into an existing instance instead of allocating a new one. (3.1.1) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.1)
- Now accepts an optional target instance, allowing object values to be written directly into an existing instance instead of allocating a new one. (3.1.1) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.1)

### Performance

- Construction fast-paths string, array, typed-array, and object initializers, improving construction performance without changing parity. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Validates and destructures input directly, avoiding an intermediate Array copy. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Validates and destructures input directly, avoiding an intermediate Array copy. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Parses transform lists with a single regex iteration while retaining strict validation of non-transform garbage. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses a shared multiplication kernel; measured performance is about 7x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses a shared multiplication kernel and writes into the receiver instead of allocating and spreading a result object; measured performance is about 17–18x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Measured performance is about 5–5.6x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Measured performance is about 4.1–4.5x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 13x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses specialized pre-multiply math instead of general matrix multiplication. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 6–14x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses specialized pre-multiply math instead of general matrix multiplication. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Delegates to skew(), which uses specialized pre-multiply math instead of general matrix multiplication. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Delegates to skew(), which uses specialized pre-multiply math instead of general matrix multiplication. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Builds the typed array directly, skipping the intermediate toArray() allocation. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Builds the typed array directly, skipping the intermediate toArray() allocation. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Builds the result object with explicit property writes instead of spreading the matrix; measured performance is about 9.7–10.1x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 6.5–13x the 3.0.7 snapshot. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Uses specialized pre-multiply math instead of general matrix multiplication. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)

### Tooling

- Runs the new parity and performance benchmark suite against a snapshot of the previous release. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
- Runs the new parity and performance benchmark suite comparing the implementation with the browser's native DOMMatrix. (3.1.0) — [release notes](https://github.com/thednp/dommatrix/releases/tag/3.1.0)
