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

Commit 3ee7b5e

Browse files
vmxAlan Shaw
authored and
Alan Shaw
committed
chore: remove ipld formats re-export (#1626)
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.
1 parent fd8da80 commit 3ee7b5e

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@
109109
"ipfs-unixfs": "~0.1.15",
110110
"ipfs-unixfs-engine": "~0.32.3",
111111
"ipld": "~0.17.3",
112-
"ipld-dag-cbor": "~0.12.1",
113112
"ipld-dag-pb": "~0.14.6",
114113
"ipns": "~0.3.0",
115114
"is-ipfs": "~0.4.2",

src/core/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ const BlockService = require('ipfs-block-service')
44
const Ipld = require('ipld')
55
const PeerId = require('peer-id')
66
const PeerInfo = require('peer-info')
7-
const dagCBOR = require('ipld-dag-cbor')
8-
const dagPB = require('ipld-dag-pb')
97
const crypto = require('libp2p-crypto')
108
const isIPFS = require('is-ipfs')
119
const multiaddr = require('multiaddr')
@@ -74,9 +72,7 @@ class IPFS extends EventEmitter {
7472
multiaddr: multiaddr,
7573
multibase: multibase,
7674
multihash: multihash,
77-
CID: CID,
78-
dagPB: dagPB,
79-
dagCBOR: dagCBOR
75+
CID: CID
8076
}
8177

8278
// IPFS Core Internals

test/core/init.spec.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ const isNode = require('detect-node')
1010
const hat = require('hat')
1111
const PeerId = require('peer-id')
1212
const PeerInfo = require('peer-info')
13-
const dagCBOR = require('ipld-dag-cbor')
14-
const dagPB = require('ipld-dag-pb')
1513
const crypto = require('libp2p-crypto')
1614
const isIPFS = require('is-ipfs')
1715
const multiaddr = require('multiaddr')
@@ -122,9 +120,7 @@ describe('init', () => {
122120
multiaddr: multiaddr,
123121
multibase: multibase,
124122
multihash: multihash,
125-
CID: CID,
126-
dagPB: dagPB,
127-
dagCBOR: dagCBOR
123+
CID: CID
128124
})
129125
})
130126

0 commit comments

Comments
 (0)