fix: add colon to redis deprefix
Resolves #585
out of interest, how did you bump into this? do you use the driver directly? i.e. rather than Storage
i think your fix makes sense, but getKeys in the result of createStorage(...) already strips : from the start of these keys
so would be good to know what situation you were in where you got the underlying key, rather than the one Storage has already normalised
I copied the code for the redis driver and used it as a custom driver, however the implementation of d() and p() remained unchanged(it was simply copy-pasted) and it didn't support the colon removal.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 60.28%. Comparing base (
70310f9) to head (87ed4c1). Report is 8 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #586 +/- ##
==========================================
+ Coverage 59.99% 60.28% +0.28%
==========================================
Files 42 42
Lines 3657 3681 +24
Branches 590 597 +7
==========================================
+ Hits 2194 2219 +25
+ Misses 1460 1459 -1
Partials 3 3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
so you used it directly rather than via Storage/createStorage?
good to know if so!
basically if you make it via createStorage, it will normalise those keys for you and strip the : already.
though i still think its a good idea for the driver itself to do that 👍
Well, I did use createStorage, but I also used a custom redis driver, whose entire implementation was copied from the standard redis driver used by unstorage
So, the code looks like
createStorage({driver: myRedisDriver(...)})