Releases: vercel/swr
Releases Β· vercel/swr
v2.3.0
Feature
- Support promises as fallback data by @shuding in #2891
- Allow to use with React 19 by @vladshcherbin and @devjiwonchoi in #3047, #2963
Patches
- fix #3030 and run relateive test in edge-runtime by @promer94 in #3036
- fix: Only suspend when using the
fallback
by @shuding in #3045 - fix type check in tests by @huozhi in #3052
- fix: Replace the deprecated 'window' with 'globalThis' for Deno by @saul-atomrigs in #2915
- fix: check if config.fallback is undefined by @taku-hatano in #2913
- fix(infinte): export SWRInfiniteKeyedMutator type by @LeoMcA in #2900
- fix: Improve comparison performance by @shuding in #2973
- Export ScopedMutator type by @joshkel in #2937
- Improve-Type-Safety-and-State-Access-in-useStateWithDeps-Hook by @O-BERNARDOFOEGBU in #3027
Misc
- chore: bump dev deps and change example react version to latest by @huozhi in #2894
- build: fix beta release job by @huozhi in #2895
- chore: Improve test coverage by @shuding in #2903
- chore: simplify test coverage strategy by @huozhi in #2909
- build: simplify react-server export and update bundler by @huozhi in #2897
- examples: add RSC streaming pre-render with promise fallback example by @promer94 in #2905
- Drop client-only by @huozhi in #2910
- Mark package as side-effect free by @htunnicliff in #2904
- Drop exports module field by @huozhi in #2911
- chore: update pkg script watch by @unliar in #2920
- test: remove console.error times check by @promer94 in #2918
- build: bump bundler for perf by @huozhi in #2929
- Fix bundling of client entry chunks by @huozhi in #2932
- ci: fix ci error and upgrade action version by @promer94 in #2952
- Add SWRInfiniteMutatorOptions type to export by @ludwigbacklund in #2954
- test: update the revalidate function test for useSWRInfinite by @koba04 in #2955
- chore: upgrade nextjs dev dep for e2e testing by @huozhi in #3044
- ci: simplify ci config and bump some deps version by @promer94 in #2770
- chore: reorganize entries by @huozhi in #3048
- Bump bundler and reorganize serialize exports by @huozhi in #3049
- upgrade use-sync-external-store to support react 19 by @huozhi in #3050
New Contributors
- @htunnicliff made their first contribution in #2904
- @saul-atomrigs made their first contribution in #2915
- @unliar made their first contribution in #2920
- @ludwigbacklund made their first contribution in #2954
- @taku-hatano made their first contribution in #2913
- @LeoMcA made their first contribution in #2900
- @devjiwonchoi made their first contribution in #2963
- @vladshcherbin made their first contribution in #3047
- @O-BERNARDOFOEGBU made their first contribution in #3027
Full Changelog: v2.2.5...v2.3.0
v2.2.6-beta.4
What's Changed
Full Changelog: v2.2.6-beta.3...v2.2.6-beta.4
v2.2.6-beta.3
What's Changed
- ci: fix ci error and upgrade action version by @promer94 in #2952
- Add SWRInfiniteMutatorOptions type to export by @ludwigbacklund in #2954
- test: update the revalidate function test for useSWRInfinite by @koba04 in #2955
- Export ScopedMutator type by @joshkel in #2937
- fix: check if config.fallback is undefined by @taku-hatano in #2913
- fix(infinte): export SWRInfiniteKeyedMutator type by @LeoMcA in #2900
- chore: add react peerDeps 19 by @devjiwonchoi in #2963
New Contributors
- @ludwigbacklund made their first contribution in #2954
- @taku-hatano made their first contribution in #2913
- @LeoMcA made their first contribution in #2900
- @devjiwonchoi made their first contribution in #2963
Full Changelog: v2.2.6-beta.2...v2.2.6-beta.3
v2.2.6-beta.2
Patches
- build: bump bundler for perf by @huozhi in #2929
- Fix bundling of client entry chunks by @huozhi in #2932
Full Changelog: v2.2.6-beta.1...v2.2.6-beta.2
v2.2.6-beta.1
What's Changed
- build: fix beta release job by @huozhi in #2895
- chore: Improve test coverage by @shuding in #2903
- chore: simplify test coverage strategy by @huozhi in #2909
- build: simplify react-server export and update bundler by @huozhi in #2897
- examples: add RSC streaming pre-render with promise fallback example by @promer94 in #2905
- Drop client-only by @huozhi in #2910
- Mark package as side-effect free by @htunnicliff in #2904
- Drop exports module field by @huozhi in #2911
- fix: Replace the deprecated 'window' with 'globalThis' for Deno by @saul-atomrigs in #2915
- chore: update pkg script watch by @unliar in #2920
- test: remove console.error times check by @promer94 in #2918
New Contributors
- @htunnicliff made their first contribution in #2904
- @saul-atomrigs made their first contribution in #2915
- @unliar made their first contribution in #2920
Full Changelog: v2.2.6-beta.0...v2.2.6-beta.1
v2.2.5
Patches
- types: isLoading typed as boolean when using fallbackData (#2866) by @yjrhgvbn in #2875
- fix: allow onErrorRetry on inactive tab without focus/reconnect revalidation by @qkdreyer in #2848
- feat: pass a function to the revalidate option in mutate by @koba04 in #2862
- fix: SWRConfiguration type by @hulla-dev in #2882
Misc
- build: use new bundle convention by @huozhi in #2865
- chore: update pnpm-lock.yaml by @koba04 in #2874
- chore: remove useless comment by @kongmoumou in #2868
- test: run pnpm test on CI by @koba04 in #2872
- fix: all act warnings by @koba04 in #2861
- Update bundler by @huozhi in #2830
New Contributors
- @kongmoumou made their first contribution in #2868
- @yjrhgvbn made their first contribution in #2875
- @qkdreyer made their first contribution in #2848
- @hulla-dev made their first contribution in #2882
Full Changelog: v2.2.4...v2.2.5
v2.2.4
v2.2.3
Patches
- fix: remove permissive type by @wcatron in #2759
- Remove
index.js
suffix ofuse-sync-external-store/shim
to support React Native by @malash in #2767 - fix: default to fetch type in keyed mutator by @linkvt in #2753
- types: export mutation types by @promer94 in #2780
Misc
New Contributors
- @wcatron made their first contribution in #2759
- @malash made their first contribution in #2767
- @linkvt made their first contribution in #2753
Full Changelog: v2.2.2...v2.2.3
v2.2.2
What's Changed
- fix: It should use startTransition only when IS_REACT_LEGACY is false by @TopGrd in #2756
- fix: simplify
ArgumentsTuple
by @Andarist in #2761
New Contributors
Full Changelog: v2.2.1...v2.2.2
v2.2.1
What's Changed
- Add use client directive for client components exports by @huozhi in #2696
- remove the 'use client' directive and add client-only to useSWR entry. by @promer94 in #2705
- fix: should serialize subscription fn key by @promer94 in #2711
- build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #2720
- fix: only make data and error update as a non-blocking transition by @promer94 in #2691
- build: generate d.mts for for .mjs, so typescript could resolve types correctly by @promer94 in #2695
- fix(infinite): Fix the ability to use preload along with useSWRInfinite by @agadzik in #2723
- fix: Ensure that using preload with useSWRInfinite returns back an array of data by @agadzik in #2726
- fix: preload request should be consumed within
revalidate
to supportparallel
option by @promer94 in #2727 - Fix the issue that useSWR revalidation isn't triggered if the useSWR call happens after mutation by @Ponyets in #2731
- fix(mutate): fix types of mutate/trigger; make mutate/trigger always return the result of fetcher by @Ponyets in #2708
- build(deps-dev): bump tough-cookie from 4.1.2 to 4.1.3 by @dependabot in #2735
- build(deps-dev): bump json5 from 2.2.1 to 2.2.3 by @dependabot in #2736
- docs: use isLoading instead of !data by @pawfa in #2734
New Contributors
- @agadzik made their first contribution in #2723
- @Ponyets made their first contribution in #2731
- @pawfa made their first contribution in #2734
Full Changelog: v2.2.0...v2.2.1