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

Commit

Permalink
chore: remove ipld formats re-export (#1626)
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.

Now `ipld-dag-cbor` isn't a direct dependency of `jsipfs` anymore.

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 fd8da80 commit 3ee7b5e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
"ipfs-unixfs": "~0.1.15",
"ipfs-unixfs-engine": "~0.32.3",
"ipld": "~0.17.3",
"ipld-dag-cbor": "~0.12.1",
"ipld-dag-pb": "~0.14.6",
"ipns": "~0.3.0",
"is-ipfs": "~0.4.2",
Expand Down
6 changes: 1 addition & 5 deletions src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const BlockService = require('ipfs-block-service')
const Ipld = require('ipld')
const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const dagCBOR = require('ipld-dag-cbor')
const dagPB = require('ipld-dag-pb')
const crypto = require('libp2p-crypto')
const isIPFS = require('is-ipfs')
const multiaddr = require('multiaddr')
Expand Down Expand Up @@ -74,9 +72,7 @@ class IPFS extends EventEmitter {
multiaddr: multiaddr,
multibase: multibase,
multihash: multihash,
CID: CID,
dagPB: dagPB,
dagCBOR: dagCBOR
CID: CID
}

// IPFS Core Internals
Expand Down
6 changes: 1 addition & 5 deletions test/core/init.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const isNode = require('detect-node')
const hat = require('hat')
const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const dagCBOR = require('ipld-dag-cbor')
const dagPB = require('ipld-dag-pb')
const crypto = require('libp2p-crypto')
const isIPFS = require('is-ipfs')
const multiaddr = require('multiaddr')
Expand Down Expand Up @@ -122,9 +120,7 @@ describe('init', () => {
multiaddr: multiaddr,
multibase: multibase,
multihash: multihash,
CID: CID,
dagPB: dagPB,
dagCBOR: dagCBOR
CID: CID
})
})

Expand Down

0 comments on commit 3ee7b5e

Please sign in to comment.