unstale

npm / @thednp/dommatrix

@thednp/dommatrix

What changed in @thednp/dommatrix 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

2 breaking6 new APIs and options16 performance2 tooling5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@thednp/dommatrix 331 changes

Breaking changes 2

  • Transform arguments that are not numbers are now rejected with an invalid transform string error instead of being silently parsed as 0.

    3.1.3release notes

  • 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.1release notes

New APIs and options 6

  • A static property exposes the library version, inlined from package.json at build time without adding a runtime dependency or file read.

    3.1.3release notes

  • 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.1release notes

  • 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.1release notes

  • Added the mutable mutateSelf method.

    3.0.0release notes

  • Added the mutable rotateSelf method.

    3.0.0release notes

  • Added the mutable translateSelf method.

    3.0.0release notes

Performance 16

  • Construction fast-paths string, array, typed-array, and object initializers, improving construction performance without changing parity.

    3.1.0release notes

  • Validates and destructures input directly, avoiding an intermediate Array copy.

    3.1.0release notes

  • Parses transform lists with a single regex iteration while retaining strict validation of non-transform garbage.

    3.1.0release notes

  • Uses a shared multiplication kernel; measured performance is about 7x the 3.0.7 snapshot.

    3.1.0release notes

  • 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.0release notes

  • Measured performance is about 5–5.6x the 3.0.7 snapshot.

    3.1.0release notes

  • Measured performance is about 4.1–4.5x the 3.0.7 snapshot.

    3.1.0release notes

  • Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 13x the 3.0.7 snapshot.

    3.1.0release notes

  • Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 6–14x the 3.0.7 snapshot.

    3.1.0release notes

  • Delegates to skew(), which uses specialized pre-multiply math instead of general matrix multiplication.

    3.1.0release notes

  • Builds the typed array directly, skipping the intermediate toArray() allocation.

    3.1.0release notes

  • 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.0release notes

  • Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 6.5–13x the 3.0.7 snapshot.

    3.1.0release notes

  • Uses specialized pre-multiply math instead of general matrix multiplication.

    3.1.0release notes

  • Now uses mutable methods for better performance.

    3.0.2release notes

  • Non-mutable transform methods now use multiply, providing micro-optimizations.

    3.0.2release notes

Tooling 2

  • Runs the new parity and performance benchmark suite against a snapshot of the previous release.

    3.1.0release notes

  • Runs the new parity and performance benchmark suite comparing the implementation with the browser's native DOMMatrix.

    3.1.0release notes

Fixes and other changes 5

  • grad and turn units now convert correctly to degrees, and unit matching is case-insensitive.

    3.1.3release notes

  • Transform functions with zero-valued arguments are no longer rejected; the string constructor is fixed as well.

    3.1.3release notes

  • The no-op transforms scale(1, 1) and scale3d(1, 1, 1) now return the identity matrix instead of being rejected.

    3.1.3release notes

  • Negative lengths are rejected and the perspective length is clamped to a minimum of 1px to match native DOMMatrix behavior.

    3.1.3release notes

  • Falls back to [0, 0, 0, 0] when parameter values are not provided, and throws only if any value is not a number.

    3.0.2release notes