Comparing version 8.0.4 to 8.0.5
{ | ||
"name": "get-jwks", | ||
"version": "8.0.4", | ||
"version": "8.0.5", | ||
"description": "Fetch utils for JWKS keys", | ||
@@ -33,3 +33,3 @@ "main": "src/get-jwks.js", | ||
"jwk-to-pem": "^2.0.4", | ||
"lru-cache": "^8.0.0", | ||
"lru-cache": "^9.0.0", | ||
"node-fetch": "^2.6.1" | ||
@@ -36,0 +36,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
import LRU from 'lru-cache' | ||
import type { LRUCache } from 'lru-cache' | ||
import type { Agent } from 'https' | ||
@@ -26,6 +26,6 @@ | ||
getJwksUri: (normalizedDomain: string) => Promise<string> | ||
cache: LRU<string, JWK> | ||
staleCache: LRU<string, JWK> | ||
cache: LRUCache<string, JWK> | ||
staleCache: LRUCache<string, JWK> | ||
} | ||
export default function buildGetJwks(options?: GetJwksOptions): GetJwks |
'use strict' | ||
const fetch = require('node-fetch') | ||
const LRU = require('lru-cache') | ||
const { LRUCache } = require('lru-cache') | ||
const jwkToPem = require('jwk-to-pem') | ||
@@ -26,4 +26,4 @@ | ||
const agent = options.agent || null | ||
const staleCache = new LRU({ max: max * 2, ttl }) | ||
const cache = new LRU({ | ||
const staleCache = new LRUCache({ max: max * 2, ttl }) | ||
const cache = new LRUCache({ | ||
max, | ||
@@ -30,0 +30,0 @@ ttl, |
import { expectAssignable } from 'tsd' | ||
import LRU from 'lru-cache' | ||
import type { LRUCache } from 'lru-cache' | ||
import buildGetJwks, { GetPublicKeyOptions, JWK, JWKSignature } from '../../src/get-jwks' | ||
@@ -10,3 +10,3 @@ | ||
expectAssignable<(options?: GetPublicKeyOptions) => Promise<string>>(getPublicKey) | ||
expectAssignable<LRU<string, JWK>>(cache) | ||
expectAssignable<LRU<string, JWK>>(staleCache) | ||
expectAssignable<LRUCache<string, JWK>>(cache) | ||
expectAssignable<LRUCache<string, JWK>>(staleCache) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50970
969
+ Addedlru-cache@9.1.2(transitive)
- Removedlru-cache@8.0.5(transitive)
Updatedlru-cache@^9.0.0