Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pass lru options through #555

Closed
wants to merge 1 commit into from
Closed

feat: pass lru options through #555

wants to merge 1 commit into from

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Dec 29, 2024

Fixes #466

This changes the lru-cache such that the following methods accept LRU options (and pass them through to the underlying methods):

  • setItem
  • setItemRaw
  • hasItem

Fixes unjs#466

This changes the `lru-cache` such that the following methods accept LRU
options (and pass them through to the underlying methods):

- `setItem`
- `setItemRaw`
- `hasItem`
Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.84%. Comparing base (4d61c78) to head (84259f6).
Report is 155 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #555      +/-   ##
==========================================
- Coverage   65.05%   58.84%   -6.22%     
==========================================
  Files          39       43       +4     
  Lines        4055     3676     -379     
  Branches      487      587     +100     
==========================================
- Hits         2638     2163     -475     
- Misses       1408     1509     +101     
+ Partials        9        4       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pi0
Copy link
Member

pi0 commented Dec 30, 2024

I appreciate the PR but I want to wait for v2 to standardize opts namespace before exposing more possible options (otherwise we introduce a feature that will be shortly broken) -- PS: we might want to limit some of options for lru.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support LRU Cache method level opts parameters
2 participants