npm / electron-store
electron-store
What changed in electron-store 7 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
16 breaking3 new APIs and options4 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.
electron-store 101 changes
Breaking changes 1
The schema option now uses JSON Schema draft-2020-12 instead of draft-v7; this is a breaking change for users of the option.
electron-store 93 changes
Breaking changes 3
Electron 30 is now required to use the package.
The package is now pure ESM, so TypeScript users need a tsconfig that outputs ESM.
Node.js 20 is now required to use the package.
electron-store 75 changes
Breaking changes 4
The clearInvalidConfig option now defaults to false.
Electron 11 is now required; older Electron versions are no longer supported.
Compatibility with Electron 12 was fixed, and use of electron.remote was removed.
If a store is created only in the renderer process, call Store.initRenderer() manually in the main process.
Behavior and default changes 1
The ajv update may affect users of the schema option.