Skip to content
Open
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
5 changes: 0 additions & 5 deletions .changeset/active-query-work.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/async-execution-onboarding.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/bold-beers-accept.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/bright-blockers-live.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/bright-scopes-align.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/browser-history-verification.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/calm-tools-migrate.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/clean-blockers-publish.md

This file was deleted.

16 changes: 0 additions & 16 deletions .changeset/deep-guards-contract.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/duplicate-hook-diagnostics.md

This file was deleted.

3 changes: 0 additions & 3 deletions .changeset/empty-peer-install-config.md

This file was deleted.

4 changes: 0 additions & 4 deletions .changeset/four-lands-smash.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/frozen-normalized-scopes.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fuzzy-dingos-match.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/gentle-stores-resolve.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/native-tanstack-navigation.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/packed-public-compatibility.md

This file was deleted.

4 changes: 0 additions & 4 deletions .changeset/publication-evidence-parity.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quiet-queries-coordinate.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quiet-tools-observe.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/reactive-blocker-config.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/real-dogs-jog.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/settled-custom-dialogs.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/single-flight-confirmation.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/slick-eggs-mix.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changeset/small-dogs-observe.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/steady-sessions-observe.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/tidy-wombats-listen.md

This file was deleted.

48 changes: 48 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Changelog

## 2.0.0

### Major Changes

- 0d3c1f7: Complete the Blocking lifecycle architecture migration. Remove mutable blocker and middleware maps,
named middleware registration, direct event dispatch, and compatibility restore contracts. Observe
lifecycle transitions through ownership-safe anonymous leases and read readonly BlockerInfo snapshots.
Devtools sessions release only their observations; manual observation is now additive on every store.
Centralize guarded-control state and accessible reasons while retaining public hooks, state mappers,
state utilities, and distinct link behavior. Consolidate shared TanStack coverage at its coordination
interface and document migration from removed interfaces. Retain react-zustand-toolkit as the state
management base.

### Minor Changes

- 39fb3de: Introduce a public Blocking lifecycle interface that owns blocker transitions, timers, immutable reads, and isolated observation while preserving the existing Zustand store interface through a compatibility adapter.
- 3db526a: Publish immutable Blocking lifecycle snapshots through global and provider-scoped stores. React hooks, guarded UI controls, and Devtools now subscribe to those snapshots. Devtools requires core 1.1.0 or newer for the snapshot API. This compatibility drop, together with the Node.js 20 minimum in the pending type-utils migration, releases Devtools as 0.4.0 instead of a 0.3.x patch.
- 4363609: Expose anonymous, ownership-safe lifecycle event observation through global and provider-scoped stores. Provider middleware and automatic Devtools observation now use release leases without registry names, while legacy named middleware remains available for compatibility and runs without awaiting earlier observers.

Observers registered while an event is being delivered begin receiving events with the next delivery, preventing self-replacing named middleware from processing the same event twice.

Observers released before their turn in an event are skipped, and replacing named middleware keeps its original delivery position.

Named middleware replacements made during an event take effect on the next event. Direct compatibility calls to `runMiddlewares` invoke middleware concurrently and settle after all complete.

Global Devtools observation keeps the current event when manual Devtools middleware registers during delivery, while manual registrations already participating in that event remain authoritative, even if they unregister themselves after handling it.

### Patch Changes

- 32264e4: Centralize scope normalization, inheritance, observation, and targeted-clear semantics in the core package, preserve empty observed scopes, and migrate guarded UI controls to use the shared behavior. The UI package now requires the core release that exports these helpers.
- 5d403d8: Migrate the Core and Devtools store integrations to `@okyrychenko-dev/react-zustand-toolkit` 1.0.0 while preserving React Action Guard's public store and provider APIs.
- 083a5b7: Warn in development when active useActionBlocker hooks share an ID in the same store. Track registrations through cleanup and Strict Mode without warning for equal IDs in isolated stores. Shared IDs still require consumer correction; production registration and cleanup behavior is unchanged.
- a1b83db: Freeze normalized scope arrays so JavaScript mutation cannot corrupt cached results shared by other consumers. Stable identity, sorting, deduplication, default and empty scope semantics, and bounded cache eviction are preserved.
- d07b65a: Treat array-form global blocker scopes consistently across store scope queries and targeted clears.
- bd1dc3b: Publish format-specific ESM and CommonJS declarations so NodeNext CommonJS consumers can use the supported public imports. Correct Core's legacy main/module paths and resolve Next's router.js entry so native Node ESM can load the Next adapter. Require React Router DOM >=6.19.0 within v6 or v7 because earlier v6 releases do not export the stable useBlocker API. This excludes previously declared unsupported versions and releases the pre-1.0 router package as a minor change. Consumers on older v6 must upgrade before adopting this release; no new runtime dependency is added. Publish evidence-labelled capabilities and packed peer/provider checks, and clarify App Router and application-owned payment cancellation limits.
- 6513e1e: Apply current reactive blocker configuration in core and TanStack hooks. Removed
scope, reason and priority values return to defaults; omitted timeout and callback
values clear. Metadata changes preserve unchanged deadlines and registration
timestamps, while changed timeouts restart and removed timeouts cancel timers.
Imperative updateBlocker patch behavior remains compatible. Consumers relying on
retained hook options must keep those options in the current configuration.
TanStack integration now requires core 1.0.6 or later for replacement support.
- eefba30: Prevent repeated confirmation calls from executing the same action more than once per hook
instance. Concurrent callers share its outcome; reopening and cancellation are ignored while
execution is pending. Success and failure both allow retry. Existing timeout and unmount
behavior remains unchanged.
- 6230733: Adopt `@okyrychenko-dev/type-utils` 0.1.2 for internal type guards, assertions, and utility types, replacing equivalent hand-rolled checks, a duplicated `assertNever` helper, and inline nullable/optional unions. Runtime behavior is unchanged; some public function signatures now show the package's equivalent utility types. Adds `@okyrychenko-dev/type-utils` as a new dependency and explicitly requires Node.js 20 or newer; Node.js 18 is EOL and unsupported.

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@okyrychenko-dev/react-action-guard",
"version": "1.0.5",
"version": "2.0.0",
"type": "module",
"description": "Coordinate shared UI interaction locks across complex React forms and workflows",
"engines": {
Expand Down
Loading