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

Commit c0f5298

Browse files
committed
chore: use ipfs.dag api instead of ipfs._ipld
License: MIT Signed-off-by: achingbrain <alex@achingbrain.net>
1 parent b07c799 commit c0f5298

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"filereader-stream": "^2.0.0",
5656
"interface-datastore": "~0.4.2",
5757
"ipfs-unixfs": "~0.1.15",
58-
"ipfs-unixfs-engine": "~0.31.2",
58+
"ipfs-unixfs-engine": "~0.31.3",
5959
"is-pull-stream": "~0.0.0",
6060
"is-stream": "^1.1.0",
6161
"joi": "^13.4.0",

src/core/read-pull-stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = (ipfs) => {
4040

4141
waterfall([
4242
(next) => pull(
43-
exporter(node.multihash, ipfs._ipld, {
43+
exporter(node.multihash, ipfs.dag, {
4444
offset: options.offset,
4545
length: options.length
4646
}),

src/core/write/import-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const importStream = (ipfs, source, options, callback) => {
1515
values([{
1616
content: pull(source)
1717
}]),
18-
importer(ipfs._ipld, {
18+
importer(ipfs.dag, {
1919
progress: options.progress,
2020
hashAlg: options.hashAlg,
2121
cidVersion: options.cidVersion,

src/core/write/truncate-node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const truncateNode = (ipfs, dagNode, newLength, options, callback) => {
1515
log(`Truncating ${dagNode.multihash} to ${newLength} bytes`)
1616

1717
pull(
18-
exporter(dagNode.multihash, ipfs._ipld, {
18+
exporter(dagNode.multihash, ipfs.dag, {
1919
offset: 0,
2020
length: newLength
2121
}),
@@ -24,7 +24,7 @@ const truncateNode = (ipfs, dagNode, newLength, options, callback) => {
2424
values([{
2525
content: file.content
2626
}]),
27-
importer(ipfs._ipld, {
27+
importer(ipfs.dag, {
2828
progress: options.progress,
2929
hashAlg: options.hash,
3030
cidVersion: options.cidVersion,

0 commit comments

Comments
 (0)