-
Notifications
You must be signed in to change notification settings - Fork 13
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: support custom serialize & deserialize through options #22
feat: support custom serialize & deserialize through options #22
Conversation
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
I'm on it. Sorry for the delay. |
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
ooooh, of course... github is partially having problems. |
You probably meant if (err && err.code === 'EEXIST') {
reject(err)
return
}
reject(err) doesn't make any sense :) |
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
@borisdiakur I think I came up with good solution - adding The default behavior of error-ing remains when directory exists (and when there is invalid combination of cache dir and cache id), as seen in the tests. The other behavior is to pass |
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
@borisdiakur why there is |
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
🙈 Yes, it should have been salt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked out the MR and run the tests and two of them are failing:
2 failing
1) memoize-fs
check args
should throw an error when opts.serialize is not a function when passed:
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /serialize option of type function expected/. Input:
'Error: options of type object expected'
at Context.<anonymous> (test/test.js:20:14)
at processImmediate (internal/timers.js:456:21)
2) memoize-fs
check args
should throw an error when opts.deserialize is not a function when passed:
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /deserialize option of type function expected/. Input:
'Error: options of type object expected'
Can you check what is going on? We are almost there 🙂
I think you just need to rename object
to function
in the two tests.
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Updated the docs too. |
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
Done. :) Hope it's great now! 🎉 |
It’s almost great 😅 Regarding the Or I can also paste it here:
|
Aahh. That's... strange thing. But yea, the nyc's recipe is also doing it that way so.. Ok. |
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
🎉 🌮 |
Nice work @tunnckoCore ! 🚀 I’m adding a few (minor) final touches and will publish a new version soon. Thanks a lot for contributing! 🙏 |
Great! Thanks you too :) 🙌 I have more in the pocket ;p But that's okay for now. |
Duh. Finished.
partially addresses and resolves #21