更新日志
请访问 SWR release page 查看所有的历史版本。
v2.4.2
发布于 Mon Jun 22 2026.
Patches
- fix: guard against double-unsubscribe removing wrong subscriber in cache.ts by @tomohiro86 in https://github.com/vercel/swr/pull/4252
- Prevent resolved promise to suspend due to missing status by @devjiwonchoi in https://github.com/vercel/swr/pull/4271
Chores
- Update axios versions in the examples by @lukesandberg in https://github.com/vercel/swr/pull/4243
- ci: switch npm publish to OIDC trusted publishing by @huozhi in https://github.com/vercel/swr/pull/4274
- ci: remove registry url by @huozhi in https://github.com/vercel/swr/pull/4277
- ci: update release job by @huozhi in https://github.com/vercel/swr/pull/4278
- 2.4.2 by @huozhi in https://github.com/vercel/swr/pull/4279
- chore: pin pnpm 10.33.0 by @styfle in https://github.com/vercel/swr/pull/4258
- ci: update GitHub Actions for Node 24 by @promer94 in https://github.com/vercel/swr/pull/4254
- chore: remove the axios examples by @huozhi in https://github.com/vercel/swr/pull/4263
New Contributors
- @lukesandberg made their first contribution in https://github.com/vercel/swr/pull/4243
- @tomohiro86 made their first contribution in https://github.com/vercel/swr/pull/4252
Full Changelog: https://github.com/vercel/swr/compare/v2.4.1...v2.4.2
v2.4.1
发布于 Mon Jun 22 2026.
Patches
- Remove deprecated downlevelIteration option by @RyanCavanaugh in https://github.com/vercel/swr/pull/4216
- fix: Fix #4221 by @promer94 in https://github.com/vercel/swr/pull/4223
New Contributors
- @RyanCavanaugh made their first contribution in https://github.com/vercel/swr/pull/4216
Full Changelog: https://github.com/vercel/swr/compare/v2.4.0...v2.4.1
v2.4.0
发布于 Sun Feb 01 2026.
What's Changed
- chore: Migrate suspense related tests to e2e by @promer94 in https://github.com/vercel/swr/pull/4204
- CI: add missing flag for canary test by @promer94 in https://github.com/vercel/swr/pull/4206
- fix: Ensure useSWRImmutable overrides global refreshInterval by @CODEAbhinav-art in https://github.com/vercel/swr/pull/4208
- fix: Extra render when changing to new key with useSWRImmutable by @promer94 in https://github.com/vercel/swr/pull/4209
- fix: isHydration will cause unnecessary rerender by @promer94 in https://github.com/vercel/swr/pull/4212
- fix: Ensure preload runs only on client by @Copilot in https://github.com/vercel/swr/pull/4213
New Contributors
- @CODEAbhinav-art made their first contribution in https://github.com/vercel/swr/pull/4208
- @Copilot made their first contribution in https://github.com/vercel/swr/pull/4213
Full Changelog: https://github.com/vercel/swr/compare/v2.3.8...v2.4.0
v2.3.8
发布于 Mon Dec 15 2025.
What's Changed
- deps: upgrade dev deps for build by @promer94 in https://github.com/vercel/swr/pull/4188
- update use-sync-external-store to latest by @huozhi in https://github.com/vercel/swr/pull/4189
- fix: cve-2025-55182 critical rce vulnerability by @PierreCrb in https://github.com/vercel/swr/pull/4192
- fix: cve-2025-55184 & CVE-2025-55183 by @PierreCrb in https://github.com/vercel/swr/pull/4198
- upgrade dev dep nextjs by @huozhi in https://github.com/vercel/swr/pull/4199
- update dev dependencies to address cve by @PierreCrb in https://github.com/vercel/swr/pull/4200
- enhance: Improve TSDoc comments by @shuding in https://github.com/vercel/swr/pull/4203
- test: Import
actfrom React by @shuding in https://github.com/vercel/swr/pull/4202
New Contributors
- @PierreCrb made their first contribution in https://github.com/vercel/swr/pull/4192
Full Changelog: https://github.com/vercel/swr/compare/v2.3.7...v2.3.8
v2.3.7
发布于 Fri Nov 28 2025.
What's Changed
- deps: upgrade ci node version to 22 by @promer94 in https://github.com/vercel/swr/pull/4184
- deps: upgrade pnpm version by @promer94 in https://github.com/vercel/swr/pull/4185
- deps: upgrade playwright version by @promer94 in https://github.com/vercel/swr/pull/4186
- deps: upgrade eslint version and fix lint problem by @promer94 in https://github.com/vercel/swr/pull/4187
- feat: Add
strictServerPrefetchWarningby @shuding in https://github.com/vercel/swr/pull/4183
Full Changelog: https://github.com/vercel/swr/compare/v2.3.6...v2.3.7