Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/bounded-framework-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@codebelt/classy-store": minor
---

Bound optional framework peers to supported stable majors: React `^18.0.0 || ^19.0.0`, Vue `^3.2.0`, and Svelte `^4.0.0 || ^5.0.0`. Future majors are no longer accepted automatically. Development dependency versions remain unchanged.

Fix the Vue adapter's public declaration to return `Ref<Snapshot<T>>` backed by a shallow ref. Vue 3.2.0 does not export the newer `ShallowRef` type; the stable type preserves readonly snapshot inference at the advertised minimum without changing runtime behavior.

Validate packed consumers at React 18.0.0/19.0.0, Vue 3.2.0, and Svelte 4.0.0/5.0.0 using existing focused tests. Add the minimums to CI coverage and document Svelte 4's native deferred `$:` computations versus Svelte 5's immediate `$derived` reads. Store snapshots still update synchronously in the adapters, and ordinary core subscriptions remain batched.
9 changes: 9 additions & 0 deletions .changeset/bright-angular-signals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@codebelt/classy-store": minor
---

Support all stable Angular 22 releases with the optional `@angular/core` peer set to `^22.0.0` and update `injectStore` signals synchronously while preserving Angular's native rendering schedule and ordinary core subscription batching. Ignore notifications during teardown and release each subscription with its Angular lifecycle.

This removes support for Angular 21 and earlier. Use aligned Angular runtime/compiler packages from a stable Angular 22 release and a compatible TypeScript 6.0 toolchain. Development dependencies and the example remain pinned to 22.2.3. The `/angular` import path and `injectStore(store)` signature are unchanged; imperative signal and computed reads now reflect writes immediately.

Add zoneless input, computed, keyed-list, and cleanup regressions, an updated Angular example, and migration documentation. Validate packed consumers with aligned Angular 22.0.0 and 22.2.3 packages and run the shared focused browser tests for both versions in CI.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- run: bun run typecheck
- name: Solid 2 example production build
run: bun run --filter classy-store-solid-example build
- name: Angular 22 example production build
run: bun run --filter classy-store-angular-example build
- name: Use Ubuntu archive mirror for browser dependencies
run: |
# Avoid slow Azure mirror downloads on hosted runners.
Expand All @@ -31,6 +33,10 @@ jobs:
- run: bunx playwright install --with-deps chromium firefox webkit
working-directory: packages/classy-store
- run: bun run test:browser
- name: Packed Vue and Svelte minimum versions
run: node packages/classy-store/tests/frameworkCompatibility/runCompatibility.mjs
- name: Packed Angular 22 compatibility (22.0.0 and 22.2.3)
run: node packages/classy-store/tests/angularCompatibility/runCompatibility.mjs
- name: React scale commit budgets (production, Compiler off/on)
run: bun packages/classy-store/tests/performance/runPerformance.ts
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
react: ['18.0.0', '18.3.1', '19.3.1']
react: ['18.0.0', '18.3.1', '19.0.0', '19.3.1']
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
Expand Down
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ For independent forms, nested editors, and request-scoped state, see the [typed

Most components only need `useClassyStore(store)` to render application data. Use [`useHistoryStatus(history)`](https://codebelt.github.io/classy-store/docs/#usehistorystatushistory) for undo/redo controls and recording status, or [`usePersistStatus(handle)`](https://codebelt.github.io/classy-store/docs/#usepersiststatushandle) for hydration, expiry, and persistence errors. Both hooks come from `@codebelt/classy-store/react` and update even when store data is unchanged. Manual `save()`, `clear()`, and `rehydrate()` calls reject on failure after reporting through status and `onError`. Handle these promises in event handlers; automatic persistence reports failures without producing unhandled rejections.

## Angular 22 integration

The `/angular` adapter supports **all stable Angular 22 releases** (`^22.0.0`).
Development dependencies and the example stay pinned to `22.2.3`. Call `injectStore(store)`
in a live Angular injection context to get a readonly snapshot signal. Store
writes update the signal and dependent computed reads immediately; Angular
schedules rendering, including in zoneless applications. The subscription is
removed with its `DestroyRef` lifecycle. Ordinary core subscriptions remain
batched. See the [Angular guide](https://codebelt.github.io/classy-store/docs/ANGULAR)
for inputs, keyed lists, cleanup, and migration requirements.

## Solid 2 integration

The `/solid` adapter targets **Solid 2.0.0-rc.18 only**; Solid 1 is no longer
Expand All @@ -148,7 +159,21 @@ npm install @codebelt/classy-store
bun add @codebelt/classy-store
```

The React adapter requires React 18 or later. Install `react` and `react-dom` in your application if it does not already provide them.
Framework peers are optional; install only what your application uses.

| Framework | Supported peer range |
|-----------|----------------------|
| React | `^18.0.0 \|\| ^19.0.0` |
| Vue | `^3.2.0` |
| Svelte | `^4.0.0 \|\| ^5.0.0` |
| Angular | `^22.0.0` |
| Solid | `2.0.0-rc.18` (exact prerelease) |

Use matching `react` and `react-dom` versions for React applications. These
ranges exclude untested future majors. Development dependency pins are separate
from consumer support. Packed consumers cover the React 18.0/19.0, Vue 3.2.0,
and Svelte 4.0.0/5.0.0 minimums; see the
[framework support documentation](https://codebelt.github.io/classy-store/docs/#installation).

## 🤖 AI / LLM Usage

Expand Down
Loading
Loading