ipld / js-dag-cbor

dag-cbor codec for IPLD
Other
26 stars 17 forks source link

feat!: export object instead of default export #16

Closed vmx closed 3 years ago

vmx commented 3 years ago

Default exports don't work well with CommonJS and TypeScript. Hence replace the default export with an object export.

BREAKING CHANGE: import of dag-cbor changed

Prior to this change this module was imported as

import dagcbor from '@ipld/dag-cbor'

Now it is imported as

import * as dagcbor from `@ipld/dag-cbor'
vmx commented 3 years ago

This is a change along the lines of https://github.com/multiformats/js-multiformats/pull/70.

rvagg commented 3 years ago

building further on this in #18

rvagg commented 3 years ago

squashed this into #18 and published