Issue with `equals` since 3.0.0 with `fast-deep-equal`
silverwind opened this issue · 3 comments
silverwind commented
After upgrading from 2.0.0 to 3.0.1, various unit tests on memoized functions started to fail for me. I'm using fast-deep-equal as the comparison function, e.g.:
import fastDeepEqual from "fast-deep-equal";
import nanomemoize from "nano-memoize";
const memoFn = fn => nanomemoize(fn, {equals: fastDeepEqual});
I see the README mentions this specific issue with other modules but does not mention this module yet, so I thought I mention it.
anywhichway commented
Sorry about this. I will look into this module later today. I do have some equals working at the unit test level but not at scale. Very odd.
Sent from my T-Mobile 5G Device
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: silverwind ***@***.***>
Sent: Tuesday, January 31, 2023 7:24:42 AM
To: anywhichway/nano-memoize ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [anywhichway/nano-memoize] Issue with `equals` since 3.0.0 (Issue #52)
After upgrading from 2.0.0 to 3.0.1, various unit tests on memoized functions started to fail for me. I'm using fast-deep-equal<https://github.com/epoberezkin/fast-deep-equal> as the comparison function, e.g.:
nanomemoize(fn, {equals: deepEqual})
I see the README mentions this specific issue with other modules but does not mention this module yet, so I thought I mention it.
—
Reply to this email directly, view it on GitHub<#52>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABF2US4IVSV3NDUIE6BPEILWVEHBVANCNFSM6AAAAAAUMN2HRM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
anywhichway commented
@silverwind I believe this is fixed. Please confirms with v3.0.2.
silverwind commented
Yes, thanks. My unit tests are working again with v3.0.2.