Skip to content

2.0.0

Compare
Choose a tag to compare
@aholstenson aholstenson released this 09 Apr 08:24
· 23 commits to master since this release

Transitory has been rewritten in TypeScript allowing for a safer cache implementation and easier use in other TypeScript projects.

API changes in 2.x:

  • Cache can no longer be used with instanceof, it has been replaced with AbstractCache
  • get(key) has been replaced with getIfPresent(key) for all non-loading caches
  • RemovalCause has been renamed to RemovalReason and now uses strings instead of symbols
  • Builders are now created via newCache() instead of directly via the imported object

Other changes:

  • Separate CommonJS build for Node
  • ES Module builds to support tree-shaking and easier importing in browser projects