You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following commit message is mostly copied from cea9063:
feat!: named exports instead of default exports
It also removes the `Codec` class and exports a plain object
instead. This has consequences for imports.
BREAKING CHANGE:
Only use names exports as default exports don't play well with
CommonJS + Typescript typing.
This means that when you use ESM imports, e.g. the raw codec is
no longer imported as
```js
import raw from 'multiformats/codecs/raw'
```
but as
```js
import * as raw from 'multiformats/codecs/raw'
```
The CJS import for codecs don't change, it's still `const raw = require('multiformats/codecs/raw`.
Though other imports change, so
```js
import CID from 'multiformats/cid'
const CID = require('multiformats/cid')
```
is now
```js
import { CID } from 'multiformats/cid'
const { CID } = require ('multiformats/cid')
```
Copy file name to clipboardExpand all lines: README.md
-1
Original file line number
Diff line number
Diff line change
@@ -196,4 +196,3 @@ Licensed under either of
196
196
### Contribution
197
197
198
198
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
0 commit comments