Skip to content

Commit c79d3d6

Browse files
chore: update buffer deps (ipfs#3607)
Updates deps to pull in Buffer@6.x.x Refs ipfs#3604 Fixes ipfs#3389 Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
1 parent 63b11e5 commit c79d3d6

File tree

197 files changed

+513
-1005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+513
-1005
lines changed

docs/core-api/BITSWAP.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ The returned object contains the following keys:
159159

160160
- `provideBufLen` is an integer.
161161
- `wantlist` (array of [CID][cid]s)
162-
- `peers` (array of peer IDs represented by CIDs)
162+
- `peers` (array of peer IDs represented by strings)
163163
- `blocksReceived` is a [BigInt][1]
164164
- `dataReceived` is a [BigInt][1]
165165
- `blocksSent` is a [BigInt][1]

examples/browser-browserify/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"keywords": [],
1515
"license": "MIT",
1616
"devDependencies": {
17-
"browserify": "^16.2.3",
17+
"browserify": "^17.0.0",
1818
"concat-stream": "^2.0.0",
1919
"execa": "^5.0.0",
2020
"http-server": "^0.12.3",

examples/browser-exchange-files/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"license": "MIT",
1313
"devDependencies": {
14-
"browserify": "^16.2.3",
14+
"browserify": "^17.0.0",
1515
"execa": "^5.0.0",
1616
"http-server": "^0.12.3",
1717
"ipfs-http-client": "^49.0.4",
@@ -20,7 +20,7 @@
2020
"dependencies": {
2121
"ipfs": "^0.54.4",
2222
"it-all": "^1.0.4",
23-
"libp2p-websockets": "^0.15.1",
23+
"libp2p-websockets": "^0.15.6",
2424
"rimraf": "^3.0.2",
2525
"test-ipfs-example": "^3.0.0"
2626
}

examples/browser-exchange-files/public/app.js

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ let workspace = (location.hash || 'default-workspace').replace(/^#/, '')
4141

4242
let fileSize = 0
4343

44+
/** @type {import('ipfs').IPFS} */
4445
let node
4546
let info
4647

examples/browser-http-client-upload-file/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Upload file to IPFS via browser using js-ipfs-http-client with Webpack",
55
"private": true,
66
"scripts": {
7-
"clean": "rimraf ./dist",
7+
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
88
"build": "parcel build index.html --no-scope-hoist",
99
"start": "parcel index.html",
1010
"test": "test-ipfs-example"

examples/browser-ipns-publish/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"private": true,
66
"main": "index.js",
77
"scripts": {
8+
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
89
"build": "parcel build index.html --no-scope-hoist",
910
"start": "parcel index.html",
1011
"test": "test-ipfs-example"
@@ -16,7 +17,7 @@
1617
"ipfs": "^0.54.4",
1718
"ipfs-http-client": "^49.0.4",
1819
"ipfs-utils": "^6.0.4",
19-
"ipns": "^0.10.0",
20+
"ipns": "^0.11.0",
2021
"it-last": "^1.0.4",
2122
"p-retry": "^4.2.0",
2223
"uint8arrays": "^2.1.3"
@@ -27,7 +28,7 @@
2728
"devDependencies": {
2829
"delay": "^5.0.0",
2930
"execa": "^5.0.0",
30-
"ipfsd-ctl": "^8.0.0",
31+
"ipfsd-ctl": "^8.0.1",
3132
"go-ipfs": "0.8.0",
3233
"parcel": "2.0.0-beta.2",
3334
"path": "^0.12.7",

examples/browser-parceljs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"last 2 versions and not dead and > 2%"
99
],
1010
"scripts": {
11-
"clean": "rimraf ./dist",
11+
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
1212
"lint": "standard public/**/*.js",
1313
"start": "parcel public/index.html",
1414
"build": "parcel build public/index.html --no-scope-hoist",

examples/browser-readablestream/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"dependencies": {
2525
"ipfs": "^0.54.4",
26-
"it-to-stream": "^0.1.2",
26+
"it-to-stream": "^1.0.0",
2727
"videostream": "^3.2.0"
2828
}
2929
}

examples/circuit-relaying/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"delay": "^5.0.0",
1818
"ipfs": "^0.54.4",
1919
"ipfs-pubsub-room": "^2.0.1",
20-
"libp2p-websockets": "^0.15.1",
20+
"libp2p-websockets": "^0.15.6",
2121
"uint8arrays": "^2.1.3"
2222
},
2323
"devDependencies": {

examples/custom-ipfs-repo/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
},
1111
"license": "MIT",
1212
"dependencies": {
13-
"datastore-fs": "^2.0.0",
13+
"datastore-fs": "4.0.0",
1414
"ipfs": "^0.54.4",
15-
"ipfs-repo": "^9.0.0",
15+
"ipfs-repo": "^9.1.1",
1616
"it-all": "^1.0.4"
1717
},
1818
"devDependencies": {

examples/custom-libp2p/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const libp2pBundle = (opts) => {
3030

3131
// Build and return our libp2p node
3232
// n.b. for full configuration options, see https://github.com/libp2p/js-libp2p/blob/master/doc/CONFIGURATION.md
33-
return new Libp2p({
33+
return Libp2p.create({
3434
peerId,
3535
addresses: {
3636
listen: ['/ip4/127.0.0.1/tcp/0']

examples/custom-libp2p/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"license": "MIT",
1212
"dependencies": {
1313
"ipfs": "^0.54.4",
14-
"libp2p": "^0.30.12",
15-
"libp2p-bootstrap": "^0.12.1",
16-
"libp2p-kad-dht": "^0.21.0",
17-
"libp2p-mdns": "^0.15.0",
18-
"libp2p-mplex": "^0.10.0",
19-
"libp2p-noise": "^2.0.1",
20-
"libp2p-tcp": "^0.15.1"
14+
"libp2p": "^0.31.0-rc.6",
15+
"libp2p-bootstrap": "^0.12.3",
16+
"libp2p-kad-dht": "libp2p/js-libp2p-kad-dht#chore/update-deps-12-04-2021",
17+
"libp2p-mdns": "^0.16.0",
18+
"libp2p-mplex": "^0.10.2",
19+
"libp2p-noise": "^3.0.0",
20+
"libp2p-tcp": "^0.15.4"
2121
},
2222
"devDependencies": {
2323
"execa": "^5.0.0",

examples/custom-libp2p/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function test () {
2828
console.info('Dialling', address)
2929

3030
const peerId = await PeerId.create()
31-
const libp2p = new Libp2p({
31+
const libp2p = await Libp2p.create({
3232
peerId,
3333
addresses: {
3434
listen: ['/ip4/127.0.0.1/tcp/0']

examples/explore-ethereum-blockchain/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"devDependencies": {
1313
"ipfs": "^0.54.4",
1414
"ipfs-http-client": "^49.0.4",
15-
"ipfsd-ctl": "^8.0.0",
16-
"ipld-ethereum": "^5.0.1",
15+
"ipfsd-ctl": "^8.0.1",
16+
"ipld-ethereum": "^6.0.0",
1717
"test-ipfs-example": "^3.0.0"
1818
}
1919
}

examples/http-client-browser-pubsub/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"private": true,
66
"main": "dist/index.html",
77
"scripts": {
8+
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
89
"build": "parcel build index.html --no-scope-hoist",
910
"start": "parcel index.html -p 8888",
1011
"test": "test-ipfs-example"
@@ -21,7 +22,7 @@
2122
"execa": "^5.0.0",
2223
"go-ipfs": "0.8.0",
2324
"ipfs": "^0.54.4",
24-
"ipfsd-ctl": "^8.0.0",
25+
"ipfsd-ctl": "^8.0.1",
2526
"parcel": "2.0.0-beta.2",
2627
"test-ipfs-example": "^3.0.0"
2728
}

examples/http-client-bundle-webpack/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"copy-webpack-plugin": "^8.1.0",
2626
"execa": "^5.0.0",
2727
"ipfs": "^0.54.4",
28-
"ipfsd-ctl": "^8.0.0",
28+
"ipfsd-ctl": "^8.0.1",
2929
"react-hot-loader": "^4.12.21",
3030
"rimraf": "^3.0.2",
3131
"test-ipfs-example": "^3.0.0",

examples/http-client-name-api/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "dist/index.html",
66
"private": true,
77
"scripts": {
8-
"clean": "rimraf ./dist",
9-
"build": "parcel build index.html",
8+
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
9+
"build": "parcel build index.html --no-scope-hoist",
1010
"start": "parcel index.html -p 8888",
1111
"test": "test-ipfs-example"
1212
},
@@ -18,7 +18,7 @@
1818
"devDependencies": {
1919
"execa": "^5.0.0",
2020
"go-ipfs": "0.8.0",
21-
"ipfsd-ctl": "^8.0.0",
21+
"ipfsd-ctl": "^8.0.1",
2222
"parcel": "2.0.0-beta.2",
2323
"rimraf": "^3.0.2",
2424
"test-ipfs-example": "^3.0.0"

examples/ipfs-101/1.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const IPFS = require('ipfs')
44
const all = require('it-all')
55
const uint8ArrayConcat = require('uint8arrays/concat')
66
const uint8ArrayFromString = require('uint8arrays/from-string')
7+
const uint8ArrayToString = require('uint8arrays/to-string')
78

89
async function main () {
910
const node = await IPFS.create()
@@ -20,7 +21,7 @@ async function main () {
2021

2122
const data = uint8ArrayConcat(await all(node.cat(file.cid)))
2223

23-
console.log('Added file contents:', data.toString())
24+
console.log('Added file contents:', uint8ArrayToString(data))
2425
}
2526

2627
main()

examples/ipfs-101/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const {
66
} = require('test-ipfs-example/utils')
77

88
async function runTest () {
9-
await waitForOutput('Added file contents:', path.resolve(__dirname, '1.js'))
9+
await waitForOutput('Added file contents: Hello World 101', path.resolve(__dirname, '1.js'))
1010
}
1111

1212
module.exports = runTest

examples/ipfs-client-add-files/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "dist/index.html",
66
"private": true,
77
"scripts": {
8-
"clean": "rimraf ./dist",
9-
"build": "parcel build index.html",
8+
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
9+
"build": "parcel build index.html --no-scope-hoist",
1010
"start": "parcel index.html -p 8888",
1111
"test": "test-ipfs-example"
1212
},
@@ -16,7 +16,7 @@
1616
"devDependencies": {
1717
"execa": "^5.0.0",
1818
"ipfs": "^0.54.4",
19-
"ipfsd-ctl": "^8.0.0",
19+
"ipfsd-ctl": "^8.0.1",
2020
"parcel": "2.0.0-beta.2",
2121
"rimraf": "^3.0.2",
2222
"test-ipfs-example": "^3.0.0"

examples/run-in-electron/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"author": "David Dias <daviddias@ipfs.io>",
1717
"license": "MIT",
1818
"devDependencies": {
19-
"electron": "^11.2.1",
19+
"electron": "^12.0.2",
2020
"electron-rebuild": "^2.3.4",
2121
"ipfs": "^0.54.4",
2222
"test-ipfs-example": "^3.0.0"

examples/traverse-ipld-graphs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"ipld-block": "^0.11.0",
1919
"ipld-dag-pb": "^0.22.1",
2020
"ipld-git": "^0.6.1",
21-
"ipld-ethereum": "^5.0.1",
21+
"ipld-ethereum": "^6.0.0",
2222
"multihashing-async": "^2.1.2"
2323
}
2424
}

examples/types-use-ipfs-from-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"ipfs": "^0.54.4"
66
},
77
"devDependencies": {
8-
"typescript": "4.1.x"
8+
"typescript": "4.2.x"
99
},
1010
"scripts": {
1111
"test": "tsc --noEmit"

examples/types-use-ipfs-from-typed-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"ipfs": "^0.54.4"
66
},
77
"devDependencies": {
8-
"typescript": "4.1.x"
8+
"typescript": "4.2.x"
99
},
1010
"scripts": {
1111
"test": "tsc --noEmit"

packages/interface-ipfs-core/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,34 @@
3737
},
3838
"dependencies": {
3939
"abort-controller": "^3.0.0",
40-
"aegir": "^32.1.0",
40+
"aegir": "^33.0.0",
4141
"chai": "^4.2.0",
4242
"chai-as-promised": "^7.1.1",
4343
"chai-subset": "^1.6.0",
4444
"cids": "^1.1.6",
4545
"delay": "^5.0.0",
4646
"dirty-chai": "^2.0.1",
4747
"err-code": "^3.0.1",
48-
"ipfs-unixfs": "^4.0.1",
49-
"ipfs-unixfs-importer": "^7.0.1",
48+
"ipfs-unixfs": "^4.0.3",
49+
"ipfs-unixfs-importer": "^7.0.3",
5050
"ipfs-utils": "^6.0.4",
5151
"ipld-block": "^0.11.0",
5252
"ipld-dag-cbor": "^0.18.0",
5353
"ipld-dag-pb": "^0.22.1",
54-
"ipns": "^0.10.0",
55-
"is-ipfs": "^4.0.0",
56-
"iso-random-stream": "^1.1.1",
54+
"ipns": "^0.11.0",
55+
"is-ipfs": "^5.0.0",
56+
"iso-random-stream": "^2.0.0",
5757
"it-all": "^1.0.4",
5858
"it-buffer-stream": "^2.0.0",
59-
"it-concat": "^1.0.3",
59+
"it-concat": "^2.0.0",
6060
"it-drain": "^1.0.3",
6161
"it-first": "^1.0.4",
6262
"it-last": "^1.0.4",
6363
"it-map": "^1.0.4",
6464
"it-pushable": "^1.4.0",
65-
"libp2p-crypto": "^0.19.0",
66-
"libp2p-websockets": "^0.15.1",
67-
"multiaddr": "^8.0.0",
65+
"libp2p-crypto": "^0.19.3",
66+
"libp2p-websockets": "^0.15.6",
67+
"multiaddr": "^9.0.1",
6868
"multibase": "^4.0.2",
6969
"multihashing-async": "^2.1.2",
7070
"nanoid": "^3.1.12",

packages/interface-ipfs-core/src/add-all.js

-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const { supportsFileReader } = require('ipfs-utils/src/supports')
1313
const globSource = require('ipfs-utils/src/files/glob-source')
1414
const { isNode } = require('ipfs-utils/src/env')
1515
const { getDescribe, getIt, expect } = require('./utils/mocha')
16-
const testTimeout = require('./utils/test-timeout')
1716
const uint8ArrayFromString = require('uint8arrays/from-string')
1817
const bufferStream = require('it-buffer-stream')
1918

@@ -61,12 +60,6 @@ module.exports = (common, options) => {
6160

6261
after(() => common.clean())
6362

64-
it('should respect timeout option when adding files', () => {
65-
return testTimeout(() => drain(ipfs.addAll(uint8ArrayFromString('Hello'), {
66-
timeout: 1
67-
})))
68-
})
69-
7063
it('should add a File as array of tuples', async function () {
7164
if (!supportsFileReader) return this.skip('skip in node')
7265

packages/interface-ipfs-core/src/add.js

-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const { supportsFileReader } = require('ipfs-utils/src/supports')
77
const urlSource = require('ipfs-utils/src/files/url-source')
88
const { isNode } = require('ipfs-utils/src/env')
99
const { getDescribe, getIt, expect } = require('./utils/mocha')
10-
const testTimeout = require('./utils/test-timeout')
1110
const echoUrl = (text) => `${process.env.ECHO_SERVER}/download?data=${encodeURIComponent(text)}`
1211
const redirectUrl = (url) => `${process.env.ECHO_SERVER}/redirect?to=${encodeURI(url)}`
1312
const uint8ArrayFromString = require('uint8arrays/from-string')
@@ -55,12 +54,6 @@ module.exports = (common, options) => {
5554

5655
after(() => common.clean())
5756

58-
it('should respect timeout option when adding a file', () => {
59-
return testTimeout(() => ipfs.add('Hello', {
60-
timeout: 1
61-
}))
62-
})
63-
6457
it('should add a File', async function () {
6558
if (!supportsFileReader) return this.skip('skip in node')
6659

0 commit comments

Comments
 (0)