devsoc-unsw / freerooms

A web application designed to aid UNSW students in finding vacant rooms.
https://freerooms.devsoc.app/
Other
18 stars 1 forks source link

fix(deps): update dependency swr to v2 #395

Closed renovate[bot] closed 3 months ago

renovate[bot] commented 11 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
swr (source) ^1.3.0 -> ^2.0.0 age adoption passing confidence

Release Notes

vercel/swr (swr) ### [`v2.2.5`](https://togithub.com/vercel/swr/releases/tag/v2.2.5) [Compare Source](https://togithub.com/vercel/swr/compare/v2.2.4...v2.2.5) #### Patches - types: isLoading typed as boolean when using fallbackData ([#​2866](https://togithub.com/vercel/swr/issues/2866)) by [@​yjrhgvbn](https://togithub.com/yjrhgvbn) in [https://github.com/vercel/swr/pull/2875](https://togithub.com/vercel/swr/pull/2875) - fix: allow onErrorRetry on inactive tab without focus/reconnect revalidation by [@​qkdreyer](https://togithub.com/qkdreyer) in [https://github.com/vercel/swr/pull/2848](https://togithub.com/vercel/swr/pull/2848) - feat: pass a function to the revalidate option in mutate by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2862](https://togithub.com/vercel/swr/pull/2862) - fix: SWRConfiguration type by [@​hulla-dev](https://togithub.com/hulla-dev) in [https://github.com/vercel/swr/pull/2882](https://togithub.com/vercel/swr/pull/2882) #### Misc - build: use new bundle convention by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2865](https://togithub.com/vercel/swr/pull/2865) - chore: update pnpm-lock.yaml by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2874](https://togithub.com/vercel/swr/pull/2874) - chore: remove useless comment by [@​kongmoumou](https://togithub.com/kongmoumou) in [https://github.com/vercel/swr/pull/2868](https://togithub.com/vercel/swr/pull/2868) - test: run pnpm test on CI by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2872](https://togithub.com/vercel/swr/pull/2872) - fix: all act warnings by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2861](https://togithub.com/vercel/swr/pull/2861) - Update bundler by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2830](https://togithub.com/vercel/swr/pull/2830) #### New Contributors - [@​kongmoumou](https://togithub.com/kongmoumou) made their first contribution in [https://github.com/vercel/swr/pull/2868](https://togithub.com/vercel/swr/pull/2868) - [@​yjrhgvbn](https://togithub.com/yjrhgvbn) made their first contribution in [https://github.com/vercel/swr/pull/2875](https://togithub.com/vercel/swr/pull/2875) - [@​qkdreyer](https://togithub.com/qkdreyer) made their first contribution in [https://github.com/vercel/swr/pull/2848](https://togithub.com/vercel/swr/pull/2848) - [@​hulla-dev](https://togithub.com/hulla-dev) made their first contribution in [https://github.com/vercel/swr/pull/2882](https://togithub.com/vercel/swr/pull/2882) **Full Changelog**: https://github.com/vercel/swr/compare/v2.2.4...v2.2.5 ### [`v2.2.4`](https://togithub.com/vercel/swr/releases/tag/v2.2.4) [Compare Source](https://togithub.com/vercel/swr/compare/v2.2.3...v2.2.4) ##### Patches - Revert "Remove `index.js` suffix of `use-sync-external-store/shim` to support React Native" by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2802](https://togithub.com/vercel/swr/pull/2802) **Full Changelog**: https://github.com/vercel/swr/compare/v2.2.3...v2.2.4 ### [`v2.2.3`](https://togithub.com/vercel/swr/releases/tag/v2.2.3) [Compare Source](https://togithub.com/vercel/swr/compare/v2.2.2...v2.2.3) ##### Patches - fix: remove permissive type by [@​wcatron](https://togithub.com/wcatron) in [https://github.com/vercel/swr/pull/2759](https://togithub.com/vercel/swr/pull/2759) - Remove `index.js` suffix of `use-sync-external-store/shim` to support React Native by [@​malash](https://togithub.com/malash) in [https://github.com/vercel/swr/pull/2767](https://togithub.com/vercel/swr/pull/2767) - fix: default to fetch type in keyed mutator by [@​linkvt](https://togithub.com/linkvt) in [https://github.com/vercel/swr/pull/2753](https://togithub.com/vercel/swr/pull/2753) - types: export mutation types by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2780](https://togithub.com/vercel/swr/pull/2780) ##### Misc - test: update tests, use matched types for mutate api by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2781](https://togithub.com/vercel/swr/pull/2781) ##### New Contributors - [@​wcatron](https://togithub.com/wcatron) made their first contribution in [https://github.com/vercel/swr/pull/2759](https://togithub.com/vercel/swr/pull/2759) - [@​malash](https://togithub.com/malash) made their first contribution in [https://github.com/vercel/swr/pull/2767](https://togithub.com/vercel/swr/pull/2767) - [@​linkvt](https://togithub.com/linkvt) made their first contribution in [https://github.com/vercel/swr/pull/2753](https://togithub.com/vercel/swr/pull/2753) **Full Changelog**: https://github.com/vercel/swr/compare/v2.2.2...v2.2.3 ### [`v2.2.2`](https://togithub.com/vercel/swr/releases/tag/v2.2.2) [Compare Source](https://togithub.com/vercel/swr/compare/v2.2.1...v2.2.2) #### What's Changed - fix: It should use startTransition only when IS_REACT_LEGACY is false by [@​TopGrd](https://togithub.com/TopGrd) in [https://github.com/vercel/swr/pull/2756](https://togithub.com/vercel/swr/pull/2756) - fix: simplify `ArgumentsTuple` by [@​Andarist](https://togithub.com/Andarist) in [https://github.com/vercel/swr/pull/2761](https://togithub.com/vercel/swr/pull/2761) #### New Contributors - [@​TopGrd](https://togithub.com/TopGrd) made their first contribution in [https://github.com/vercel/swr/pull/2756](https://togithub.com/vercel/swr/pull/2756) - [@​Andarist](https://togithub.com/Andarist) made their first contribution in [https://github.com/vercel/swr/pull/2761](https://togithub.com/vercel/swr/pull/2761) **Full Changelog**: https://github.com/vercel/swr/compare/v2.2.1...v2.2.2 ### [`v2.2.1`](https://togithub.com/vercel/swr/releases/tag/v2.2.1) [Compare Source](https://togithub.com/vercel/swr/compare/v2.2.0...v2.2.1) #### What's Changed - Add use client directive for client components exports by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2696](https://togithub.com/vercel/swr/pull/2696) - remove the 'use client' directive and add client-only to useSWR entry. by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2705](https://togithub.com/vercel/swr/pull/2705) - fix: should serialize subscription fn key by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2711](https://togithub.com/vercel/swr/pull/2711) - build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/vercel/swr/pull/2720](https://togithub.com/vercel/swr/pull/2720) - fix: only make data and error update as a non-blocking transition by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2691](https://togithub.com/vercel/swr/pull/2691) - build: generate d.mts for for .mjs, so typescript could resolve types correctly by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2695](https://togithub.com/vercel/swr/pull/2695) - fix(infinite): Fix the ability to use preload along with useSWRInfinite by [@​agadzik](https://togithub.com/agadzik) in [https://github.com/vercel/swr/pull/2723](https://togithub.com/vercel/swr/pull/2723) - fix: Ensure that using preload with useSWRInfinite returns back an array of data by [@​agadzik](https://togithub.com/agadzik) in [https://github.com/vercel/swr/pull/2726](https://togithub.com/vercel/swr/pull/2726) - fix: preload request should be consumed within `revalidate` to support `parallel` option by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2727](https://togithub.com/vercel/swr/pull/2727) - Fix the issue that useSWR revalidation isn't triggered if the useSWR call happens after mutation by [@​Ponyets](https://togithub.com/Ponyets) in [https://github.com/vercel/swr/pull/2731](https://togithub.com/vercel/swr/pull/2731) - fix(mutate): fix types of mutate/trigger; make mutate/trigger always return the result of fetcher by [@​Ponyets](https://togithub.com/Ponyets) in [https://github.com/vercel/swr/pull/2708](https://togithub.com/vercel/swr/pull/2708) - build(deps-dev): bump tough-cookie from 4.1.2 to 4.1.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/vercel/swr/pull/2735](https://togithub.com/vercel/swr/pull/2735) - build(deps-dev): bump json5 from 2.2.1 to 2.2.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/vercel/swr/pull/2736](https://togithub.com/vercel/swr/pull/2736) - docs: use isLoading instead of !data by [@​pawfa](https://togithub.com/pawfa) in [https://github.com/vercel/swr/pull/2734](https://togithub.com/vercel/swr/pull/2734) #### New Contributors - [@​agadzik](https://togithub.com/agadzik) made their first contribution in [https://github.com/vercel/swr/pull/2723](https://togithub.com/vercel/swr/pull/2723) - [@​Ponyets](https://togithub.com/Ponyets) made their first contribution in [https://github.com/vercel/swr/pull/2731](https://togithub.com/vercel/swr/pull/2731) - [@​pawfa](https://togithub.com/pawfa) made their first contribution in [https://github.com/vercel/swr/pull/2734](https://togithub.com/vercel/swr/pull/2734) **Full Changelog**: https://github.com/vercel/swr/compare/v2.2.0...v2.2.1 ### [`v2.2.0`](https://togithub.com/vercel/swr/releases/tag/v2.2.0) [Compare Source](https://togithub.com/vercel/swr/compare/v2.1.5...v2.2.0) #### What's Changed - feat: use `React.use` API by [@​himself65](https://togithub.com/himself65) in [https://github.com/vercel/swr/pull/2596](https://togithub.com/vercel/swr/pull/2596) - feat: improve preload and suspense integration by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2658](https://togithub.com/vercel/swr/pull/2658) - feat: Add react-server bundle for core and infinite by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2664](https://togithub.com/vercel/swr/pull/2664) - fix: remove `startTransition` so mutation hook could update immediately by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2654](https://togithub.com/vercel/swr/pull/2654) - fix: keepPreviousData should also work in suspense by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2649](https://togithub.com/vercel/swr/pull/2649) - fix: do unsubscribe synchronously by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2648](https://togithub.com/vercel/swr/pull/2648) - fix: reset the error when mutate succeeded by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2592](https://togithub.com/vercel/swr/pull/2592) - fix: Fix mutation types order by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2669](https://togithub.com/vercel/swr/pull/2669) - fix: Conditional Typing in useSWRMutation to Allow Optional ExtraArg Without Explicitly Passing Undefined by [@​saengmotmi](https://togithub.com/saengmotmi) in [https://github.com/vercel/swr/pull/2666](https://togithub.com/vercel/swr/pull/2666) - fix: Pass displayed data as second parameter of functional optimistic data by [@​francescogior](https://togithub.com/francescogior) in [https://github.com/vercel/swr/pull/2668](https://togithub.com/vercel/swr/pull/2668) - fix: Adjust rsc exports by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2673](https://togithub.com/vercel/swr/pull/2673) - fix: Revert "fix: remove startTransition so mutation hook could update immediately ([#​2654](https://togithub.com/vercel/swr/issues/2654))" by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2681](https://togithub.com/vercel/swr/pull/2681) - types: fix immutable export paths by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2670](https://togithub.com/vercel/swr/pull/2670) - types: improve `useSWRMutation` type. by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2604](https://togithub.com/vercel/swr/pull/2604) - chore: upgrade to pnpm8 by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2605](https://togithub.com/vercel/swr/pull/2605) - ci: drop unused inputs and step by [@​nicolewhite](https://togithub.com/nicolewhite) in [https://github.com/vercel/swr/pull/2624](https://togithub.com/vercel/swr/pull/2624) - ci: update github token by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2636](https://togithub.com/vercel/swr/pull/2636) - ci: use gh token credentials for cloning repo by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2637](https://togithub.com/vercel/swr/pull/2637) - ci: use script to bump semver version by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2651](https://togithub.com/vercel/swr/pull/2651) - ci: Add daily test job for react canary by [@​suyanhanx](https://togithub.com/suyanhanx) in [https://github.com/vercel/swr/pull/2601](https://togithub.com/vercel/swr/pull/2601) - build: fix equal signs by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2628](https://togithub.com/vercel/swr/pull/2628) - build: fix bad runner by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2629](https://togithub.com/vercel/swr/pull/2629) - build: use prepatch/minor/major command for prerelease by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2627](https://togithub.com/vercel/swr/pull/2627) - build: fix release semver by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2630](https://togithub.com/vercel/swr/pull/2630) - build: add trigger release job by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2615](https://togithub.com/vercel/swr/pull/2615) - build: determin release tag by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2616](https://togithub.com/vercel/swr/pull/2616) - build: fix conflict types for index and index.react-server by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2677](https://togithub.com/vercel/swr/pull/2677) - test: fix flaky suspense test in canary by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2655](https://togithub.com/vercel/swr/pull/2655) - test: improve preload test by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2657](https://togithub.com/vercel/swr/pull/2657) - test: add e2e test for react-server entry by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2671](https://togithub.com/vercel/swr/pull/2671) - test: add a new test setting to run tests with build files by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2583](https://togithub.com/vercel/swr/pull/2583) #### New Contributors - [@​suyanhanx](https://togithub.com/suyanhanx) made their first contribution in [https://github.com/vercel/swr/pull/2601](https://togithub.com/vercel/swr/pull/2601) - [@​nicolewhite](https://togithub.com/nicolewhite) made their first contribution in [https://github.com/vercel/swr/pull/2624](https://togithub.com/vercel/swr/pull/2624) - [@​saengmotmi](https://togithub.com/saengmotmi) made their first contribution in [https://github.com/vercel/swr/pull/2666](https://togithub.com/vercel/swr/pull/2666) - [@​francescogior](https://togithub.com/francescogior) made their first contribution in [https://github.com/vercel/swr/pull/2668](https://togithub.com/vercel/swr/pull/2668) **Full Changelog**: https://github.com/vercel/swr/compare/v2.1.5...v2.2.0 ### [`v2.1.5`](https://togithub.com/vercel/swr/releases/tag/v2.1.5) [Compare Source](https://togithub.com/vercel/swr/compare/v2.1.4...v2.1.5) #### What's Changed - fix: missing interop helpers in bundle by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2582](https://togithub.com/vercel/swr/pull/2582) **Full Changelog**: https://github.com/vercel/swr/compare/v2.1.4...v2.1.5 ### [`v2.1.4`](https://togithub.com/vercel/swr/releases/tag/v2.1.4) [Compare Source](https://togithub.com/vercel/swr/compare/v2.1.3...v2.1.4) #### What's Changed - Upgrade bundler by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2557](https://togithub.com/vercel/swr/pull/2557) - examples: fix invalid links by [@​fxOne](https://togithub.com/fxOne) in [https://github.com/vercel/swr/pull/2559](https://togithub.com/vercel/swr/pull/2559) - types: Allow auto-import by improving generated types by [@​oosawy](https://togithub.com/oosawy) in [https://github.com/vercel/swr/pull/2563](https://togithub.com/vercel/swr/pull/2563) - fix: pass serialized args to preload fetcher by [@​oosawy](https://togithub.com/oosawy) in [https://github.com/vercel/swr/pull/2564](https://togithub.com/vercel/swr/pull/2564) - chore: use provenance for release by [@​HerringtonDarkholme](https://togithub.com/HerringtonDarkholme) in [https://github.com/vercel/swr/pull/2571](https://togithub.com/vercel/swr/pull/2571) - deps: update [@​testing-library/react](https://togithub.com/testing-library/react) to v14 by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2578](https://togithub.com/vercel/swr/pull/2578) - fix: Fix dependency tracking and useSES bug by [@​shuding](https://togithub.com/shuding) and [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2576](https://togithub.com/vercel/swr/pull/2576) #### New Contributors - [@​fxOne](https://togithub.com/fxOne) made their first contribution in [https://github.com/vercel/swr/pull/2559](https://togithub.com/vercel/swr/pull/2559) - [@​oosawy](https://togithub.com/oosawy) made their first contribution in [https://github.com/vercel/swr/pull/2563](https://togithub.com/vercel/swr/pull/2563) - [@​HerringtonDarkholme](https://togithub.com/HerringtonDarkholme) made their first contribution in [https://github.com/vercel/swr/pull/2571](https://togithub.com/vercel/swr/pull/2571) **Full Changelog**: https://github.com/vercel/swr/compare/v2.1.3...v2.1.4 ### [`v2.1.3`](https://togithub.com/vercel/swr/releases/tag/v2.1.3) [Compare Source](https://togithub.com/vercel/swr/compare/v2.1.2...v2.1.3) #### What's Changed - Fix [#​2548](https://togithub.com/vercel/swr/issues/2548): pass origin key to subcription callback by [@​Zheaoli](https://togithub.com/Zheaoli) in [https://github.com/vercel/swr/pull/2550](https://togithub.com/vercel/swr/pull/2550) - Examples: fix type in axios-typescript example by [@​daochouwangu](https://togithub.com/daochouwangu) in [https://github.com/vercel/swr/pull/2552](https://togithub.com/vercel/swr/pull/2552) - Update Cache Interface types by [@​dmmulroy](https://togithub.com/dmmulroy) in [https://github.com/vercel/swr/pull/2554](https://togithub.com/vercel/swr/pull/2554) - fix: data passed to refreshInterval function is not latest by [@​hong24](https://togithub.com/hong24) in [https://github.com/vercel/swr/pull/2354](https://togithub.com/vercel/swr/pull/2354) - types: allow passing function as `Data` for `useSWRSubscriptionOptions` by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2551](https://togithub.com/vercel/swr/pull/2551) #### New Contributors - [@​Zheaoli](https://togithub.com/Zheaoli) made their first contribution in [https://github.com/vercel/swr/pull/2550](https://togithub.com/vercel/swr/pull/2550) - [@​daochouwangu](https://togithub.com/daochouwangu) made their first contribution in [https://github.com/vercel/swr/pull/2552](https://togithub.com/vercel/swr/pull/2552) - [@​dmmulroy](https://togithub.com/dmmulroy) made their first contribution in [https://github.com/vercel/swr/pull/2554](https://togithub.com/vercel/swr/pull/2554) **Full Changelog**: https://github.com/vercel/swr/compare/v2.1.2...v2.1.3 ### [`v2.1.2`](https://togithub.com/vercel/swr/releases/tag/v2.1.2) [Compare Source](https://togithub.com/vercel/swr/compare/v2.1.1...v2.1.2) ##### Patches - Improved type inferring for `swr/subscription` - Adding `SWRSubscriptionOptions` type for `swr/subscription` ##### Changes - test: add typing test for empty config by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2521](https://togithub.com/vercel/swr/pull/2521) - test: fix syntax error in Equal type alias implementation by [@​SACHINnANYAKKARA](https://togithub.com/SACHINnANYAKKARA) in [https://github.com/vercel/swr/pull/2517](https://togithub.com/vercel/swr/pull/2517) - chore: remove engines by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2536](https://togithub.com/vercel/swr/pull/2536) - types: improve `useSWRSubscription` types by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2535](https://togithub.com/vercel/swr/pull/2535) - Rename subscription types by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2537](https://togithub.com/vercel/swr/pull/2537) ##### New Contributors - [@​SACHINnANYAKKARA](https://togithub.com/SACHINnANYAKKARA) made their first contribution in [https://github.com/vercel/swr/pull/2517](https://togithub.com/vercel/swr/pull/2517) **Full Changelog**: https://github.com/vercel/swr/compare/v2.1.1...v2.1.2 ### [`v2.1.1`](https://togithub.com/vercel/swr/releases/tag/v2.1.1) [Compare Source](https://togithub.com/vercel/swr/compare/v2.1.0...v2.1.1) #### Patches - refactor: remove useless dataRef, always compare cached data by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2431](https://togithub.com/vercel/swr/pull/2431) - fix: swr infers incorrect `data` type for default `SWRConfig` generic type by [@​connorch](https://togithub.com/connorch) in [https://github.com/vercel/swr/pull/2506](https://togithub.com/vercel/swr/pull/2506) #### Documentation - docs: update subscription example by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2499](https://togithub.com/vercel/swr/pull/2499) #### New Contributors - [@​connorch](https://togithub.com/connorch) made their first contribution in [https://github.com/vercel/swr/pull/2506](https://togithub.com/vercel/swr/pull/2506) **Full Changelog**: https://github.com/vercel/swr/compare/v2.1.0...v2.1.1 ### [`v2.1.0`](https://togithub.com/vercel/swr/compare/v2.0.4...v2.1.0) [Compare Source](https://togithub.com/vercel/swr/compare/v2.0.4...v2.1.0) ### [`v2.0.4`](https://togithub.com/vercel/swr/releases/tag/v2.0.4) [Compare Source](https://togithub.com/vercel/swr/compare/v2.0.3...v2.0.4) ##### Patches - build: fix release job condition by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2392](https://togithub.com/vercel/swr/pull/2392) - types: fix some mutation type issue by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2421](https://togithub.com/vercel/swr/pull/2421) - fix: Error retry should be handled by global revalidator instead of local revalidation function by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2415](https://togithub.com/vercel/swr/pull/2415) - fix: ensure initCache setter function stays within bounds of subscriptions by [@​lfbergee](https://togithub.com/lfbergee) in [https://github.com/vercel/swr/pull/2411](https://togithub.com/vercel/swr/pull/2411) ##### Misc - test: stream ssr e2e by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2395](https://togithub.com/vercel/swr/pull/2395) - test: fix an act warning by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2403](https://togithub.com/vercel/swr/pull/2403) ##### New Contributors - [@​lfbergee](https://togithub.com/lfbergee) made their first contribution in [https://github.com/vercel/swr/pull/2411](https://togithub.com/vercel/swr/pull/2411) **Full Changelog**: https://github.com/vercel/swr/compare/v2.0.3...v2.0.4 ### [`v2.0.3`](https://togithub.com/vercel/swr/releases/tag/v2.0.3) [Compare Source](https://togithub.com/vercel/swr/compare/v2.0.2...v2.0.3) #### Patches - fix: parameters passed to subscribe is inconsistent with its declaration by [@​hong24](https://togithub.com/hong24) in [https://github.com/vercel/swr/pull/2353](https://togithub.com/vercel/swr/pull/2353) - fix: when inifinite key changes, should use cached pagesize instead of initialSize by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2386](https://togithub.com/vercel/swr/pull/2386) - fix: make compare function only compare data ([#​2375](https://togithub.com/vercel/swr/issues/2375)) by [@​Retrospection](https://togithub.com/Retrospection) and [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2387](https://togithub.com/vercel/swr/pull/2387) [https://github.com/vercel/swr/pull/2389](https://togithub.com/vercel/swr/pull/2389) - fix: initial loading state should be false with revalidation is disabed by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2382](https://togithub.com/vercel/swr/pull/2382) - fix: Ensure hydration matches the SSR result during streaming by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/2391](https://togithub.com/vercel/swr/pull/2391) #### Chores - ci: only run release when tags pushed by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2388](https://togithub.com/vercel/swr/pull/2388) - unify `-` characters in README.md by [@​JanKaifer](https://togithub.com/JanKaifer) in [https://github.com/vercel/swr/pull/2334](https://togithub.com/vercel/swr/pull/2334) #### New Contributors - [@​hong24](https://togithub.com/hong24) made their first contribution in [https://github.com/vercel/swr/pull/2353](https://togithub.com/vercel/swr/pull/2353) - [@​Retrospection](https://togithub.com/Retrospection) made their first contribution in [https://github.com/vercel/swr/pull/2387](https://togithub.com/vercel/swr/pull/2387) - [@​JanKaifer](https://togithub.com/JanKaifer) made their first contribution in [https://github.com/vercel/swr/pull/2334](https://togithub.com/vercel/swr/pull/2334) **Full Changelog**: https://github.com/vercel/swr/compare/v2.0.2...v2.0.3 ### [`v2.0.2`](https://togithub.com/vercel/swr/releases/tag/v2.0.2) [Compare Source](https://togithub.com/vercel/swr/compare/v2.0.1...v2.0.2) #### Patches - fix: delay revalidation if a key is already active and has error by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2338](https://togithub.com/vercel/swr/pull/2338) - fix: createCacheHelper type by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2365](https://togithub.com/vercel/swr/pull/2365) #### Chores - release workflow by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2374](https://togithub.com/vercel/swr/pull/2374), [https://github.com/vercel/swr/pull/2381](https://togithub.com/vercel/swr/pull/2381), [https://github.com/vercel/swr/pull/2383](https://togithub.com/vercel/swr/pull/2383), [https://github.com/vercel/swr/pull/2384](https://togithub.com/vercel/swr/pull/2384), [https://github.com/vercel/swr/pull/2385](https://togithub.com/vercel/swr/pull/2385) **Full Changelog**: https://github.com/vercel/swr/compare/v2.0.1...v2.0.2 ### [`v2.0.1`](https://togithub.com/vercel/swr/releases/tag/v2.0.1) [Compare Source](https://togithub.com/vercel/swr/compare/2.0.0...v2.0.1) In this patch release, we majorly improved typing support and SWR can infer the types based on the configuration. - When the `suspense` option is `true`, the returned `data` will exclude `undefined` and the `isLoading` will always be `false`. - When the `fallbackData` option is provided, the returned `data` will be the same type of `fallbackData`, and the `isLoading` will always be `false`. Here's a demo for it: https://user-images.githubusercontent.com/4800338/213288879-ffbeeeb5-aca5-4a65-8229-69fbf9b0bf70.mp4 #### What's Changed - types: make FullConfiguration generic by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2273](https://togithub.com/vercel/swr/pull/2273) - type: enforce array literal as tuple by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2283](https://togithub.com/vercel/swr/pull/2283) - Improve type test by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2289](https://togithub.com/vercel/swr/pull/2289) - update bunchee to remove the extra target cli option by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2298](https://togithub.com/vercel/swr/pull/2298) - fix: useSWRMutation should always use the latest fetcher by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2290](https://togithub.com/vercel/swr/pull/2290) - types: conditional swr response by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2301](https://togithub.com/vercel/swr/pull/2301) - fix: types properites in exports fields by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2341](https://togithub.com/vercel/swr/pull/2341) - Update license year by [@​IcedMonk](https://togithub.com/IcedMonk) in [https://github.com/vercel/swr/pull/2344](https://togithub.com/vercel/swr/pull/2344) - feat: add all mutate options support to useSWRInfinite by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2350](https://togithub.com/vercel/swr/pull/2350) - ci: add publint to check packaging on CI by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2363](https://togithub.com/vercel/swr/pull/2363) #### New Contributors - [@​IcedMonk](https://togithub.com/IcedMonk) made their first contribution in [https://github.com/vercel/swr/pull/2344](https://togithub.com/vercel/swr/pull/2344) **Full Changelog**: https://github.com/vercel/swr/compare/2.0.0...v2.0.1 ### [`v2.0.0`](https://togithub.com/vercel/swr/releases/tag/2.0.0) [Compare Source](https://togithub.com/vercel/swr/compare/1.3.0...2.0.0) ### Announcing SWR 2.0 We are excited to announce the release of SWR 2.0! The new version comes with a lot of improvements: - New useSWRMutation hook - Enhanced mutation and optimistic UI capabilities - SWR DevTools - Preload resource - Improved React 18 support And more! Read our blog post and migration guide: **https://swr.vercel.app/blog/swr-v2** #### What's Changed - bugfix: make suspense and revalidateIfStale work together by [@​simowe](https://togithub.com/simowe) in [https://github.com/vercel/swr/pull/1851](https://togithub.com/vercel/swr/pull/1851) - feat: support functional optimisticData by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1861](https://togithub.com/vercel/swr/pull/1861) - test: fix an act warning by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/1888](https://togithub.com/vercel/swr/pull/1888) - breaking: Change the fetcher argument to be consistent with the passed key by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1864](https://togithub.com/vercel/swr/pull/1864) - Keep all fields with one single key by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1863](https://togithub.com/vercel/swr/pull/1863) - fix: wrong spell by [@​baojie223](https://togithub.com/baojie223) in [https://github.com/vercel/swr/pull/1902](https://togithub.com/vercel/swr/pull/1902) - Update React 18 dependencies by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1824](https://togithub.com/vercel/swr/pull/1824) - build(deps): bump minimist from 1.2.5 to 1.2.6 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/vercel/swr/pull/1903](https://togithub.com/vercel/swr/pull/1903) - type: make type inference simpler by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1908](https://togithub.com/vercel/swr/pull/1908) - type: fix type error on SWRConfig by [@​Himself65](https://togithub.com/Himself65) in [https://github.com/vercel/swr/pull/1913](https://togithub.com/vercel/swr/pull/1913) - feat: Hook for remote mutations by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1450](https://togithub.com/vercel/swr/pull/1450) - Add isFallback state by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1925](https://togithub.com/vercel/swr/pull/1925) - build: output mutation cjs bundle with named exports by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1926](https://togithub.com/vercel/swr/pull/1926) - Add `isLoading` state and refactor the core by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1928](https://togithub.com/vercel/swr/pull/1928) - Add `keepPreviousData` option by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1929](https://togithub.com/vercel/swr/pull/1929) - types: drop legacy types by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1930](https://togithub.com/vercel/swr/pull/1930) - breaking: Throw error when using suspense on the server side without fallback in React 18 by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1931](https://togithub.com/vercel/swr/pull/1931) - type: extends useConfig cache interface by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1938](https://togithub.com/vercel/swr/pull/1938) - remove mount check for react18 by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1927](https://togithub.com/vercel/swr/pull/1927) - lint: dont check unused vars with underscore prefix by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1939](https://togithub.com/vercel/swr/pull/1939) - test: upgrade to jest 28 by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1942](https://togithub.com/vercel/swr/pull/1942) - Fix cache types by [@​chibicode](https://togithub.com/chibicode) in [https://github.com/vercel/swr/pull/1961](https://togithub.com/vercel/swr/pull/1961) - Improved React 18 support by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1962](https://togithub.com/vercel/swr/pull/1962) - types: fix type regressions by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1966](https://togithub.com/vercel/swr/pull/1966) - fix: mutate args for useSWRInfinite hook by [@​sanjeev29](https://togithub.com/sanjeev29) in [https://github.com/vercel/swr/pull/1947](https://togithub.com/vercel/swr/pull/1947) - build: import with-selector with extension from useESE by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1967](https://togithub.com/vercel/swr/pull/1967) - Bug fixes by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1968](https://togithub.com/vercel/swr/pull/1968) - chore: Faster type checking by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1969](https://togithub.com/vercel/swr/pull/1969) - fix: try fix codesanbox ci import error by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1971](https://togithub.com/vercel/swr/pull/1971) - Fix race conditions related to optimistic UI by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1970](https://togithub.com/vercel/swr/pull/1970) - chore: Add test cases for mutate by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1976](https://togithub.com/vercel/swr/pull/1976) - fix: Should always reset to the original data after mutating with optimistic data by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/1982](https://togithub.com/vercel/swr/pull/1982) - refactor: remove useless ref copy by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1981](https://togithub.com/vercel/swr/pull/1981) - chore: switch to pnpm and turborepo by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1983](https://togithub.com/vercel/swr/pull/1983) - fix: should only update cache when actually start new request by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1986](https://togithub.com/vercel/swr/pull/1986) - chore: save some bytes by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/1991](https://togithub.com/vercel/swr/pull/1991) - fix: useSWRMutation - clear error after successful trigger ([#​1973](https://togithub.com/vercel/swr/issues/1973)) by [@​anirudh1713](https://togithub.com/anirudh1713) in [https://github.com/vercel/swr/pull/1995](https://togithub.com/vercel/swr/pull/1995) - Fix typo: getSWRCacahe -> getSWRCache by [@​sdornan](https://togithub.com/sdornan) in [https://github.com/vercel/swr/pull/2000](https://togithub.com/vercel/swr/pull/2000) - build: do not abort on watch mode when ts erroring by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1992](https://togithub.com/vercel/swr/pull/1992) - chore: add engine field to limit pnpm version by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1990](https://togithub.com/vercel/swr/pull/1990) - test: add test case for [#​1974](https://togithub.com/vercel/swr/issues/1974) by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2005](https://togithub.com/vercel/swr/pull/2005) - fix: Adding debounce for autocomplete-suggestions example by [@​Walkeryr](https://togithub.com/Walkeryr) in [https://github.com/vercel/swr/pull/2017](https://togithub.com/vercel/swr/pull/2017) - BREAKING: rename SWRConfig.default to SWRConfig.defaultValue by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2023](https://togithub.com/vercel/swr/pull/2023) - feat: support functional swr context config by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2024](https://togithub.com/vercel/swr/pull/2024) - test: fix all act warnings by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2031](https://togithub.com/vercel/swr/pull/2031) - feat: add preload function by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2026](https://togithub.com/vercel/swr/pull/2026) - fix: Avoid preloading the resource multiple times by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/2036](https://togithub.com/vercel/swr/pull/2036) - fix: isLoading and isValidating should always respect cache value by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2048](https://togithub.com/vercel/swr/pull/2048) - Fix ts type generation by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2038](https://togithub.com/vercel/swr/pull/2038) - feat: mutate filter by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/1989](https://togithub.com/vercel/swr/pull/1989) - Fix typos by [@​hiro0218](https://togithub.com/hiro0218) in [https://github.com/vercel/swr/pull/2052](https://togithub.com/vercel/swr/pull/2052) - feat: add DevTools hook by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2016](https://togithub.com/vercel/swr/pull/2016) - Use consistent typing imports by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2061](https://togithub.com/vercel/swr/pull/2061) - Upgrading use-sync-external-store lib by [@​sanjaiyan-dev](https://togithub.com/sanjaiyan-dev) in [https://github.com/vercel/swr/pull/2063](https://togithub.com/vercel/swr/pull/2063) - Revert swr config generic by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2065](https://togithub.com/vercel/swr/pull/2065) - Fix: raf return type by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2074](https://togithub.com/vercel/swr/pull/2074) - Remove unused info from dummy package.json by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2083](https://togithub.com/vercel/swr/pull/2083) - Use pnpm workspace by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2085](https://togithub.com/vercel/swr/pull/2085) - bump typescript and apply nodenext module resolution by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2084](https://togithub.com/vercel/swr/pull/2084) - Chore: Typos and grammar by [@​AllanOliveiraM](https://togithub.com/AllanOliveiraM) in [https://github.com/vercel/swr/pull/2094](https://togithub.com/vercel/swr/pull/2094) - chore: add basic tsdoc by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2089](https://togithub.com/vercel/swr/pull/2089) - types: add generic for SWRInfiniteKeyLoader by [@​jason89521](https://togithub.com/jason89521) in [https://github.com/vercel/swr/pull/2104](https://togithub.com/vercel/swr/pull/2104) - fix: add swr/\_internal to paths by [@​jason89521](https://togithub.com/jason89521) in [https://github.com/vercel/swr/pull/2105](https://togithub.com/vercel/swr/pull/2105) - type: make tsconfig simpler and fix type error by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2115](https://togithub.com/vercel/swr/pull/2115) - chore: exclude .tsbuildinfo from files, reduce install size by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2119](https://togithub.com/vercel/swr/pull/2119) - Reorder exports conditions by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2130](https://togithub.com/vercel/swr/pull/2130) - Upgrade bunchee by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2132](https://togithub.com/vercel/swr/pull/2132) - Bump typescript and assemble pnpm scripts by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2133](https://togithub.com/vercel/swr/pull/2133) - chore: add github actions reporter by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2131](https://togithub.com/vercel/swr/pull/2131) - Dedupe installed swc by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2136](https://togithub.com/vercel/swr/pull/2136) - test: add a test for preload API in effects by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2138](https://togithub.com/vercel/swr/pull/2138) - test: add more isLoading tests for the case a key is null or an error by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2141](https://togithub.com/vercel/swr/pull/2141) - ci: use action/setup-node built-in pnpm cache and bump to node16 by [@​promer94](https://togithub.com/promer94) in [https://github.com/vercel/swr/pull/2142](https://togithub.com/vercel/swr/pull/2142) - test: add tests for dependency collection by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2140](https://togithub.com/vercel/swr/pull/2140) - chore: bump dev deps by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2143](https://togithub.com/vercel/swr/pull/2143) - memoize config values to avoid frequent context propagation by [@​gnoff](https://togithub.com/gnoff) in [https://github.com/vercel/swr/pull/2149](https://togithub.com/vercel/swr/pull/2149) - Bundle types into one file by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2150](https://togithub.com/vercel/swr/pull/2150) - Revert target option by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2151](https://togithub.com/vercel/swr/pull/2151) - chore: fix missing husky warning by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2160](https://togithub.com/vercel/swr/pull/2160) - Remove downlevelIteration and traverse iterator manually by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2181](https://togithub.com/vercel/swr/pull/2181) - fix: re-render when returned data and fallbackData is the same and keepPreviousData is enabled by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2169](https://togithub.com/vercel/swr/pull/2169) - breaking: Change the error broadcasting behavior in mutations and add `throwOnError` option by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/2182](https://togithub.com/vercel/swr/pull/2182) - docs: Add JSDoc comments to useSWRMutation by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/2183](https://togithub.com/vercel/swr/pull/2183) - type: export MutationFetcher by [@​ssssota](https://togithub.com/ssssota) in [https://github.com/vercel/swr/pull/2184](https://togithub.com/vercel/swr/pull/2184) - Bump bundler by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2187](https://togithub.com/vercel/swr/pull/2187) - resolve swr internal imports as external by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2225](https://togithub.com/vercel/swr/pull/2225) - test: update tests alias to swr subpath exports by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2243](https://togithub.com/vercel/swr/pull/2243) - feat: support functional rollbackOnError by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2242](https://togithub.com/vercel/swr/pull/2242) - Update build target to es2018 by [@​shuding](https://togithub.com/shuding) in [https://github.com/vercel/swr/pull/2249](https://togithub.com/vercel/swr/pull/2249) - Fix missing esmodule mark in cjs build by [@​huozhi](https://togithub.com/huozhi) in [https://github.com/vercel/swr/pull/2251](https://togithub.com/vercel/swr/pull/2251) - fix: pass null fetcher to middleware by [@​koba04](https://togithub.com/koba04) in [https://github.com/vercel/swr/pull/2240](https://togithub.com/vercel/swr/pull/2240) #### New Contributors - [@​simowe](https://togithub.com/simowe) made their first contribution in [https://github.com/vercel/swr/pull/1851](https://togithub.com/vercel/swr/pull/1851) - [@​baojie223](https://togithub.com/baojie223) made their first contribution in [https://github.com/vercel/swr/pull/1902](https://togithub.com/vercel/swr/pull/1902) - [@​Himself65](https://togithub.com/Himself65) made their first contribution in [https://github.com/vercel/swr/pull/1913](https://togithub.com/vercel/swr/pull/1913) - [@​chibicode](https://togithub.com/chibicode) made their first contribution in [https://github.com/vercel/swr/pull/1961](https://togithub.com/vercel/swr/pull/1961) - [@​sanjeev29](https://togithub.com/sanjeev29) made their first contribution in [https://github.com/vercel/swr/pull/1947](https://togithub.com/vercel/swr/pull/1947) - [@​sdornan](https://togithub.com/sdornan) made their first contribution in [https://github.com/vercel/swr/pull/2000](https://togithub.com/vercel/swr/pull/2000) - [@​Walkeryr](https://togithub.com/Walkeryr) made their first contribution in [https://github.com/vercel/swr/pull/2017](https://togithub.com/vercel/swr/pull/2017) - [@​hiro0218](https://togithub.com/hiro0218) made their first contribution in [https://github.com/vercel/swr/pull/2052](https://togithub.com/vercel/swr/pull/2052) - [@​sanjaiyan-dev](https://togithub.com/sanjaiyan-dev) made their first contribution in [https://github.com/vercel/swr/pull/2063](https://togithub.com/vercel/swr/pull/2063) - [@​AllanOliveiraM](https://togithub.com/AllanOliveiraM) made their first contribution in [https://github.com/vercel/swr/pull/2094](https://togithub.com/vercel/swr/pull/2094) - [@​jason89521](https://togithub.com/jason89521) made their first contribution in [https://github.com/vercel/swr/pull/2104](https://togithub.com/vercel/swr/pull/2104) - [@​gnoff](https://togithub.com/gnoff) made their first contribution in [https://github.com/vercel/swr/pull/2149](https://togithub.com/vercel/swr/pull/2149) - [@​ssssota](https://togithub.com/ssssota) made their first contribution in [https://github.com/vercel/swr/pull/2184](https://togithub.com/vercel/swr/pull/2184) **Full Changelog**: https://github.com/vercel/swr/compare/1.2.2...2.0.0

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

renovate[bot] commented 3 months ago

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 2.x releases. But if you manually upgrade to 2.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.