multiformats / js-cid

CID implementation in JavaScript
MIT License
97 stars 39 forks source link

feat: export `CID` #115

Closed bluelovers closed 3 years ago

bluelovers commented 4 years ago

avoid typescript esModuleInterop issues

jacobheun commented 4 years ago

This is likely related to https://github.com/multiformats/js-multiformats/pull/18

rvagg commented 4 years ago

This is to avoid the default-exports problem, right @bluelovers? Over at https://github.com/ipld/team-mgmt/issues/81#issuecomment-656991864 I was suggesting that as we go forward with ESM we might want to avoid default exports entirely where possible because of the dramas surrounding it. I imagine this is the same sort of problem but it only arises when using TypeScript (or other faux-ESM solutions?). I'm not clear on that part and how you'd trigger a problem with this package because it's not ESM but I think I'm starting to be a fan of exporting explicitly things for the next year or two!

Gozala commented 3 years ago

So many things have changed here that, I don't think thing is going to work anymore. I think the option moving forward is to address this, if it is an issue, in https://github.com/multiformats/js-multiformats

Hopefully soon enough we'll migrate to the new CIDs from there.