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

fix(prefixStorage): wrap shorthand aliases #556

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

CorentinTh
Copy link
Contributor

@CorentinTh CorentinTh commented Dec 29, 2024

When creating a prefixed storage, the get, set, has, del, remove aliases don't work as intended (they do not get the defined prefixe) as they are not defined in the storageKeyProperties in https://github.com/unjs/unstorage/blob/main/src/utils.ts

  • Added get, set, has, del, remove in storageKeyProperties
  • Added regression tests

Related with breaking changes : #455

Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.91%. Comparing base (4d61c78) to head (8795703).
Report is 155 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #556      +/-   ##
==========================================
- Coverage   65.05%   58.91%   -6.15%     
==========================================
  Files          39       43       +4     
  Lines        4055     3680     -375     
  Branches      487      588     +101     
==========================================
- Hits         2638     2168     -470     
- Misses       1408     1508     +100     
+ Partials        9        4       -5     

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

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thnx ❤️

@pi0 pi0 changed the title fix(utils): add support for storage methods aliases in prefixed storage fix(prefixStorage): wrap shorthand aliases Dec 30, 2024
@pi0 pi0 merged commit 5af560b into unjs:main Dec 30, 2024
3 of 4 checks passed
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.

2 participants