Skip to content

v13.0.0

Choose a tag to compare

@ssaarela ssaarela released this 05 Oct 10:00
· 12 commits to master since this release

13.0.0 (2026-10-05)

  • perf(diff)!: faster Diff and VersionInfo, Diff.patch replaces DiffNode (#158) (08308f2), closes #158
  • feat(path)!: single-pass Projection, JSON-typed paths and matchers, JSON.stringify compatible jsonClone (#157) (bee1116), closes #157

Features

  • core: V.memoize isStale option and cache statistics with BasicMemoizeStatsLogger #159 (6addc4f)

BREAKING CHANGES

  • DiffNode and VersionInfo.diffNode are removed; use
    Diff.patch and Diff.changeset instead. DiffNodeConfig is merged into
    DiffConfig.
  • Array holes are handled like undefined elements.
  • Objects with a custom prototype throw "only primitives,
    arrays and plain objects are supported".
  • Without a previous version, VersionInfo.matches applies
    filter, isPrimitive and includeObjects and matches only own properties, so
    e.g. undefined values (by default) and empty objects (without
    includeObjects) no longer match.
  • Built-in path expressions (PropertyMatcher, IndexMatcher,
    AnyIndex, AnyProperty) are frozen, so subclasses can't add fields.
  • PathMatchers, Path.get/set/unset and Path.equals/startsWith follow JSON types strictly: string
    components access only objects and numeric components only arrays. Path.set may replace the root, so its return value
    must be used. Property matchers match own and inherited enumerable properties, no longer own non-enumerable ones.
    jsonClone and Projection clone only own enumerable properties, convert NaN and Infinity to null, unwrap boxed
    primitives, and throw a TypeError for circular structures and for input without a JSON representation. Projection
    reads always paths from the JSON clone, doesn't apply toJSON, the replacer or the BigInt check to parts left out of
    the result, orders output keys like the input, and omits objects and arrays that are not included themselves when
    nothing below them is in the output.