Packages

swr

2.5.1 · 12 Aug 2026MIT28.9M / weekRepositoryHomepagenpmAtom feed

Upgrading swr From 1.0.0 to 1.3.0

8 releases in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 1.0.0Latest2.5.1
0
changes to make
0
advisories fixed
12
new
9
fixes

Release by release

  1. 1.3.0

    10 Apr 20221 new · 1 fix
    • New

      Support functional optimisticData

    • Fixed

      type: Fix type error on SWRConfig

  2. 1.2.2

    18 Feb 20221 new · 1 fix
    • New

      Support populateCache as a function

    • Fixed

      Reset stale unmountedRef in suspense

  3. 1.2.1

    2 Feb 20221 fix
    • Fixed

      useSWRInfinite revalidates with revalidateOnMount

  4. 1.2.0

    26 Jan 20221 new · 2 fixes
    • New

      Optimistic mutation with error rollback

    • Fixed

      Required return type when mutating

    • Fixed

      Use the latest reference of fetcher with suspense mode

  5. 1.1.2

    26 Dec 20214 new · 2 fixes
    • New

      Ensure auto revalidations are executed after state updates

    • New

      Add moduleNameMapper to jest

    • New

      Use the latest reference of fetcher

    • New

      Add populateCache option to mutate

    • Fixed

      Re-export InfiniteFetcher

    • Fixed

      Fix local state sharing example deps

  6. 1.1.1

    10 Dec 20211 new · 2 fixes
    • New

      refreshInterval as a function

    • Fixed

      If newData is deeply to the latest state, broadcast the latest state

    • Fixed

      Return undefined data if key's falsy under suspense mode

  7. 1.1.0

    30 Nov 20214 new
    • New

      Key / arguments

    • New

      Conditional / dependent

    • New

      Constant keys

    • New

      Returned data

  8. 1.0.1nothing new or fixed in the note

7 other lines we could not sort, mostly version bumps
  • bugfix: Make suspense and revalidateIfStale work together

    1.3.0
  • shouldRetryOnError accepts a function that can be used to conditionally stop retrying

    1.2.1
  • Make polyfill for requestAnimationFrame more robust

    1.1.2
  • type(infinite): export SWRInfinteHook and SWRInfiniteKeyLoader from infinite, rename InfiniteFetcher to SWRInfiniteFetcher

    1.1.2
  • Improve test

    1.1.2
  • Merge states for concurrent requests

    1.1.2
  • Skip error retrying when document is not active and improve tests

    1.1.2

26 internal lines (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.