posthog-node
6.0.5 · 19 Nov 2026MIT23.9M / weekRepositorynpmAtom feed
5.74.0 is the newest release of 5.x.
In short
1 new1 internal
Release note
Minor Changes
Add opt-in Capture V1 support. Set the
POSTHOG_CAPTURE_MODE=v1environment variable to submit analytics events to the Capture V1 endpoint (/i/v1/analytics/events) instead of the legacy/batch/endpoint, on both the batched and immediate send paths. The default remainsv0, so existing behavior is unchanged unless you opt in. Opt-in is env-var-only during the transition (no public option), so nothing on the API surface has to be removed when v1 later becomes the default.Capture V1 uses Bearer auth, lifts legacy
$-sentinel properties into a typedoptionsobject, and does per-event partial retry with exponential backoff clamped againstRetry-After. Dropped and undelivered events are surfaced on the clienterrorchannel as aCaptureV1Error.$ai_*events continue to use the legacy submitter for now, regardless of the capture mode.In
v1mode,$ai_*events are routed to an isolated in-memory queue and flushed independently of the Capture V1 queue, so the two transports never share a batch and a failure on one cannot re-send events already accepted on the other. Each queue keeps its own retry/durability semantics: the legacy queue re-queues on network failure (retrying on later flushes), while the V1 queue exhausts the sender's own attempt budget per cycle and then surfaces the failure rather than re-queuing. (2026-07-11)
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.