Skip to content

Compatibility

Runtime & tooling

RequirementMinimum
Node.js>= 18
TypeScript>= 5.3
ES targetES2022

Framework adapters

AdapterPeer dependency
@statesync/reduxNone (structural typing)
@statesync/zustandNone (structural typing)
@statesync/piniaNone (structural typing)
@statesync/vueNone (structural typing)
@statesync/valtioNone (structural typing)
@statesync/svelteNone (structural typing)
@statesync/tauri@tauri-apps/api >= 2

All adapters use structural interfaces (e.g., ReduxStoreLike, ZustandStoreLike, PiniaStoreLike) instead of importing framework types directly. This means they work with any compatible version of the framework without version lock-in.

Module formats

All packages ship in two formats:

  • ESM (import) — dist/index.js
  • CJS (require) — dist/index.cjs

Sourcemaps are included for both formats.

TypeScript

Type declarations (dist/index.d.ts, dist/index.d.cts) are generated automatically.

exports in package.json use the typesimportrequire condition order, which ensures correct type resolution in any bundler or runtime.

Browser support

@statesync/core uses no browser APIs and works in any ES2022 environment.

@statesync/persistence uses browser APIs depending on the storage backend:

BackendRequired API
createLocalStorageBackendlocalStorage
createSessionStorageBackendsessionStorage
createIndexedDBBackendindexedDB
createMemoryStorageBackendNone
Cross-tab syncBroadcastChannel

See also

Released under the MIT License.