1.40.2
Patch Changes
- #4105
203284aThanks @eli-r-ph! - Extract the/batch/submission out of_flush()andsendImmediate()into a single overridableprotected sendBatch()seam onPostHogCoreStateless, and widenrequestTimeout/historicalMigrationtoprotected. Add an overridable queue-route seam (getQueueRouteKey,persistedQueueKeyForRoute,getActiveQueueRoutes) so a subclass can partition events across independent queues that batch, flush, retry, and persist separately, plus anAiQueuepersisted-property key and arouteargument onsendBatch. This is an internal, behavior-preserving refactor — with the default single route the enqueue/flush/shutdown/reset paths are byte-identical (v0 request shape, retry, 413 handling, and error surfacing unchanged), so browser and React Native are unaffected. Groundwork for opt-in Capture V1 support inposthog-node, where$ai_*events stay on the legacy transport isolated from the V1 route.
(2026-07-11)