Update node, redis lib; deprecate hydration lib
Hey! Awesome lib. We made a few tweaks to get this working on more modern versions of node. Build is happily passing:
https://travis-ci.org/QulinaryOrg/node-stow
Hey, thanks for the PR! Glad to know someone else is getting some good use out of stow, it's been successfully humming along for us for years.
The one thing blocking me from immediately merging this is the deprecation on hydration. This would be a huge breaking change for anyone (possibly me) relying on proper serialization of Date and RegExp objects. At best this would be a divergence from the current API and a Major version update, at worst a deal-breaker.
I wonder if there is a more up-to-date serialization approach that supports native JS types or if we can get hydration updated so we can still use it.
@carlos8f
Also probably worth removing the engines field altogether and making sure it runs on node 4.x also (sinces that's the new stable build).
Note: I'm fine with the switch to plain redis, since this already supports client which could be an haredis client anyhow.
Great, thanks for quick comments, @cpsubrian Do you have a test case (or high-level description ... I can write the test) of what is needed regarding serialization support? The changes didn't fail any existing test cases, hence didn't think it was a breaking change.
This looks promising: https://github.com/skeeto/resurrect-js
Yeah this is a case where there were implied requirements not in the tests, my bad! I think we'd want to add a test with a cached object that has Date and RegExp objects in them and make sure that when they are retrieved from the cache they are re-instantiated properly. Of note is the fact that hydration is recursive, so a Date 4 levels deep in an object will still be properly handled.
Agreed that resurrect looks promising.
Also, I'm giving you commit access here, but I'd still like to discuss changes in the form of PRs.
Why this pull request was abandoned?