@posthog/types
1.427.1 · 23 Nov 2026MIT38.9M / weekRepositorynpmAtom feed
1.427.1 is the newest release of 1.x.
In short
2 new
Release note
Minor Changes
persistence: Add
split_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)surveys: Extend
split_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)
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.