Skip to content

Commit 2382468

Browse files
authored
chore: update dep version and ignore interop test for raw leaves (ipfs#2747)
BREAKING CHANGE: Files that fit into one block imported with either `--cid-version=1` or `--raw-leaves=true` previously returned a CID that resolved to a raw node (e.g. a buffer). Returned CIDs now resolve to a `dag-pb` node that contains a UnixFS entry. This is to allow setting metadata on small files with CIDv1.
1 parent e2b2a9c commit 2382468

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@
100100
"ipfs-mfs": "^1.0.0",
101101
"ipfs-multipart": "^0.3.0",
102102
"ipfs-repo": "^0.30.1",
103-
"ipfs-unixfs": "^0.3.0",
104-
"ipfs-unixfs-exporter": "^0.41.0",
105-
"ipfs-unixfs-importer": "^0.44.0",
103+
"ipfs-unixfs": "^1.0.0",
104+
"ipfs-unixfs-exporter": "^1.0.0",
105+
"ipfs-unixfs-importer": "^1.0.0",
106106
"ipfs-utils": "^0.7.2",
107107
"ipld": "^0.25.0",
108108
"ipld-bitcoin": "^0.3.0",
@@ -182,7 +182,7 @@
182182
"go-ipfs-dep": "0.4.23-3",
183183
"hat": "0.0.3",
184184
"interface-ipfs-core": "^0.132.0",
185-
"ipfs-interop": "^1.0.0",
185+
"ipfs-interop": "github:ipfs/interop#disable-small-file-with-raw-leaves-test",
186186
"ipfsd-ctl": "^3.0.0",
187187
"it-first": "^1.0.1",
188188
"ncp": "^2.0.0",

test/core/files.spec.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,6 @@ describe('files', function () {
3838
cidVersion: 1
3939
}))
4040

41-
expect(files.length).to.equal(1)
42-
expect(files[0].cid.toString()).to.equal('bafkreifojmzibzlof6xyh5auu3r5vpu5l67brf3fitaf73isdlglqw2t7q')
43-
expect(files[0].size).to.equal(3)
44-
})
45-
46-
it('should add a file with a v1 CID and not raw leaves', async () => {
47-
const files = await all(ipfs.add(Buffer.from([0, 1, 2]), {
48-
cidVersion: 1,
49-
rawLeaves: false
50-
}))
51-
5241
expect(files.length).to.equal(1)
5342
expect(files[0].cid.toString()).to.equal('bafybeide2caf5we5a7izifzwzz5ds2gla67vsfgrzvbzpnyyirnfzgwf5e')
5443
expect(files[0].size).to.equal(11)

0 commit comments

Comments
 (0)