Closed rvagg closed 2 years ago
Marking this as breaking since this changes an error behaviour that's been active since v3 of this library so it's possible that this strictness is being relied upon, somewhere, by someone.
:tada: This PR is included in version 7.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thank you @rvagg!
Ref: https://github.com/ipld/js-dag-cbor/issues/44 (read this if you want the background) Ref: https://github.com/ipld/go-ipld-prime/pull/308
This is a WIP because I don't have the tools to easily perform a coercion yet; I need to do something in cborg so I don't have to get dirty with the token stream, which is currently the only way to do this here. It may be as simple as acoerceUndefinedToNull
option or something like that, or there may be a straightforward way to have a type translation option like I have for the encoder side, which is quite a nice feature.Currently tests are failing because it doesn't coerce, but lets theundefined
through, but the tests are in place and they'll pass as soon as the rest is done.Using the new
coerceUndefinedToNull
option in cborg to do the dirty work. See #44 for more info.