Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: isaacs/node-lru-cache
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.4.0
Choose a base ref
...
head repository: isaacs/node-lru-cache
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.4.1
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Jul 8, 2024

  1. changelog: cosmetics, explain 10.4 typo

    isaacs committed Jul 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d67b111 View commit details
  2. expanded engines definition

    isaacs committed Jul 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3fcc387 View commit details
  3. 10.4.1

    isaacs committed Jul 8, 2024
    Copy the full SHA
    e01135c View commit details
Showing with 34 additions and 30 deletions.
  1. +30 −26 CHANGELOG.md
  2. +2 −2 package-lock.json
  3. +2 −2 package.json
56 changes: 30 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
# cringe lorg

## 10.3.0
## 10.4

Accidental minor update, should've been patch.

## 10.3

- add `forceFetch()` method
- set `disposeReason` to `'expire'` when it's the result of a TTL
expiration, or `'fetch'` when it's the result of an aborted
or `undefined`-returning `fetch()`
- add `memo()` method

## 10.2.0
## 10.2

- types: implement the `Map<K, V>` interface

## 10.1.0
## 10.1

- add `cache.info(key)` to get value as well as ttl and size
information.

## 10.0.0
## 10.0

- `cache.fetch()` return type is now `Promise<V | undefined>`
instead of `Promise<V | void>`. This is an irrelevant change
practically speaking, but can require changes for TypeScript
users.

## 9.1.0
## 9.1

- `cache.set(key, undefined)` is now an alias for
`cache.delete(key)`

## 9.0.0
## 9.0

- Use named export only, no default export.
- Bring back minimal polyfill. If this polyfill ends up being
used, then a warning is printed, as it is not safe for use
outside of LRUCache.

## 8.0.0
## 8.0

- The `fetchContext` option was renamed to `context`, and may no
longer be set on the cache instance itself.
@@ -50,12 +54,12 @@
- Minified export available at `'lru-cache/min'`, for both CJS
and MJS builds.

## 7.18.0
## 7.18

- Add support for internal state investigation through the use of
a `status` option to `has()`, `set()`, `get()`, and `fetch()`.

## 7.17.0
## 7.17

- Add `signal` option for `fetch` to pass a user-supplied
AbortSignal
@@ -65,95 +69,95 @@

- Fail fetch() promises when they are aborted

## 7.16.0
## 7.16

- Add `allowStaleOnFetchRejection` option

## 7.15.0
## 7.15

- Provide both ESM and CommonJS exports

## 7.14.0
## 7.14

- Add `maxEntrySize` option to prevent caching items above a
given calculated size.

## 7.13.0
## 7.13

- Add `forceRefresh` option to trigger a call to the
`fetchMethod` even if the item is found in cache, and not
older than its `ttl`.

## 7.12.0
## 7.12

- Add `fetchContext` option to provide additional information to
the `fetchMethod`
- 7.12.1: Fix bug where adding an item with size greater than
`maxSize` would cause bizarre behavior.

## 7.11.0
## 7.11

- Add 'noDeleteOnStaleGet' option, to suppress behavior where a
`get()` of a stale item would remove it from the cache.

## 7.10.0
## 7.10

- Add `noDeleteOnFetchRejection` option, to suppress behavior
where a failed `fetch` will delete a previous stale value.
- Ship types along with the package, rather than relying on
out of date types coming from DefinitelyTyped.

## 7.9.0
## 7.9

- Better AbortController polyfill, supporting
`signal.addEventListener('abort')` and `signal.onabort`.
- (7.9.1) Drop item from cache instead of crashing with an
`unhandledRejection` when the `fetchMethod` throws an error or
returns a rejected Promise.

## 7.8.0
## 7.8

- add `updateAgeOnHas` option
- warnings sent to `console.error` if `process.emitWarning` unavailable

## 7.7.0
## 7.7

- fetch: provide options and abort signal

## 7.6.0
## 7.6

- add cache.getRemainingTTL(key)
- Add async cache.fetch() method, fetchMethod option
- Allow unbounded storage if maxSize or ttl set

## 7.5.0
## 7.5

- defend against mutation while iterating
- Add rentries, rkeys, rvalues
- remove bundler and unnecessary package.json fields

## 7.4.0
## 7.4

- Add browser optimized webpack bundle, exposed as `'lru-cache/browser'`
- Track size of compiled bundle in CI ([@SuperOleg39](https://github.com/SuperOleg39))
- Add `noUpdateTTL` option for `set()`

## 7.3.0
## 7.3

- Add `disposeAfter()`
- `set()` returns the cache object
- `delete()` returns boolean indicating whether anything was deleted

## 7.2.0
## 7.2

- Add reason to dispose() calls.

## 7.1.0
## 7.1

- Add `ttlResolution` option
- Add `ttlAutopurge` option

## v7 - 2022-02
## 7.0 - 2022-02

This library changed to a different algorithm and internal data structure
in version 7, yielding significantly better performance, albeit with
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "10.4.0",
"version": "10.4.1",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
@@ -68,7 +68,7 @@
"dist"
],
"engines": {
"node": ">=18"
"node": "14 >= 14.21 || 16 >= 16.20 || 18 >=18.20 || 20 || >=22"
},
"prettier": {
"semi": false,