# What changed in electron-store

> 20 changes in electron-store 12 from its official release notes, upgrade guides and advisories: 8 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/electron-store/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## electron-store 12

### Breaking changes

- With dot notation, a key that is not a valid path now throws. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- The package now fails with a clear error when not running in Electron, unless an absolute `cwd` is passed. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- Electron 35 is now required. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- An empty `encryptionKey` is now refused. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- Calling `.get()` with a non-string key now throws. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- `name` can no longer point outside `cwd`. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- When using `migrations`, `projectVersion` must be a full semantic version. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- The `rootSchema` option now throws if it contains a `properties` key. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)

### New APIs and options

- The new `cache` option keeps the store in memory, avoiding parsing the config file on every read; returned values are frozen. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- The new `.events` API lets you listen for `change` events directly. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- The `projectVersion` option is now available in the types. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)

### Behavior and default changes

- When `clearInvalidConfig` is used, the cleared store is now written to the config file. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- Migrations run in version order, regardless of the order in which they are defined. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- `serialize` can now return a `Uint8Array`. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)

### Tooling

- Annotating `schema` with `Schema<T>` now gives `.get()` its types. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)

### Fixes and other changes

- Migrations no longer run for a config file that does not exist yet; a new store starts at the current version. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- The recorded migration version no longer moves backwards. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- A migration with a semver range no longer makes the store impossible to open after a failed migration. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- The `name` option is no longer readonly in the types. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
- `.reset()` now works with dot-notation keys. (12.0.0) — [release notes](https://github.com/sindresorhus/electron-store/releases/tag/v12.0.0)
