blitz-js / superjson

Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.
MIT License
3.88k stars 83 forks source link

bug repro with dedupe=true #253

Closed KATT closed 9 months ago

KATT commented 11 months ago

We found a bug with dedupe option.

I'm sorry for this repro, it's awful and huge and bloated. Haven't narrowed it down more, but AFAICT, the results of these should be equal but they aren't.

The problem shows in the diff between non-deduped and deduped; some values stay as null after deserializing the deduped one.

Skn0tt commented 9 months ago

Finally got around to take a look at this. It was a nifty small bug, definitely a fun sherlocking adventure! :D

I put some prose as to what's happening into the test in https://github.com/blitz-js/superjson/pull/253/commits/593841d5901f2d4409865e11122843b6745350e9, if you're curious.

Skn0tt commented 9 months ago

released in https://github.com/blitz-js/superjson/releases/tag/v1.13.3