Skip to content

Commit 3ca0bf9

Browse files
committed
fix: update deps and remove lodash
1 parent f955829 commit 3ca0bf9

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ stages:
66
- cov
77

88
node_js:
9-
- '10'
109
- '12'
10+
- '10'
1111

1212
os:
1313
- linux

Diff for: package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -43,31 +43,31 @@
4343
"npm": ">=3.0.0"
4444
},
4545
"devDependencies": {
46-
"aegir": "^21.4.5",
46+
"aegir": "^21.8.1",
4747
"chai": "^4.2.0",
4848
"dirty-chai": "^2.0.1",
49-
"lodash": "^4.17.11",
49+
"just-range": "^2.1.0",
5050
"memdown": "^5.1.0",
5151
"multihashes": "~0.4.15",
5252
"multihashing-async": "~0.8.0",
5353
"ncp": "^2.0.0",
5454
"rimraf": "^3.0.0",
55-
"sinon": "^9.0.1"
55+
"sinon": "^9.0.2"
5656
},
5757
"dependencies": {
5858
"bignumber.js": "^9.0.0",
5959
"buffer": "^5.5.0",
6060
"bytes": "^3.1.0",
61-
"cids": "^0.8.0",
62-
"datastore-core": "~0.7.0",
61+
"cids": "~0.8.0",
62+
"datastore-core": "^1.0.0",
6363
"datastore-fs": "~0.9.0",
64-
"datastore-idb": "github:ipfs/js-datastore-idb#master",
64+
"datastore-idb": "^1.0.0",
6565
"datastore-level": "~0.14.0",
6666
"debug": "^4.1.0",
6767
"err-code": "^2.0.0",
68-
"interface-datastore": "^0.8.2",
69-
"ipfs-repo-migrations": "ipfs/js-ipfs-repo-migrations#fix/remove-node-globals",
70-
"ipfs-utils": "^1.2.0",
68+
"interface-datastore": "^0.8.3",
69+
"ipfs-repo-migrations": "^0.2.0",
70+
"ipfs-utils": "^2.2.0",
7171
"ipld-block": "^0.9.1",
7272
"just-safe-get": "^2.0.0",
7373
"just-safe-set": "^2.1.0",

Diff for: test/blockstore-test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const expect = chai.expect
99
const assert = chai.assert
1010
const Block = require('ipld-block')
1111
const CID = require('cids')
12-
const _ = require('lodash')
12+
const range = require('just-range')
1313
const multihashing = require('multihashing-async')
1414
const Key = require('interface-datastore').Key
1515
const tempDir = require('ipfs-utils/src/temp-dir')
@@ -18,7 +18,7 @@ const IPFSRepo = require('../')
1818

1919
module.exports = (repo) => {
2020
describe('blockstore', () => {
21-
const blockData = _.range(100).map((i) => Buffer.from(`hello-${i}-${Math.random()}`))
21+
const blockData = range(100).map((i) => Buffer.from(`hello-${i}-${Math.random()}`))
2222
const bData = Buffer.from('hello world')
2323
let b
2424

@@ -53,16 +53,16 @@ module.exports = (repo) => {
5353

5454
it('massive multiwrite', async function () {
5555
this.timeout(15000) // add time for ci
56-
const hashes = await Promise.all(_.range(100).map((i) => multihashing(blockData[i], 'sha2-256')))
57-
await Promise.all(_.range(100).map((i) => {
56+
const hashes = await Promise.all(range(100).map((i) => multihashing(blockData[i], 'sha2-256')))
57+
await Promise.all(range(100).map((i) => {
5858
const block = new Block(blockData[i], new CID(hashes[i]))
5959
return repo.blocks.put(block)
6060
}))
6161
})
6262

6363
it('.putMany', async function () {
6464
this.timeout(15000) // add time for ci
65-
const blocks = await Promise.all(_.range(50).map(async (i) => {
65+
const blocks = await Promise.all(range(50).map(async (i) => {
6666
const d = Buffer.from('many' + Math.random())
6767
const hash = await multihashing(d, 'sha2-256')
6868
return new Block(d, new CID(hash))
@@ -151,7 +151,7 @@ module.exports = (repo) => {
151151

152152
it('massive read', async function () {
153153
this.timeout(15000) // add time for ci
154-
await Promise.all(_.range(20 * 100).map(async (i) => {
154+
await Promise.all(range(20 * 100).map(async (i) => {
155155
const j = i % blockData.length
156156
const hash = await multihashing(blockData[j], 'sha2-256')
157157
const block = await repo.blocks.get(new CID(hash))

Diff for: test/datastore-test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ const { Buffer } = require('buffer')
66
const chai = require('chai')
77
chai.use(require('dirty-chai'))
88
const expect = chai.expect
9-
const _ = require('lodash')
9+
const range = require('just-range')
1010
const Key = require('interface-datastore').Key
1111

1212
module.exports = (repo) => {
1313
describe('datastore', () => {
14-
const dataList = _.range(100).map((i) => Buffer.from(`hello-${i}-${Math.random()}`))
14+
const dataList = range(100).map((i) => Buffer.from(`hello-${i}-${Math.random()}`))
1515
const data = Buffer.from('hello world')
1616
const b = new Key('hello')
1717

@@ -26,7 +26,7 @@ module.exports = (repo) => {
2626

2727
it('massive multiwrite', async function () {
2828
this.timeout(15000) // add time for ci
29-
await Promise.all(_.range(100).map((i) => {
29+
await Promise.all(range(100).map((i) => {
3030
return repo.datastore.put(new Key('hello' + i), dataList[i])
3131
}))
3232
})
@@ -40,7 +40,7 @@ module.exports = (repo) => {
4040

4141
it('massive read', async function () {
4242
this.timeout(15000) // add time for ci
43-
await Promise.all(_.range(20 * 100).map(async (i) => {
43+
await Promise.all(range(20 * 100).map(async (i) => {
4444
const j = i % dataList.length
4545
const val = await repo.datastore.get(new Key('hello' + j))
4646
expect(val).to.be.eql(dataList[j])

0 commit comments

Comments
 (0)