Releases: vercel/swr
Releases · vercel/swr
Release list
v2.5.1
Patches
- fix: hydrate cacheData for hooks without a fetcher by @yongsk0066 in #4293
- fix: revalidate suspense cacheData on remount by @javascripter in #4312
- fix: clean up completed subscription state by @iroiro147 in #4310
Misc
- chore: bump version to 2.5.1 by @huozhi in #4315
- chore: remove deprecated eslint config files by @abhiramvsmg in #4308
New Contributors
- @abhiramvsmg made their first contribution in #4308
- @yongsk0066 made their first contribution in #4293
- @iroiro147 made their first contribution in #4310
Full Changelog: v2.5.0...v2.5.1
v.2.5.0
Features
RSC cache preloading
Preload data in React Server Components and pass it to client hooks through SWRConfig. This avoids a duplicate initial browser request and hydrates the result into the SWR cache. The new cacheData option is experimental.
New unload() API
Use unload() to clear the entire SWR cache and discard in-flight requests and mutations. Mounted hooks revalidate by default, or you can pass { revalidate: false } to keep the cache empty until the next revalidation.
Fixes
- Fixed the
swr/_internalReact Server export so it resolves correctly in the published package by @pengshenghai in #4272
New Contributors
- @pengshenghai made their first contribution in #4272
Full Changelog: v2.4.2...v2.5.0
v2.5.0-beta.1
v2.5.0-beta.0
Features
Patches
- fix: point _internal react-server export at existing file by @pengshenghai in #4272
New Contributors
- @pengshenghai made their first contribution in #4272
Full Changelog: v2.4.2...v2.5.0-beta.0
v2.4.2
Patches
- fix: guard against double-unsubscribe removing wrong subscriber in cache.ts by @tomohiro86 in #4252
- Prevent resolved promise to suspend due to missing status by @devjiwonchoi in #4271
Chores
- Update axios versions in the examples by @lukesandberg in #4243
- ci: switch npm publish to OIDC trusted publishing by @huozhi in #4274
- ci: remove registry url by @huozhi in #4277
- ci: update release job by @huozhi in #4278
- 2.4.2 by @huozhi in #4279
- chore: pin pnpm 10.33.0 by @styfle in #4258
- ci: update GitHub Actions for Node 24 by @promer94 in #4254
- chore: remove the axios examples by @huozhi in #4263
New Contributors
- @lukesandberg made their first contribution in #4243
- @tomohiro86 made their first contribution in #4252
Full Changelog: v2.4.1...v2.4.2
v2.4.1
Patches
- Remove deprecated downlevelIteration option by @RyanCavanaugh in #4216
- fix: Fix #4221 by @promer94 in #4223
New Contributors
- @RyanCavanaugh made their first contribution in #4216
Full Changelog: v2.4.0...v2.4.1
v2.4.0
What's Changed
- chore: Migrate suspense related tests to e2e by @promer94 in #4204
- CI: add missing flag for canary test by @promer94 in #4206
- fix: Ensure useSWRImmutable overrides global refreshInterval by @CODEAbhinav-art in #4208
- fix: Extra render when changing to new key with useSWRImmutable by @promer94 in #4209
- fix: isHydration will cause unnecessary rerender by @promer94 in #4212
- fix: Ensure preload runs only on client by @Copilot in #4213
New Contributors
- @CODEAbhinav-art made their first contribution in #4208
- @Copilot made their first contribution in #4213
Full Changelog: v2.3.8...v2.4.0
v2.3.8
What's Changed
- deps: upgrade dev deps for build by @promer94 in #4188
- update use-sync-external-store to latest by @huozhi in #4189
- fix: cve-2025-55182 critical rce vulnerability by @PierreCrb in #4192
- fix: cve-2025-55184 & CVE-2025-55183 by @PierreCrb in #4198
- upgrade dev dep nextjs by @huozhi in #4199
- update dev dependencies to address cve by @PierreCrb in #4200
- enhance: Improve TSDoc comments by @shuding in #4203
- test: Import
actfrom React by @shuding in #4202
New Contributors
- @PierreCrb made their first contribution in #4192
Full Changelog: v2.3.7...v2.3.8
v2.3.7
What's Changed
- deps: upgrade ci node version to 22 by @promer94 in #4184
- deps: upgrade pnpm version by @promer94 in #4185
- deps: upgrade playwright version by @promer94 in #4186
- deps: upgrade eslint version and fix lint problem by @promer94 in #4187
- feat: Add
strictServerPrefetchWarningby @shuding in #4183
Full Changelog: v2.3.6...v2.3.7