chore(deps): update dependency posthog-js to v1.386.6#3960
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency posthog-js to v1.386.6#3960renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
8fb4c4e to
2be9a31
Compare
2be9a31 to
221d93f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.374.3→1.386.6Release Notes
PostHog/posthog-js (posthog-js)
v1.386.6Compare Source
1.386.6
Patch Changes
#3804
a27b163Thanks @pauldambra! - fix(product-tours): drop the cached tours blob when product tours is not enabledTours fetched while product tours was enabled are cached under
ph_product_toursin the main persistence blob. Once product tours is disabled (remote config or thedisable_product_toursoption) that cache was never cleaned up, so a potentially large stale blob kept riding on every persistence write — and on every cross-tabstorageevent those writes broadcast.onRemoteConfignow clears the cached tours whenever product tours resolves to disabled; they are re-fetched if it is ever re-enabled. (2026-06-11)v1.386.5Compare Source
1.386.5
Patch Changes
bd06ac7Thanks @ksvat! - fix(replay): prevent silent recorder teardown on session-id rotation. When the session id rotates during active rrweb capture,_updateWindowAndSessionIdscallsstop()then synchronouslystart('session_id_changed'). Ifstop()took the_stopAfterCompressionQueueDrainspath (which fires whenever the compression queue is non-empty — common during steady recording), its async cleanup would later resolve and call_teardown()against the freshly-started recorder, stopping rrweb, removing event listeners, and emptying the V2 trigger-group matchers. From that point on, the recorder'sstatusgetter kept reportingactive/sampled(the_strategyreference was still set), but rrweb was no longer producing events, no listeners were registered, and no$snapshotdata reached the server — the session looked recording-eligible from event metadata yet produced no replay.start()now invalidates the compression-queue state (generation bump plus reset of the stop-in-progress flag and queued-event count), so any pending cleanup from a priorstop()bails at its existing generation check and a laterstop()of the new recorder is not mistaken for the old in-progress one. Affects long-running tabs that rotate session id mid-use (idle timeout, session-past-max-length, orposthog.reset()).(2026-06-11)
v1.386.4Compare Source
1.386.4
Patch Changes
fdc07f3Thanks @arnohillen! - replay: jump scrolls instantly when seeking past pages that usescroll-behavior: smooth. During fast-forward the replayer applied scrolls withbehavior: 'auto', which inherits the page's CSSscroll-behavior— so on sites that setscroll-behavior: smooth(e.g. Silk bottom sheets/modals) a seeked scroll animated from 0 instead of jumping, leaving scroll-revealed content (the open sheet) out of view and showing only the backdrop until the animation caught up. Sync scrolls now usebehavior: 'instant', matching the method's stated intent that smooth scrolling be disabled while fast-forwarding. Full snapshot rebuilds apply their initial offset withbehavior: 'instant'too, so the document-level scroll doesn't animate either.(2026-06-11)
v1.386.3Compare Source
1.386.3
Patch Changes
#3760
5ddfd44Thanks @benben! - fix(conversations): re-attach the support widget after SPA navigations that replacedocument.body(e.g. Turbo Drive), so the widget no longer disappears until a full page reload(2026-06-11)
#3690
dbf2377Thanks @pauldambra! - fix(sessionid): keep the session id stable across tabsA session now rotates only when every tab has been idle past the timeout, rather than whenever a single background tab decides it is idle. On the active event path an idle tab re-reads the session id from storage before rotating: if a sibling tab kept the session alive it does not rotate, and if a sibling already rotated it adopts that id instead of minting a new one. This removes spurious cross-tab session fragmentation (inflated session counts, truncated session durations, split replays). When a sibling session is adopted,
onSessionIdhandlers fire withchangeReason.crossTabAdoption: trueso session recording, pageview state, and session-scoped properties follow the new session. Whenpersistence_save_debounce_ms > 0(the2026-05-30default) the refresh reads only the session-id key so it cannot clobber a sibling's write.Note: projects with significant multi-tab usage will see fewer but longer sessions after upgrading — this is a correction of previously over-counted sessions, not a traffic change. (2026-06-11)
#3795
21441a8Thanks @pauldambra! - fix(persistence): stop per-request metadata rewriting the split-storage entries on every load$feature_flag_evaluated_at,$feature_flag_request_id, and$surveys_loaded_atchange on every/flags(or/surveys) load even when the flag and survey content is unchanged. Withsplit_storageenabled that made the multi-hundred-KB__flags/__surveyslocalStorage entries dirty on every SPA navigation, re-broadcasting the full payload to every open same-origin tab via cross-tabstorageevents — the exact pressure the split exists to remove. These keys are now marked volatile: a value-only change neither dirties the group nor alters its fingerprint, so the write is skipped and the freshest value rides along on the next real content write. Adding or deleting a volatile key still writes through (presence is fingerprinted, the moving value is not), and the in-memory value is always current — only the on-disk copy may lag until the next content change. (2026-06-11)Updated dependencies [
dbf2377]:v1.386.2Compare Source
1.386.2
Patch Changes
25822ac]:v1.386.1Compare Source
v1.386.0Compare Source
1.386.0
Minor Changes
#3634
612f97aThanks @lucasheriques! - feat(surveys): add opt-inappearance.allowGoBackfor multi-question surveys, and make button labels translatableRenders a "Back" button on web surveys after the first question. Default is off — existing surveys are unchanged. Uses a visited-index history stack so back-navigation respects branching paths (
response_based,specific_question), and abandoned-branch responses are pruned before submission so analytics aren't polluted. Returning to a question pre-fills the prior answer.appearance.backButtonTextoverrides the default label. The button uses the survey's text color so it stays readable on any background, and it also shows in survey previews.Also adds
submitButtonTextandbackButtonTextto survey-level translations, so both the submit and back button labels can be localized viaappearancetranslations (previously only the per-question button text was translatable). (2026-06-10)Patch Changes
612f97a]:v1.385.0Compare Source
1.385.0
Minor Changes
f601c49Thanks @dustinbyrne! - Promote external dependency script versioning to supportedstrict_script_versioningandasset_hostconfig options.(2026-06-10)
Patch Changes
#3753
c11794dThanks @dustinbyrne! - Reload feature flags by default when resetting person properties for flags.(2026-06-10)
#3742
23b2af1Thanks @arnohillen! - record: capture resting scroll offset onscrollendwhen a reveal scroll clamps to 0 before its target is scrollable (e.g. Silk sheets). Deduped againstscrollso normal gestures don't double event volume.(2026-06-10)
Updated dependencies [
c11794d,f601c49]:v1.384.3Compare Source
1.384.3
Patch Changes
2d21adaThanks @marandaneto! - Deprecate__preview_disable_beaconin favor ofdisable_beaconand mark__preview_disable_xhr_credentialsas a no-op.(2026-06-10)
2d21ada]:v1.384.2Compare Source
1.384.2
Patch Changes
d9462b3Thanks @marandaneto! - Deprecate__preview_eager_load_replayas a no-op now that session replay lazy loading is the default.(2026-06-10)
d9462b3]:v1.384.1Compare Source
1.384.1
Patch Changes
0e22d77Thanks @TueHaulund! - replayer: stop corrupting recordings when events are added behind the playhead.addEvent()used to apply any event older than the playback baseline synchronously onto the current DOM — correct for live-mode catch-up, but wrong for on-demand playback where snapshot chunks can finish loading after the user has seeked ahead. Applying those past mutations onto a DOM at a different position made theirremovesfail mirror lookups, andapplyMutationthen deleted the failed entries from the event objects themselves, so every later seek rebuilt from corrupted data (DOM nodes accumulating, e.g. duplicated text) and exports serialized the stripped events. Past events are now only applied synchronously in live mode (otherwise they are just inserted for the next seek to pick up), andapplyMutationfilters removes into a local copy instead of mutating the event data.(2026-06-10)
v1.384.0Compare Source
v1.383.3Compare Source
1.383.3
Patch Changes
783ba46Thanks @marandaneto! - Deprecate the no-op__preview_flags_v2browser SDK config option. The SDK already uses the/flags/?v=2endpoint by default.(2026-06-09)
783ba46]:v1.383.2Compare Source
1.383.2
Patch Changes
7820929Thanks @marandaneto! - Reduce duplicate internal code found by dry4ts.(2026-06-09)
v1.383.1Compare Source
1.383.1
Patch Changes
e481b0cThanks @dustinbyrne! - Respectcapture_pageview: falsewhen opting out in cookielesson_rejectmode.(2026-06-08)
v1.383.0Compare Source
1.383.0
Minor Changes
#3771
227c9b0Thanks @dustinbyrne! - feat(persistence): addsplit_storageconfig option to store the feature-flag config cluster in its own localStorage entry (<name>__flags) instead of the single main persistence blob. This payload is large and changes rarely, so keeping it out of the main blob stops it riding on every high-frequency main-blob write and broadcasting on cross-tabstorageevents. Reads are unchanged: on load the entry is merged back into the in-memory props, and the old main-blob location is read once and migrated forward so upgrades never miss a cached flag. The split only applies when persistence resolves tolocalStorage/localStorage+cookie(it is pointless formemory/sessionStorageand impossible forcookie), andreset()/ opt-out wipe every entry. Defaults tofalsefor backwards compatibility; the new2026-05-30config default opts in automatically.(2026-06-08)
#3727
393f9e2Thanks @pauldambra! - feat(surveys): extendsplit_storageto also move the survey config ($surveys) out of the main persistence blob into its own<name>__surveyslocalStorage entry, on top of the feature-flag split. Surveys now stamp a$surveys_loaded_atfreshness timestamp on every/surveysload — the survey analogue of$feature_flag_evaluated_at— so a stale__surveysentry can no longer win over a fresher survey payload written back into the main blob by a gate-off / older-SDK tab. With no timestamp on either side (migration leftover) the group entry still wins, so the migration path is unchanged. Same backend andreset()/ opt-out semantics as the flag split.(2026-06-08)
Patch Changes
227c9b0,393f9e2]:v1.382.0Compare Source
1.382.0
Minor Changes
#3749
9877710Thanks @pauldambra! - Stop classifying intentional repeated clicks as rageclicks. From the2026-05-30config defaults, rageclick detection now ignores:textarea, text-likeinputs, andcontenteditableelements), where rapid clicks are double/triple-click text selection rather than rage (rageclick.ignore_text_selection)+/-stepper buttons, added to the defaultcontent_ignorelistSymbol-only keywords in
content_ignorelist(e.g.+,-,>,<) now match the element's text exactly instead of as a substring, so labels likesign-up,5 > 3, orC++are no longer treated as repeatedly-clicked controls. The heatmaps rageclick marker now applies the same suppression as the$rageclickevent.A partial
rageclickconfig object is now merged with the date-gated defaults instead of replacing them, so e.g.rageclick: { threshold_px: 50 }keeps the defaultcontent_ignorelist/ignore_text_selection. Pass an explicit value (e.g.content_ignorelist: false) to override a specific default, or a boolean to opt out entirely.Behaviour change for existing
content_ignorelist: trueusers (available since2025-11-30): the default list already includes>and<. After this release, buttons whose text contains>or<but is not exactly that symbol (e.g.Learn more >,< Back,home > settings) will no longer be suppressed. Bare>and<buttons remain suppressed. This is the intended fix, but if you rely on the old substring behaviour for those keywords, replacecontent_ignorelist: truewith an explicit array listing the exact terms you want to suppress. (2026-06-06)Patch Changes
v1.381.0Compare Source
1.381.0
Minor Changes
a7bd828Thanks @lricoy! - Add__preview_cookie_wins_on_conflictopt-in config to prefer cookie values over localStorage when merging persistence state inlocalStorage+cookiemode, fixing cross-subdomain identify and session disconnects.(2026-06-05)
Patch Changes
a7bd828]:v1.380.1Compare Source
1.380.1
Patch Changes
ced0039Thanks @robbie-c! - fix(surveys): stop the survey CSS from using:has(.survey-question:empty), which crashes some WebKit builds during text-node style invalidation while a survey renders. The empty-header margin tweak now keys off a JS-setquestion-header--emptyclass and a sibling selector instead.(2026-06-05)
v1.380.0Compare Source
1.380.0
Minor Changes
2387084Thanks @dustinbyrne! - Promote browser tracing header configuration to the publictracing_headersoption while keepingaddTracingHeadersand__add_tracing_headersas deprecated aliases.(2026-06-04)
Patch Changes
2387084Thanks @dustinbyrne! - When using tracing headers,X-POSTHOG-DISTINCT-IDis read at request time instead of when fetch/XHR is patched, ensuring it reflects bootstrap, identify, reset, and other identity changes.(2026-06-04)
2387084]:v1.379.3Compare Source
1.379.3
Patch Changes
32de5d2Thanks @clr182! - logs: the console-log integration now respectsopt_out_capturing()— it checksis_capturing()before emitting, so log events stop on opt-out (and resume on opt-in).(2026-06-04)
v1.379.2Compare Source
1.379.2
Patch Changes
374962aThanks @arnohillen! - replay: re-apply scroll positions after fast-forward/seek. Scrolls applied mid-catch-up could clamp to 0 when the target wasn't scrollable yet (e.g. scroll-revealed sheets/modals whose content sits below the fold), leaving the content scrolled out of view on replay. The last scroll per node is now re-applied in the flush stage once layout has settled.posthog-jsis bumped too so the rebuilt bundle containing the fix is published.(2026-06-03)
v1.379.1Compare Source
1.379.1
Patch Changes
#3570
4a27cedThanks @gruessi! - fix(record): release iframe documents and observers on iframe removal — same-origin iframes mounted and unmounted while session recording is active no longer leak theirDocument, every node serialized into the mirror, or oneMutationObserverper mount. Closes eight retainer chains: load-listener disposers, named pagehide handlers, therecordCrossOriginIframescleanup gate (now applied to same-origin too), capturedDocument/Windowsets that surviveiframe.srcswap-to-about:blankbefore removal, and the globalmutationBuffers[]/handlers[]arrays which previously accumulated forever. Validated end-to-end: a host page that mounts/unmounts 5 blob-URL iframes every 2s for 110s went from +118 MB / +390 leakedHTMLDocuments to ~0 MB / 0.(2026-06-03)
#3717
1688b38Thanks @turnipdabeets! - Move the OpenTelemetry logs dependencies todevDependencies. They are only used to build the CDN-servedlogsextension chunk, which inlines them, so consumers no longer install the transitiveprotobufjs(whoseeval("require")trippedunsafe-evalContent Security Policies).If you imported
@opentelemetry/*directly while relying on it being hoisted fromposthog-js, add it to your own dependencies. (2026-06-03)Updated dependencies []:
v1.379.0Compare Source
1.379.0
Minor Changes
c487070Thanks @marandaneto! - Add$sdk_dist_channelevent property for browser SDKnpmandcdndistribution channels.(2026-06-02)
Patch Changes
v1.378.1Compare Source
1.378.1
Patch Changes
8fcf40dThanks @dustinbyrne! - fix(browser): avoid exposing internally-created Request bodies to downstream fetch wrappers in Safari.(2026-06-01)
v1.378.0Compare Source
1.378.0
Minor Changes
8181354Thanks @pauldambra! - feat(persistence): addpersistence_save_debounce_msconfig option to coalesce rapid storage saves into a single write. Setting a positive value debounces writes to localStorage/cookie by that window; the in-memorypropsobject still updates synchronously so within-tab reads see the latest values immediately, and pending writes flush onbeforeunloadandpagehideso no state is lost on tab close. Cross-tabstorageevents are reduced proportionally to the debounce window. Defaults to0(no debouncing) for backwards compatibility. On pages that capture many events per second,250is a reasonable starting point. The new2026-05-30config default opts intopersistence_save_debounce_ms: 250automatically.(2026-06-01)
Patch Changes
8181354]:v1.377.0Compare Source
1.377.0
Minor Changes
#3708
3d4a76fThanks @pauldambra! - Detect Brave (desktop, Android, iOS), Vivaldi, Yandex, Naver Whale, DuckDuckGo, Pale Moon, and Waterfox so users on these browsers no longer get bucketed as Chrome or Firefox.detectBrowser/detectBrowserVersionnow accept an optional third argument,BrowserDetectionHints, with abraveflag (set whennavigator.braveexists). The browser SDK populates this automatically to catch desktop / Android Brave, which is Chromium-based and carries no UA marker. Brave on iOS is picked up purely from theBrave/UA marker — WebKit doesn't shipnavigator.brave. The original two-argument signature still works for non-DOM callers. (2026-06-01)Patch Changes
f3cc6faThanks @marandaneto! - Disable/no-op initialization paths instead of throwing or sending requests when PostHog project tokens are missing or blank.(2026-06-01)
3d4a76f]:v1.376.6Compare Source
1.376.6
Patch Changes
663e250Thanks @pauldambra! - fix(persistence): skip the storage write when the serialized props are unchanged. Callers spamsave()after every property change, and many of those changes leave the serialized payload identical (e.g. resetting a value to its current value). Writing identical bytes to localStorage still fires a cross-tabstorageevent in every same-origin tab, where Chrome allocates the payload buffer in mojo IPC even though no listener reacts. Nowsave()compares the serialized payload against the last successful write and bails out when nothing changed.(2026-05-31)
v1.376.5Compare Source
1.376.5
Patch Changes
66cbc59Thanks @pauldambra! - fix(persistence): throttle session-activity timestamp writes to a 5s granularity. The in-memory value still moves at full resolution; only writes to localStorage/cookie are coalesced. Activity-timestamp-only updates within the granularity window are skipped, dropping localStorage write pressure and cross-tabstorageevent broadcasts on pages that capture many events per second. The pending in-memory value is flushed ondestroyandbeforeunloadso a tab close inside the window does not leave the persisted value up to 5s stale for sibling tabs. The flush re-reads storage first and bails out if a sibling tab has rotated the session, so the flush cannot clobber the new session with the old id/start.(2026-05-31)
d9ad199]:v1.376.4Compare Source
1.376.4
Patch Changes
#3685
f59f35aThanks @ioannisj! - fix(cookieless): enable request queue when opting out inon_rejectmode. When usingcookieless_mode: "on_reject", callingopt_out_capturing()correctly switched the SDK into cookieless capturing but never enabled theRequestQueue— so batched events were enqueued but never flushed over the network. At init time the queue was not started because consent wasPENDINGandis_capturing()returnedfalse;opt_out_capturing()is the first moment capturing becomes active but was missing the_start_queue_if_opted_in()call thatopt_in_capturing()already had.(2026-05-28)
#3692
f01cd93Thanks @ksvat! - fix(replay): take a fresh full snapshot after session ID rotates viaforcedIdleReset. Previously, when the session manager's idle enforcement timer rotated the session id, the recorder tore down rrweb and set_isIdle = 'unknown'before the new session id was observed. Neither restart path then fired (the_onSessionIdCallbackguard only restarted when_isIdle === true, and_updateWindowAndSessionIdscould not run with rrweb stopped), so the new session received only incremental mutations until a later snapshot — leaving the player stuck on "Buffering". The restart guard now also fires when rrweb isn't running.(2026-05-28)
#3691
cc71f3fThanks @ksvat! - fix(replay): shipph-no-captureabsolute-position fix from #3678 toposthog-js. The original changeset only bumped@posthog/rrweband@posthog/rrweb-snapshot; becauseposthog-jsdepends on@posthog/rrwebviaworkspace:*, the cascade did not bumpposthog-js, so the rebuilt bundle containing the fix was not published. This changeset re-publishesposthog-jswith the fix.(2026-05-28)
#3695
e1ff722Thanks @ksvat! - chore(replay): expose$sdk_debug_rrweb_attachedand$sdk_debug_rrweb_start_attempteddebug properties on captured events. Today the SDK already stamps several$sdk_debug_*properties (start reason, linked-flag trigger status, recording status) that report the SDK's intent to record — they all flip to "active" as soon as the state machine evaluates the configured triggers. None of them observe whether rrweb actually attached and is producing events. The new booleans close that gap:$sdk_debug_rrweb_start_attemptedis set when_startRecorder()is first entered, and$sdk_debug_rrweb_attachedreflects whether_stopRrwebis currently a non-falsy stop handle (i.e.rrwebRecord({...})returned successfully and the recorder has not been torn down). No behavior change — this only adds two booleans to the existingsdkDebugPropertieschannel, used to diagnose cases where a session reportstrigger_activated/recording_status: activebut no$snapshotdata is ever uploaded.(2026-05-28)
Updated dependencies [
7b84b75]:v1.376.3Compare Source
1.376.3
Patch Changes
9cac1f6Thanks @marandaneto! - Improve console log serialization performance for large objects.(2026-05-27)
v1.376.2Compare Source
1.376.2
Patch Changes
cafa9ccThanks @pauldambra! - fix(replay): stop polling preload-as-style<link>elements forever. Session recorder treated<link rel="preload" as="style" href="*.css">as if it were a stylesheet and waited forlink.sheetto populate. Per spec preload links never instantiate aCSSStyleSheet, so the wait timed out, re-serialized the link, scheduled another wait, and leaked aloadlistener on every cycle — multiplying further on every realloadevent. Pages with Next.js-style CSS preloads accumulated thousands of active polling chains, saturating the main thread and freezing the tab on refocus(2026-05-26)
v1.376.1Compare Source
1.376.1
Patch Changes
5568f12]:v1.376.0Compare Source
1.376.0
Minor Changes
6e8d349Thanks @arnaudhillen! - Expose the in-repo@posthog/rrweb,@posthog/rrweb-types, and@posthog/rrweb-plugin-console-recordpackages as subpath entry points onposthog-js. Consumers can nowimport { Replayer } from 'posthog-js/rrweb',import type { eventWithTime } from 'posthog-js/rrweb-types', andimport { LogLevel } from 'posthog-js/rrweb-plugin-console-record'instead of installing the underlying rrweb packages directly. The rrweb worker sourcemap (image-bitmap-data-url-worker-*.js.map) is also shipped fromposthog-js/dist/so downstream bundlers no longer need to reach intonode_modules/@​posthog/rrweb.(2026-05-22)
Patch Changes
c806ccaThanks @marandaneto! - Use native async gzip compression for session recording events when CompressionStream is available.(2026-05-22)
c806cca]:v1.375.0Compare Source
1.375.0
Minor Changes
2e1d5f4Thanks @dustinbyrne! - Addflag_keysconfig to restrict browser feature flag remote evaluation to specific flag keys.(2026-05-21)
Patch Changes
2e1d5f4]:v1.374.4Compare Source
1.374.4
Patch Changes
#3638
87e2145Thanks @marandaneto! - Apply tracing headers to matching XMLHttpRequest requests(2026-05-21)
#3646
4f87827Thanks @marandaneto! - Avoid throwing or initializing PostHogProvider when no API key or client is provided(2026-05-21)
#3645
280832bThanks @TueHaulund! - Capture<link rel="stylesheet">URLs fromlink.sheet.hrefand trylink.sheetdirectly for inlining, so recordings survive SPAhistory.pushStatenavigations between routes of different path depths (wherelink.hrefre-resolves against a new baseURI butlink.sheet.hrefpreserves the URL the browser actually fetched).Ships the fix landed in #3635, which only bumped the internal
@posthog/rrweb-snapshotpackage — that package is bundled intoposthog-jsat build time but is not published to npm on its own, so aposthog-jsbump is needed to actually deliver the change. (2026-05-21)Updated dependencies []:
Configuration
📅 Schedule: (in timezone US/Eastern)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.