node-jwks-rsa
node-jwks-rsa copied to clipboard
Update lru-memoizer
Checklist
- [X] I have looked into the Readme and Examples, and have not found a suitable solution or answer.
- [X] I have searched the issues and have not found a suitable solution or answer.
- [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- [X] I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
This library is using an outdated version of lru-memoizer, which in turn has a dependency on lru-cache. The lru-cache version it is using is pretty outdated and is no longer compatible with new versions, as a result applications depending on packages that use different versions break when bundling them.
Describe the ideal solution
Ideally lru-memoizer would update its dependency on lru-cache to the latests version, but I opened this issue two weeks ago https://github.com/jfromaniello/lru-memoizer/issues/32 and I'm not sure if thats going to happen.
lru-memoizer has been updated to version 3.0 which uses the latests lru-cache version, therefore it could be updated. Option maxAge has changed to ttl.
Alternatives and current workarounds
Since the breaking change is that the default export was removed, it can be added back:
import * as LRU from 'lru-cache';
LRU.default = LRU.LRUCache;
Additional context
No response