Skip to content

Releases: pmndrs/jotai

v1.3.7

01 Oct 14:13
Compare
Choose a tag to compare

Summary

v1.3.4-1.3.6 accidentally requires newer node.js versions. v1.3.7 fixes it by reverting exports format.
This also fixes handling async atoms with chained dependency, which solves some cases.

PRs

  • #734 refactor(utils): loadable util
  • #735 refactor(core): commitAtom in store
  • #747 fix(core): resume from suspense on derived atom with async atom dependency
  • #748 fix(package): avoid subpath pattern in exports

v1.3.6

24 Sep 13:31
Compare
Choose a tag to compare

⚠️ Minimum Node.js requirements (for server-side usage like Next.js): v14.13.0, v12.20.0

Summary

This fixes a false positive warning in some environments reported in #709. It also comes with some refactoring for more code maintainability.

PRs

  • #717 refactor(core,utils,devtools): add dev methods in store
  • #719 chore(build): pin esbuild for now and replace size plugin with github action
  • #727 refactor(core): interruptable promise implementation
  • #730 fix(core,utils): support unknown error type
  • #732 chore(build): upgrade and unpin esbuild and fix compressed size action

v1.3.5

17 Sep 09:58
Compare
Choose a tag to compare

⚠️ Minimum requirements for Node.js (for server-side usage like Next.js): v14.13.0, v12.20.0

Summary

v1.3.4 requires node >= 14 in package.json, which may cause some issues in certain envs. As we don't require it, this reverts back to node >= 12. This also adds babel preset in jotai/babel.

PRs

  • #706 feat(babel): Babel preset for Jotai
  • #710 refactor(utils,immer,optics): with memoizeAtom
  • #716 fix(build): Switch back to Node 12

v1.3.4

13 Sep 13:03
Compare
Choose a tag to compare

⚠️ Minimum Node.js requirements (for server-side usage like Next.js): v14.13.0, v12.20.0

Summary

jotai

  • Fix a bug that prevented to recover from async atom errors

jotai/utils

  • Add a new loadable util which allows to avoid using <Suspense>

jotai/babel

  • Add new "experimental" babel plugin to auto-attach .debugLabel to atom configs
    • Feedback is very welcomed.

PRs

  • #701 fix(core,query): handle edge cases with writeAtom returning a promise
  • #678 refactor: stricter tsconfig
  • #704 chore(build): simplify exports and support nested subpath
  • #705 fix(core): Allow retries for errored async reads
  • #698 feat(utils): Add loadable
  • #697 feat(babel): Babel plugin: debug-label

v1.3.3

09 Sep 14:37
Compare
Choose a tag to compare

Summary

jotai

Previously, writing atom returns always void, but this was troublesome when a derived atom has a custom write function which returns a promise. Now, it returns a promise if write returns a promise.

PRs

  • #687 refactor(core): re-implement useAtom with useReducer
  • #689 fix(core): return promise void on write atom and set

v1.3.2

27 Aug 14:39
Compare
Choose a tag to compare

Summary

There was an issue in v1.3.1 with regard to CJS/ESM exports. Please use v1.3.2 instead.

PRs

  • #679 Rollback to initial exports structures with duplicated .js and .mjs files for additional support of bundlers

v1.3.1

25 Aug 15:48
Compare
Choose a tag to compare

Summary

This changed the exports config to match with nodejs standard. If you experience some issues with your bundlers feel free to open issues to report them.

jotai/core

  • Some code refactoring was done, which also changed other jotai/* bundles accordingly.

jotai/query

  • Support enabled option (Previously, it wasn't working properly)
  • Support infinite query page refresh

jotai/urql

  • Support pause option
  • Support reexecute callback

PRs

  • #648 refactor: rename store to scope container
  • #650 refactor: new store.ts based on old vanilla.ts
  • #652 Fix(useAtomsSnapshot): Only use values in snapshots
  • #653 fix(query): improve initial data method
  • #654 refactor(core): remove duplicated code
  • #665 feat(query): enabled functionality
  • #655 fix(urql): support pause option
  • #670 feat(query): infinite query page refresh
  • #657 ESM/CJS Exports addition
  • #668 feat(urql): support reexecute in atomWithQuery

v1.3.0

10 Aug 10:03
Compare
Choose a tag to compare

Summary

jotai

We fixed atom scope feature. useAtom now takes optional scope in the second argument and atom.scope is deprecated. As it falls back to the previous behavior, the core is not breaking. (However, other jotai/* has breaking changes in atom scope handling.)

jotai/utils

  • New experimental useHydrateAtoms hook to restore atom values in render.
  • Fixed performance related issues for waitForAll and useAtomCallback.

PRs

  • #633 fix(weakCache): Replace recursion with while loop to avoid too much recursion
  • #646 refactor(core): useMutableSource emulation without symbol and any
  • #640 breaking: useAtom scope instead of atom scope
  • #637 Feature: useHydrateAtoms
  • #644 fix(utils): improve useAtomCallback performance

v1.2.2

21 Jul 11:55
Compare
Choose a tag to compare

Summary

v1.2.1 has an issue with TypeScript in jotai/utils, which is fixed.

PRs

  • #600 chore(parser): upgrade to the new JSX transform and removing unused react imports
  • #599 chore(utils): refactor atomWithObservable
  • #602 chore(imports): enforce a convention in module import order
  • #603 chore(examples, tests): remove React.FC from the TSX file
  • #606 chore(imports): update the imports declarations of type annotations and declarations to import type
  • #605 fix(utils): patch symbol type in atomWithObservable

v1.2.1

16 Jul 14:07
Compare
Choose a tag to compare

Summary

v1.2.0 introduced jotai/rxjs, but because atomWithObservable can be implemented library-agnostic, it's moved to jotai/utils. [BREAKING] jotai/rxjs bundle is removed.

PRs

  • #593 feat(rxjs): Convert atomWithObservable to Observable spec
  • #596 breaking(rxjs): move atomWithObservable in utils
  • #597 fix(utils): atomWithObservable type