jaredwray/cacheable

Version 5.7.2 requires node >= 20

pandemonia opened this issue ยท 4 comments

Describe the bug
lru-cache has been updated to 11.0.0 with version 5.7.2, but this version drops support for node 18. Looks to me that the lru-cache version change should be a major version upgrade on cache-manager as well.

How To Reproduce (best to provide workable code or tests!)
Attempting to add the package in a node-18 environment fails:

โฏ yarn add cache-manager                                                                                                                                             18:11:40
yarn add v1.22.19
info No lockfile found.
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
error lru-cache@11.0.0: The engine "node" is incompatible with this module. Expected version "20 || >=22". Got "18.20.3"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

โฏ node --version                                                                                                                                                     18:11:44
v18.20.3

@pandemonia - did you have issues with running it as our tests said it was ok.

@jaredwray I hadn't checked that, and to clarify my concern here isn't with the package functionality. The change in minimum node version to 20 (from to lru-cache@11.0.0) means that this version of cache-manager cannot be added in package using a node 18 runtime.

ie, these two are incompatible:
Screenshot 2024-07-12

To get this version working in my application running on node 18 I will need to pass --ignore-engines to yarn, which is not a workaround that should be required here.

This is because lru-cache has changed the minimum version of the nodes to >= 20

isaacs/node-lru-cache@7965d88

Version 5.7.X should continue with the lru-cahe in ^10.2.2

@pandemonia @victororozco - this has now been resolved as we reverted back. Please use cache-manager@5.7.3