Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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') ```
- Loading branch information