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: v7.10.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: v7.10.1
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on May 11, 2022

  1. types: provide values for generics in 2 places

    PR-URL: #236
    Credit: @falsandtru
    Close: #236
    Reviewed-by: @isaacs
    falsandtru authored and isaacs committed May 11, 2022

    Verified

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

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

    isaacs committed May 11, 2022
    Copy the full SHA
    b486515 View commit details
Showing with 9 additions and 6 deletions.
  1. +2 −2 index.d.ts
  2. +2 −2 package-lock.json
  3. +4 −1 package.json
  4. +1 −1 test/load.ts
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -262,7 +262,7 @@ declare class LRUCache<K, V> implements Iterable<[K, V]> {
// tslint:disable-next-line:no-unnecessary-generics
public fetch<ExpectedValue = V>(
key: K,
options?: LRUCache.FetchOptions
options?: LRUCache.FetchOptions<K, V>
): Promise<ExpectedValue | undefined>

/**
@@ -300,7 +300,7 @@ declare namespace LRUCache {
*
* @deprecated since 7.0 use options.sizeCalculation instead
*/
length?: SizeCalculator
length?: SizeCalculator<K, V>

/**
* alias for allowStale
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.

5 changes: 4 additions & 1 deletion 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": "7.10.0",
"version": "7.10.1",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
@@ -55,6 +55,9 @@
"endOfLine": "lf"
},
"tap": {
"nyc-arg": [
"--include=index.js"
],
"node-arg": [
"--expose-gc",
"--require",
2 changes: 1 addition & 1 deletion test/load.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ for (let i = 0; i < 9; i++) {
c.set(i, i)
}

const d = new LRU(c as LRU.Options<number, number>)
const d = new LRU(c as unknown as LRU.Options<number, number>)
d.load(c.dump())

t.strictSame(d, c)