Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
chore: remove ipld formats re-export (#872)
Browse files Browse the repository at this point in the history
Prior to this change the `ipld-dag-cbor` and `ipld-dag-pb` modules
are re-exported so that can be accessed within the Browser bundle.
Those modules normally don't need to be used directly, they are
kind of implementation details of IPLD. Hence remove them.

BREAKING CHANGE: remove `types.dagCBOR` and `types.dagPB` from public API

If you need the `ipld-dag-cbor` or `ipld-dag-pb` module in the Browser,
you need to bundle them yourself.
  • Loading branch information
vmx authored and Alan Shaw committed Oct 29, 2018
1 parent ef49e95 commit c534375
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions src/types.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
'use strict'

const CID = require('cids')
const dagCBOR = require('ipld-dag-cbor')
const dagPB = require('ipld-dag-pb')
const multiaddr = require('multiaddr')
const multibase = require('multibase')
const multihash = require('multihashes')
Expand All @@ -12,8 +10,6 @@ const PeerInfo = require('peer-info')
module.exports = () => ({
Buffer: Buffer,
CID: CID,
dagPB: dagPB,
dagCBOR: dagCBOR,
multiaddr: multiaddr,
multibase: multibase,
multihash: multihash,
Expand Down
6 changes: 1 addition & 5 deletions test/types.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const dagCBOR = require('ipld-dag-cbor')
const dagPB = require('ipld-dag-pb')
const multiaddr = require('multiaddr')
const multibase = require('multibase')
const multihash = require('multihashes')
Expand Down Expand Up @@ -47,9 +45,7 @@ describe('.types', function () {
multiaddr: multiaddr,
multibase: multibase,
multihash: multihash,
CID: CID,
dagPB: dagPB,
dagCBOR: dagCBOR
CID: CID
})
})
})

0 comments on commit c534375

Please sign in to comment.