Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a67310d
feat: split api between vanilla and react
Wendystraite May 1, 2026
eeec207
feat: split package into vanilla/react/formatter entry points
Wendystraite May 2, 2026
2dc0023
refactor: change dependencies tracking logic and its resulting event
Wendystraite May 2, 2026
fba7fa1
refactor: rename internal types that are now exposed to the formatter
Wendystraite May 2, 2026
aff210d
feat: replace mutation-based API with a derived-store API
Wendystraite May 3, 2026
496b4e0
docs(changeset): replace mutation-based API with a derived-store API
Wendystraite May 3, 2026
4436d69
docs(changeset): split package into vanilla/react/formatter entry points
Wendystraite May 3, 2026
62c24f7
feat: jotai 2.20 support
Wendystraite May 3, 2026
43291e2
docs(changeset): jotai 2.20 support
Wendystraite May 3, 2026
62082f6
refactor: convert to Set pending promises and dependents atoms to hav…
Wendystraite May 6, 2026
1aa6397
fixup: feat: replace mutation-based API with a derived-store API
Wendystraite May 6, 2026
21974ea
refactor: use internal building blocks functions instead of storing r…
Wendystraite May 6, 2026
ff2001b
refactor: pass store and building blocks to internal functions instea…
Wendystraite May 6, 2026
ccff37e
refactor: do not mutate the new store at all, only the store options …
Wendystraite May 7, 2026
0a1b791
fix: track dependencies that have the same name
Wendystraite May 7, 2026
ffa5442
docs(changeset): fix: track dependencies that have the same name
Wendystraite May 7, 2026
b12a8d2
doc: add section in README for changing options at runtime
Wendystraite May 7, 2026
7e33ac5
refactor: do not use parent store building blocks outside of createLo…
Wendystraite May 7, 2026
2ec4599
refactor: move dependencies tracking logic inside storeHooks.i instea…
Wendystraite May 7, 2026
039dc7d
refactor: remove an extra object created on every store.sub
Wendystraite May 7, 2026
4afee77
refactor: move merge of changed events logic to console formatter
Wendystraite May 7, 2026
5d7cc40
fix: set old value of atom change event to required
Wendystraite May 7, 2026
6f42086
doc: document store functions
Wendystraite May 7, 2026
6d810dd
fix: does not expose the logger state function
Wendystraite May 7, 2026
b24ac67
ci: setup pkg-pr-new
Wendystraite May 7, 2026
a5c7876
fix: don't add empty or undefined data to events
Wendystraite May 8, 2026
ff5a893
docs(changeset): fix: don't add empty or undefined data to events
Wendystraite May 8, 2026
5cfb5ce
doc: explain why the transaction atom can be undefined
Wendystraite May 8, 2026
3f79334
test: add formatter test for all event types
Wendystraite May 8, 2026
d70f059
test: split and reorganize test files
Wendystraite May 8, 2026
169bd52
test: add tests on multiple store compositions
Wendystraite May 8, 2026
cb05089
fix: retroactively set dependents and pendingPromises on initialized/…
Wendystraite May 8, 2026
096fdc0
docs(changeset): fix: retroactively set dependents and pendingPromise…
Wendystraite May 8, 2026
41241a2
doc: add a complete example of a custom formatter using logtape and a…
Wendystraite May 8, 2026
39b9bf0
perf: update benchmarks with empty and console formatters
Wendystraite May 8, 2026
39f16ca
perf: update benchmarks to match the new jotai benchmarks
Wendystraite May 8, 2026
4e2d4ff
chore: update jotai-devtools to 0.14.0
Wendystraite May 8, 2026
c71a205
fix: do not export the logger's state type
Wendystraite May 9, 2026
b76a7e1
doc: add titles in readme for better outline
Wendystraite May 9, 2026
d363290
doc: update changesets
Wendystraite May 9, 2026
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: 5 additions & 0 deletions .changeset/many-poems-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'jotai-logger': minor
---

fix: retroactively set dependents and pendingPromises on initialized/mounted events
19 changes: 19 additions & 0 deletions .changeset/neat-pens-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'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 }) });
```
5 changes: 5 additions & 0 deletions .changeset/olive-toes-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'jotai-logger': patch
---

fix: track dependencies that have the same name
5 changes: 5 additions & 0 deletions .changeset/pretty-signs-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'jotai-logger': patch
---

fix: don't add empty or undefined data to events
12 changes: 12 additions & 0 deletions .changeset/real-cars-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'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.
18 changes: 18 additions & 0 deletions .changeset/sixty-sheep-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'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 `<Provider>`, 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`
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ jobs:
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

- run: pnpm exec pkg-pr-new publish --commentWithSha
Loading
Loading