fix: insert "symbols" instead of null for deduped objects#251
fix: insert "symbols" instead of null for deduped objects#251juliusmarminge wants to merge 2 commits intoflightcontrolhq:mainfrom
null for deduped objects#251Conversation
| "[Circular *]", | ||
| ], | ||
| }, | ||
| "b": "[Pruned *]", |
There was a problem hiding this comment.
should this say [Pruned <path-where-the-node-is>] or something?
There was a problem hiding this comment.
Since we're adding this for the output to be more human-readable, I think we should take a string that's searchable + self-explanatory. I don't think Pruned cuts it. What do you think about something like[SuperJSON: Equal to <path.where.node>]?
Co-authored-by: Alex / KATT <alexander@n1s.se>
| // prevent circular references | ||
| return { | ||
| transformedValue: null, | ||
| transformedValue: '[Circular *]', |
There was a problem hiding this comment.
Let's also put the path to the object that's circular into here.
I don't regard the specific structure of the outputted JSON as being part of SuperJSON's API contract, so I don't think this would be a breaking change. I'd release this as a minor release. |
|
Excuse the late reply btw! My understanding is that this PR isn't urgent for your usecases, so I haven't prioritise this until now (I'm a bit under-water currently). If you need this more urgently, let me know and i'll try to prioritise it earlier. |
Resolves #247 (comment)
Not sure how you wanna do regarding semver?