Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 886b06d

Browse files
hugomrdiasvmx
authored andcommitted
fix: cleanup and remove deps
1 parent 3048e3e commit 886b06d

File tree

6 files changed

+33
-60
lines changed

6 files changed

+33
-60
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.npmignore

Lines changed: 0 additions & 34 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ to
496496

497497
### Features
498498

499-
* upgrade to new ipfs-block and blockservice ([1dd4dd2](https://github.com/ipld/js-ipld-dag-pb/commit/1dd4dd2))
499+
* upgrade to new ipld-block and blockservice ([1dd4dd2](https://github.com/ipld/js-ipld-dag-pb/commit/1dd4dd2))
500500

501501

502502

package.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
"coverage": "aegir coverage",
1818
"coverage-publish": "aegir coverage publish"
1919
},
20+
"files": [
21+
"src",
22+
"dist"
23+
],
2024
"pre-push": [
2125
"lint-commits",
2226
"lint",
@@ -66,24 +70,23 @@
6670
"npm": ">=3.0.0"
6771
},
6872
"dependencies": {
69-
"cids": "~0.8.0",
7073
"buffer": "^5.5.0",
74+
"cids": "~0.8.0",
7175
"class-is": "^1.1.0",
72-
"multicodec": "^1.0.0",
73-
"multihashing-async": "~0.8.0",
74-
"protons": "^1.1.0",
75-
"stable": "~0.1.8"
76+
"multicodec": "^1.0.1",
77+
"multihashing-async": "~0.8.1",
78+
"protons": "^1.0.2"
7679
},
7780
"devDependencies": {
78-
"aegir": "^21.0.1",
79-
"bs58": "^4.0.1",
81+
"aegir": "^21.4.5",
8082
"chai": "^4.2.0",
81-
"detect-node": "^2.0.4",
8283
"dirty-chai": "^2.0.1",
8384
"fs-extra": "^9.0.0",
84-
"ipfs-block": "~0.8.1",
85-
"ipfs-block-service": "~0.17.0",
86-
"ipfs-repo": "^1.0.0",
87-
"multihashes": "~0.4.15"
85+
"ipfs-block-service": "~0.16.0",
86+
"ipfs-repo": "ipfs/js-ipfs-repo#fix/remove-node-globals",
87+
"ipfs-utils": "^1.2.1",
88+
"ipld-block": "~0.9.1",
89+
"multibase": "^0.7.0",
90+
"multihashes": "~0.4.19"
8891
}
8992
}

test/browser.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ const IPFSRepo = require('ipfs-repo')
77

88
const basePath = 'ipfs' + Math.random()
99

10-
const idb = self.indexedDB ||
11-
self.mozIndexedDB ||
12-
self.webkitIndexedDB ||
13-
self.msIndexedDB
14-
10+
const idb = self.indexedDB
1511
idb.deleteDatabase(basePath)
1612
idb.deleteDatabase(basePath + '/blocks')
1713

test/dag-node-test.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ chai.use(dirtyChai)
1010
const dagPB = require('../src')
1111
const DAGLink = dagPB.DAGLink
1212
const DAGNode = dagPB.DAGNode
13-
const isNode = require('detect-node')
13+
const { isNode } = require('ipfs-utils/src/env')
1414
const multihash = require('multihashes')
1515
const multicodec = require('multicodec')
1616
const multihashing = require('multihashing-async')
1717

1818
const BlockService = require('ipfs-block-service')
19-
const Block = require('ipfs-block')
19+
const Block = require('ipld-block')
2020
const CID = require('cids')
21+
const multibase = require('multibase')
2122
const bs58 = require('bs58')
2223
const loadFixture = require('aegir/fixtures')
2324

@@ -472,11 +473,19 @@ module.exports = (repo) => {
472473
Hash: 'QmP7SrR76KHK9A916RbHG1ufy2TzNABZgiE23PjZDMzZXy',
473474
Size: 262158
474475
}
475-
476-
const link1 = new DAGLink(l1.Name, l1.Tsize,
477-
Buffer.from(bs58.decode(l1.Hash)))
478-
const link2 = new DAGLink(l2.Name, l2.Tsize,
479-
Buffer.from(bs58.decode(l2.Hash)))
476+
console.log(multibase.decode('z' + l1.Hash), bs58.decode(l1.Hash))
477+
const link1 = new DAGLink(
478+
l1.Name,
479+
l1.Tsize,
480+
multibase.decode('z' + l1.Hash)
481+
// Buffer.from(bs58.decode(l1.Hash))
482+
)
483+
const link2 = new DAGLink(
484+
l2.Name,
485+
l2.Tsize,
486+
multibase.decode('z' + l2.Hash)
487+
// Buffer.from(bs58.decode(l2.Hash))
488+
)
480489

481490
const node = new DAGNode(Buffer.from('hiya'), [link1, link2])
482491
expect(node.Links).to.have.lengthOf(2)

0 commit comments

Comments
 (0)