Skip to content

Commit

Permalink
fix: use ipld-block and remove node globals (#218)
Browse files Browse the repository at this point in the history
- add buffer to the deps
- swaps ipfs-block with ipld-block
- removes safe-buffer
- updates deps

BREAKING CHANGE: swaps ipfs-block with ipld-block

related to ipfs/js-ipfs#2924
  • Loading branch information
hugomrdias authored Apr 23, 2020
1 parent 3ae81cb commit 6b4dc32
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
"homepage": "https://github.com/ipfs/js-ipfs-bitswap#readme",
"devDependencies": {
"@nodeutils/defaults-deep": "^1.1.0",
"aegir": "^20.3.1",
"aegir": "^21.9.0",
"async-iterator-all": "^1.0.0",
"benchmark": "^2.1.4",
"chai": "^4.2.0",
"delay": "^4.3.0",
"dirty-chai": "^2.0.1",
"ipfs-repo": "^0.28.2",
"ipfs-repo": "^2.0.0",
"libp2p": "^0.27.0",
"libp2p-kad-dht": "^0.18.3",
"libp2p-mplex": "^0.9.2",
Expand All @@ -68,15 +68,15 @@
"peer-info": "^0.17.0",
"promisify-es6": "^1.0.3",
"rimraf": "^3.0.0",
"safe-buffer": "^5.1.2",
"buffer": "^5.6.0",
"stats-lite": "^2.2.0",
"uuid": "^3.3.2"
},
"dependencies": {
"bignumber.js": "^9.0.0",
"cids": "~0.7.0",
"cids": "~0.8.0",
"debug": "^4.1.0",
"ipfs-block": "~0.8.0",
"ipld-block": "^0.9.1",
"it-length-prefixed": "^3.0.0",
"it-pipe": "^1.1.0",
"just-debounce-it": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/types/message/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const Block = require('ipfs-block')
const Block = require('ipld-block')
const CID = require('cids')
const { getName } = require('multicodec')
const vd = require('varint-decoder')
Expand Down
4 changes: 2 additions & 2 deletions test/decision-engine/decision-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const PeerId = require('peer-id')
const range = require('lodash.range')
const difference = require('lodash.difference')
const flatten = require('lodash.flatten')
const Block = require('ipfs-block')
const Block = require('ipld-block')
const CID = require('cids')
const multihashing = require('multihashing-async')
const Buffer = require('safe-buffer').Buffer
const { Buffer } = require('buffer')

const Message = require('../../src/types/message')
const DecisionEngine = require('../../src/decision-engine')
Expand Down
4 changes: 2 additions & 2 deletions test/network/gen-bitswap-network.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
const chai = require('chai')
chai.use(require('dirty-chai'))
const expect = chai.expect
const Block = require('ipfs-block')
const Buffer = require('safe-buffer').Buffer
const Block = require('ipld-block')
const { Buffer } = require('buffer')
const crypto = require('crypto')
const CID = require('cids')
const multihashing = require('multihashing-async')
Expand Down
2 changes: 1 addition & 1 deletion test/notifications.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ chai.use(require('dirty-chai'))

const expect = chai.expect
const CID = require('cids')
const Block = require('ipfs-block')
const Block = require('ipld-block')

const Notifications = require('../src/notifications')

Expand Down
2 changes: 1 addition & 1 deletion test/types/message.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const chai = require('chai')
chai.use(require('dirty-chai'))
const expect = chai.expect
const CID = require('cids')
const Buffer = require('safe-buffer').Buffer
const { Buffer } = require('buffer')
const loadFixture = require('aegir/fixtures')
const testDataPath = 'test/fixtures/serialized-from-go'
const rawMessageFullWantlist = loadFixture(testDataPath + '/bitswap110-message-full-wantlist')
Expand Down
2 changes: 1 addition & 1 deletion test/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict'
const chai = require('chai')
const CID = require('cids')
const Block = require('ipfs-block')
const Block = require('ipld-block')
const { Buffer } = require('buffer')
const multihashing = require('multihashing-async')
const BitswapMessageEntry = require('../src/types/message/entry')
Expand Down
4 changes: 2 additions & 2 deletions test/utils/make-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

const multihashing = require('multihashing-async')
const CID = require('cids')
const Block = require('ipfs-block')
const Block = require('ipld-block')
const crypto = require('crypto')
const range = require('lodash.range')
const Buffer = require('safe-buffer').Buffer
const { Buffer } = require('buffer')
const uuid = require('uuid/v4')

module.exports = async (count, size) => {
Expand Down
2 changes: 1 addition & 1 deletion test/wantmanager/msg-queue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const expect = chai.expect
const PeerId = require('peer-id')
const CID = require('cids')
const multihashing = require('multihashing-async')
const Buffer = require('safe-buffer').Buffer
const { Buffer } = require('buffer')
const Message = require('../../src/types/message')
const MsgQueue = require('../../src/want-manager/msg-queue')

Expand Down

0 comments on commit 6b4dc32

Please sign in to comment.