Repository navigation
Replace lru-cache with internal implementation - #343
tommy-mitchell wants to merge 2 commits into
Conversation
lru-cachelru-cache with internal implementation
c4090ba to
5302944
Compare
|
I opened #347 as an independent draft for an existing cache behavior worth preserving here.
The draft uses an internal
If this PR moves forward, it would be useful to incorporate that behavior too. The proposed Map implementation can retain the The fix is independent of whether the external cache dependency is retained or replaced, so the two changes should be straightforward to coordinate. |
I'd be happy to either modify this PR or put up a follow-up PR depending on which goes in first :) |
Replaces the
lru-cachedependency with a minimal internal implementation usingMapbased onnode-semver's implementation (see npm/node-semver#704). Only the functions used in the cache have been implemented.Tests have been added that reflect actual usage (see npm/node-semver#697 (comment)).
Motivation
hosted-git-infohas an install size of over 3MB due to thelru-cachedependency: