Skip to content

Latest commit

 

History

History
128 lines (73 loc) · 3.8 KB

CHANGELOG.md

File metadata and controls

128 lines (73 loc) · 3.8 KB

Changelog

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

Added

  • Expose a .retrieve() convenience method to simply read from the cache without revalidation.

3.3.0 - 2024-02-15

Added

  • Functionality to auto-retry failed tasks. Opt-in, by using retry and retryDelay config options.

3.2.1 - 2023-09-07

Fixed

  • Incorrect emit of error event when cache miss returns undefined

3.2.0 - 2023-08-19

Added

  • Functionality to deduplicate in-flight function invocations

Change

  • 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

Fixed

  • Exported missing EmitterEvents constant

3.1.2 - 2023-06-11

Fixed

  • Transpiled away any uses of the nullish coalescing operator (??) since Webpack 4 doesn't support it

3.1.1 - 2023-05-10

Fixed

  • Update main cache value type to reflect that the awaited value is stored

3.1.0 - 2023-02-14

Added

  • Expose a .delete() convenience method to manually remove cache entries

3.0.0 - 2023-02-09

Changed

  • 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 to cachedAt
  • swr.persist() function now throws if an error occurs while writing to storage

2.2.0 - 2023-02-06

Added

  • Expose a .persist() convenience method to manually write to the cache

2.1.0 - 2023-01-26

Added

  • Partial overrides of any cache config values per function invocation.

2.0.0 - 2022-10-28

Removed

  • Dropped support for Node.js v12

Security

  • Updated dependencies with potential security vulnerabilities

Changed

  • Internal build tools from the unmaintained TSDX to Rollup, Jest, ESLint & Prettier

1.2.0 - 2021-10-08

Fixed

  • Fix incorrect emitting of cacheExpired event

Added

  • Add cacheStale event
  • Allow falsy cache values excluding null and undefined

[1.1.0] - 2021-10-01

Added

  • Add emitter events for when storage get and set fails