Open Gozala opened 4 years ago
@mikeal do you mind creating a markdown file in the repo that warning could point at. I think you have much clear understanding of this than anyone else.
We have this https://github.com/multiformats/js-multiformats#cid, we can extend it to handle this with an example like we talked about or do you feel strongly about having a markdown file in this repo?
We should emit a warning first time
.codec
property is accessed, that provides link to the instructions for migration from.codec
to.code
. Current plan is to have it indefinitely, that is until we ipfs ecosystem migrates tojs-multiformats
.The reason we want warnings is because users usually get
CID
e.g. by callingconst { cid } = await ipfs.add(...)
, so this could provide room for migration instead of clean break.