isaacs / node-lru-cache

A fast cache that automatically deletes the least recently used items
http://isaacs.github.io/node-lru-cache/
ISC License
5.38k stars 353 forks source link

CHANGELOG didn't mention breaking change to dispose option? #241

Closed tunniclm closed 2 years ago

tunniclm commented 2 years ago

I was upgrading to latest LRUCache (from v5.x to v7.x) and didn't spot that the parameter order for the function option dispose has changed from (key, value) to (value, key, reason). I probably would have spotted this if it were mentioned in the breaking changes for v7.0.0 in the CHANGELOG, would you consider adding a note about this?

Also, I see that del() got (mostly) removed from the README, should it be avoided now/is it deprecated?

isaacs commented 2 years ago

Any PR you want to add to the changelog in the v7 section https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md#v7---2022-02 would be welcome, sure.

tunniclm commented 2 years ago

Sure! Been a bit busy this week, here it is: https://github.com/isaacs/node-lru-cache/pull/242

isaacs commented 2 years ago

Fixed by #242, thanks!