All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
...
3.4.0 - 2024-03-21
- Expose a
.retrieve()
convenience method to simply read from the cache without revalidation.
3.3.0 - 2024-02-15
- Functionality to auto-retry failed tasks. Opt-in, by using
retry
andretryDelay
config options.
3.2.1 - 2023-09-07
- Incorrect emit of error event when cache miss returns
undefined
3.2.0 - 2023-08-19
- Functionality to deduplicate in-flight function invocations
- This should be considered an implementation detail but as part of the deduplication functionality, there has been a subtle change to the library where it will wait for the cache persistence before returning the result. Theoretically, it means an uncached request will be slower for the time it takes to write to your cache. It's a trade-off.
3.1.3 - 2023-06-19
- Exported missing
EmitterEvents
constant
3.1.2 - 2023-06-11
- Transpiled away any uses of the nullish coalescing operator (
??
) since Webpack 4 doesn't support it
3.1.1 - 2023-05-10
- Update main cache value type to reflect that the awaited value is stored
3.1.0 - 2023-02-14
- Expose a
.delete()
convenience method to manually remove cache entries
3.0.0 - 2023-02-09
- Return type from
swr
cache function now returns a payload object containing the cache value and not just the cache value. - Event emitter events that used
cachedTime
changed tocachedAt
swr.persist()
function now throws if an error occurs while writing to storage
2.2.0 - 2023-02-06
- Expose a
.persist()
convenience method to manually write to the cache
2.1.0 - 2023-01-26
- Partial overrides of any cache config values per function invocation.
2.0.0 - 2022-10-28
- Dropped support for Node.js v12
- Updated dependencies with potential security vulnerabilities
- Internal build tools from the unmaintained TSDX to Rollup, Jest, ESLint & Prettier
1.2.0 - 2021-10-08
- Fix incorrect emitting of
cacheExpired
event
- Add
cacheStale
event - Allow falsy cache values excluding
null
andundefined
- Add emitter events for when storage get and set fails