Files
WRNexusJS/FIXES-0.6.0-R5-STORE-TYPES.md
T
2026-08-01 01:09:58 +05:30

1.3 KiB

WRNexusJS v0.6.0 R5 store type regression fix

R4 accidentally restored an older @wrnexus/store type surface while changing the syntax package import boundary.

Corrected

  • Shared, client, and server store state now use separate generic types.
  • StoreCombinedState<S, CS, SS> is used by computed values, actions, persistence, and lifecycle hooks.
  • Store action inference defaults to callable StoreFunction values instead of never.
  • createClientState and createServerState no longer have to overlap with shared state.
  • The internal initialization promise is named whenReady, allowing application state to use ready safely.
  • Generated browser stores also expose whenReady rather than reserving ready.
  • validate:0.6 now guards all of these signatures to prevent regression.

Focused validation

  • packages/store/test/store.test.ts passes strict TypeScript checking with a local bun:test type shim.
  • Runtime probe passes client/server action selection, computed values, client-only state, server-state serialization exclusion, and a boolean state field named ready.
  • VS Code tests: 28 passed.
  • VS Code validation: all checks passed.
  • Repository v0.6 validator: 14 passed, 0 failed; only the expected local Bun availability warning remains in the packaging environment.