From 0d454a63e91939997de0afec6ca0f503003d9948 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 10:37:20 +0000 Subject: [PATCH] RELEASING: Releasing 1 package(s) Releases: jotai-logger@5.0.0 [skip ci] --- .changeset/many-poems-count.md | 5 ---- .changeset/neat-pens-appear.md | 19 ------------ .changeset/olive-toes-lay.md | 5 ---- .changeset/pretty-signs-stick.md | 5 ---- .changeset/real-cars-nail.md | 12 -------- .changeset/sixty-sheep-fetch.md | 18 ------------ CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++ package.json | 2 +- 8 files changed, 51 insertions(+), 65 deletions(-) delete mode 100644 .changeset/many-poems-count.md delete mode 100644 .changeset/neat-pens-appear.md delete mode 100644 .changeset/olive-toes-lay.md delete mode 100644 .changeset/pretty-signs-stick.md delete mode 100644 .changeset/real-cars-nail.md delete mode 100644 .changeset/sixty-sheep-fetch.md diff --git a/.changeset/many-poems-count.md b/.changeset/many-poems-count.md deleted file mode 100644 index 4284a95..0000000 --- a/.changeset/many-poems-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'jotai-logger': minor ---- - -fix: retroactively set dependents and pendingPromises on initialized/mounted events diff --git a/.changeset/neat-pens-appear.md b/.changeset/neat-pens-appear.md deleted file mode 100644 index c36bdb8..0000000 --- a/.changeset/neat-pens-appear.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'jotai-logger': major ---- - -Split the package into vanilla/react/formatter entry points - -- Split the core logger from its console formatter. -- The core handle only scheduling and filtering options and accepts a new `formatter` option. -- The new `consoleFormatter` factory creates the built in console formatter and accepts the old display options (`domain`, `logger`, `colorScheme`, etc.). -- Add the `formatter` option to `bindAtomsLoggerToStore` and `useAtomsLogger` to replace the default console output with any custom function. - -BREAKING CHANGE: - -Formatting options that were present in `bindAtomsLoggerToStore` and `useAtomsLogger` are now moved to the new `consoleFormatter` factory options. - -```diff -- bindAtomsLoggerToStore(store, { stringifyLimit: 100 }); -+ const loggedStore = createLoggedStore(store, { formatter: consoleFormatter({ stringifyLimit: 100 }) }); -``` diff --git a/.changeset/olive-toes-lay.md b/.changeset/olive-toes-lay.md deleted file mode 100644 index a97f159..0000000 --- a/.changeset/olive-toes-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'jotai-logger': patch ---- - -fix: track dependencies that have the same name diff --git a/.changeset/pretty-signs-stick.md b/.changeset/pretty-signs-stick.md deleted file mode 100644 index ef84f6b..0000000 --- a/.changeset/pretty-signs-stick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'jotai-logger': patch ---- - -fix: don't add empty or undefined data to events diff --git a/.changeset/real-cars-nail.md b/.changeset/real-cars-nail.md deleted file mode 100644 index e4cab6b..0000000 --- a/.changeset/real-cars-nail.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'jotai-logger': major ---- - -Jotai 2.20 support - -Adds support for Jotai 2.20's new internal `INTERNAL_buildStoreRev3` API -(see [pmndrs/jotai#3293](https://github.com/pmndrs/jotai/pull/3293)). - -BREAKING CHANGE: - -Only jotai 2.20.0 and up is supported due to changes in their internal APIs. diff --git a/.changeset/sixty-sheep-fetch.md b/.changeset/sixty-sheep-fetch.md deleted file mode 100644 index e200fb0..0000000 --- a/.changeset/sixty-sheep-fetch.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'jotai-logger': major ---- - -Replace the mutation-based API with a derived-store API - -- The store is no longer mutated. Instead, `createLoggedStore` returns a **new** store that shares all internal state with the parent but intercepts `get`, `set` and `sub` for logging. -- On the React side, `AtomLoggerProvider` propagates the logged store to children via a Jotai ``, retrieving the parent store from context automatically. -- This approach aligns with Jotai's internal `INTERNAL_buildStoreRev2` API introduced in jotai v2.15 (see https://github.com/pmndrs/jotai/pull/3149). - -BREAKING CHANGE: - -A migration guide from v4 to v5 is present in the README. [See link](https://github.com/Wendystraite/jotai-logger#migration-guide). TLDR: - -- `useAtomsLogger` is replaced by `AtomLoggerProvider`, a Provider-like component that automatically picks up the nearest Jotai store from context and wraps children in a new logged store. -- `bindAtomsLoggerToStore` is replaced by `createLoggedStore` that creates and return a new store. -- `isAtomsLoggerBoundToStore` removed → use `isLoggedStore` -- `createLoggedStore` **throws** instead of returning `false` diff --git a/CHANGELOG.md b/CHANGELOG.md index cf0a034..1a5a466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,55 @@ # jotai-logger +## 5.0.0 + +### Major Changes + +- 4436d69: Split the package into vanilla/react/formatter entry points + - Split the core logger from its console formatter. + - The core handle only scheduling and filtering options and accepts a new `formatter` option. + - The new `consoleFormatter` factory creates the built in console formatter and accepts the old display options (`domain`, `logger`, `colorScheme`, etc.). + - Add the `formatter` option to `bindAtomsLoggerToStore` and `useAtomsLogger` to replace the default console output with any custom function. + + BREAKING CHANGE: + + Formatting options that were present in `bindAtomsLoggerToStore` and `useAtomsLogger` are now moved to the new `consoleFormatter` factory options. + + ```diff + - bindAtomsLoggerToStore(store, { stringifyLimit: 100 }); + + const loggedStore = createLoggedStore(store, { formatter: consoleFormatter({ stringifyLimit: 100 }) }); + ``` + +- 43291e2: Jotai 2.20 support + + Adds support for Jotai 2.20's new internal `INTERNAL_buildStoreRev3` API + (see [pmndrs/jotai#3293](https://github.com/pmndrs/jotai/pull/3293)). + + BREAKING CHANGE: + + Only jotai 2.20.0 and up is supported due to changes in their internal APIs. + +- 496b4e0: Replace the mutation-based API with a derived-store API + - The store is no longer mutated. Instead, `createLoggedStore` returns a **new** store that shares all internal state with the parent but intercepts `get`, `set` and `sub` for logging. + - On the React side, `AtomLoggerProvider` propagates the logged store to children via a Jotai ``, retrieving the parent store from context automatically. + - This approach aligns with Jotai's internal `INTERNAL_buildStoreRev2` API introduced in jotai v2.15 (see https://github.com/pmndrs/jotai/pull/3149). + + BREAKING CHANGE: + + A migration guide from v4 to v5 is present in the README. [See link](https://github.com/Wendystraite/jotai-logger#migration-guide). TLDR: + - `useAtomsLogger` is replaced by `AtomLoggerProvider`, a Provider-like component that automatically picks up the nearest Jotai store from context and wraps children in a new logged store. + - `bindAtomsLoggerToStore` is replaced by `createLoggedStore` that creates and return a new store. + - `isAtomsLoggerBoundToStore` removed → use `isLoggedStore` + - `createLoggedStore` **throws** instead of returning `false` + +### Minor Changes + +- 096fdc0: fix: retroactively set dependents and pendingPromises on initialized/mounted events + +### Patch Changes + +- ffa5442: fix: track dependencies that have the same name +- ff5a893: fix: don't add empty or undefined data to events + ## 4.0.0 ### Major Changes diff --git a/package.json b/package.json index ddf0d04..253db45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jotai-logger", - "version": "4.0.0", + "version": "5.0.0", "description": "Logging utility for jotai", "keywords": [ "jotai",