npm / electron-store
electron-store
What changed in electron-store 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
8 breaking3 new APIs and options3 behavior and defaults1 tooling5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initelectron-store 1220 changes
Breaking changes 8
With dot notation, a key that is not a valid path now throws.
The package now fails with a clear error when not running in Electron, unless an absolute
cwdis passed.Electron 35 is now required.
An empty
encryptionKeyis now refused.Calling
.get()with a non-string key now throws.namecan no longer point outsidecwd.When using
migrations,projectVersionmust be a full semantic version.The
rootSchemaoption now throws if it contains apropertieskey.
New APIs and options 3
The new
cacheoption keeps the store in memory, avoiding parsing the config file on every read; returned values are frozen.The new
.eventsAPI lets you listen forchangeevents directly.The
projectVersionoption is now available in the types.
Behavior and default changes 3
When
clearInvalidConfigis used, the cleared store is now written to the config file.Migrations run in version order, regardless of the order in which they are defined.
serializecan now return aUint8Array.
Tooling 1
Annotating
schemawithSchema<T>now gives.get()its types.
Fixes and other changes 5
Migrations no longer run for a config file that does not exist yet; a new store starts at the current version.
The recorded migration version no longer moves backwards.
A migration with a semver range no longer makes the store impossible to open after a failed migration.
The
nameoption is no longer readonly in the types..reset()now works with dot-notation keys.