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

Commit 693c0ce

Browse files
committed
chore: remove ipld formats re-export
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 `dag.dagPB` from public API
1 parent 9a37ac0 commit 693c0ce

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
"ipfs-unixfs": "~0.1.15",
118118
"ipfs-unixfs-engine": "~0.32.3",
119119
"ipld": "~0.17.3",
120-
"ipld-dag-cbor": "~0.12.1",
121120
"ipld-dag-pb": "~0.14.6",
122121
"ipns": "~0.2.0",
123122
"is-ipfs": "~0.4.2",

src/core/index.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +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')
87
const dagPB = require('ipld-dag-pb')
98
const crypto = require('libp2p-crypto')
109
const isIPFS = require('is-ipfs')
@@ -74,9 +73,7 @@ class IPFS extends EventEmitter {
7473
multiaddr: multiaddr,
7574
multibase: multibase,
7675
multihash: multihash,
77-
CID: CID,
78-
dagPB: dagPB,
79-
dagCBOR: dagCBOR
76+
CID: CID
8077
}
8178

8279
// IPFS Core Internals

test/core/init.spec.js

+1-5
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)