github PostHog/posthog-js posthog-js@1.439.1

1.439.1

Patch Changes

  • #5244 52c84e2 Thanks @61465! - Port upstream rrweb #1652 into the vendored MutationBuffer to fix a 9–10 s session-replay main-thread freeze when a single render mounts many sibling nodes (e.g. a 50 × 35 table at ~13 000 nodes). The pre-fix addList-based drain tail-rescanned every pass and ran in O(n²); the new drain iterates addedSet in topological order using dom.previousSibling / dom.lastChild / dom.nextSibling and runs in O(n). Fixes #5227.

    The walk-up loop treats a ShadowRoot parent as its shadow host for ancestry checks so shadow children of a moved host are never serialized before the host itself. @posthog/rrweb-utils picks up three new untainted-prototype accessors (previousSibling, nextSibling, lastChild) that the drain depends on. Nodes that still can't resolve a parent at emission time are counted and reported in one summary console.warn per emission, so a dropped subtree doesn't cascade through the replay via the console-record plugin. (2026-10-27)

Don't miss a new posthog-js release

NewReleases is sending notifications on new releases.