Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Expose multihashing-async along with other deps #1974

Merged
merged 2 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ Aside from the default export, `ipfs` exports various types and utilities that a
- [`multiaddr`](https://www.npmjs.com/package/multiaddr)
- [`multibase`](https://www.npmjs.com/package/multibase)
- [`multihash`](https://www.npmjs.com/package/multihashes)
- [`multihashing`](https://www.npmjs.com/package/multihashing-async)
- [`multicodec`](https://www.npmjs.com/package/multicodec)
- [`CID`](https://www.npmjs.com/package/cids)

Expand Down
3 changes: 2 additions & 1 deletion src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const multihash = require('multihashes')
const PeerBook = require('peer-book')
const multibase = require('multibase')
const multicodec = require('multicodec')
const multihashing = require('multihashing-async')
const CID = require('cids')
const debug = require('debug')
const mergeOptions = require('merge-options')
Expand Down Expand Up @@ -178,7 +179,7 @@ module.exports = IPFS

// Note: We need to do this to force browserify to load the Buffer module
const BufferImpl = Buffer
Object.assign(module.exports, { crypto, isIPFS, Buffer: BufferImpl, CID, multiaddr, multibase, multihash, multicodec, PeerId, PeerInfo })
Object.assign(module.exports, { crypto, isIPFS, Buffer: BufferImpl, CID, multiaddr, multibase, multihash, multihashing, multicodec, PeerId, PeerInfo })

module.exports.createNode = (options) => {
return new IPFS(options)
Expand Down
2 changes: 2 additions & 0 deletions test/core/exports.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const CID = require('cids')
const multiaddr = require('multiaddr')
const multibase = require('multibase')
const multihash = require('multihashes')
const multihashing = require('multihashing-async')
const multicodec = require('multicodec')
const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
Expand All @@ -26,6 +27,7 @@ describe('exports', () => {
expect(Ipfs.multiaddr).to.equal(multiaddr)
expect(Ipfs.multibase).to.equal(multibase)
expect(Ipfs.multihash).to.equal(multihash)
expect(Ipfs.multihashing).to.equal(multihashing)
expect(Ipfs.multicodec).to.equal(multicodec)
expect(Ipfs.PeerId).to.equal(PeerId)
expect(Ipfs.PeerInfo).to.equal(PeerInfo)
Expand Down