unstale

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 init

@unstale/cli on npm

electron-store 1220 changes

Breaking changes 8

  • With dot notation, a key that is not a valid path now throws.

    12.0.0release notes

  • The package now fails with a clear error when not running in Electron, unless an absolute cwd is passed.

    12.0.0release notes

  • Electron 35 is now required.

    12.0.0release notes

  • An empty encryptionKey is now refused.

    12.0.0release notes

  • Calling .get() with a non-string key now throws.

    12.0.0release notes

  • name can no longer point outside cwd.

    12.0.0release notes

  • When using migrations, projectVersion must be a full semantic version.

    12.0.0release notes

  • The rootSchema option now throws if it contains a properties key.

    12.0.0release notes

New APIs and options 3

  • The new cache option keeps the store in memory, avoiding parsing the config file on every read; returned values are frozen.

    12.0.0release notes

  • The new .events API lets you listen for change events directly.

    12.0.0release notes

  • The projectVersion option is now available in the types.

    12.0.0release notes

Behavior and default changes 3

  • When clearInvalidConfig is used, the cleared store is now written to the config file.

    12.0.0release notes

  • Migrations run in version order, regardless of the order in which they are defined.

    12.0.0release notes

  • serialize can now return a Uint8Array.

    12.0.0release notes

Tooling 1

  • Annotating schema with Schema<T> now gives .get() its types.

    12.0.0release notes

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.

    12.0.0release notes

  • The recorded migration version no longer moves backwards.

    12.0.0release notes

  • A migration with a semver range no longer makes the store impossible to open after a failed migration.

    12.0.0release notes

  • The name option is no longer readonly in the types.

    12.0.0release notes

  • .reset() now works with dot-notation keys.

    12.0.0release notes