Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

chore: update buffer deps #3607

Merged
merged 24 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
43b7a44
chore: update buffer deps
achingbrain Apr 1, 2021
103f4f8
chore: dep updates
achingbrain Apr 9, 2021
8282424
chore: switch to multiaddr named export
achingbrain Apr 9, 2021
f780d96
chore: update more deps
achingbrain Apr 12, 2021
c6381a4
chore: update types
achingbrain Apr 16, 2021
46a76be
chore: linting
achingbrain Apr 16, 2021
58def59
chore: update deps
achingbrain Apr 17, 2021
7bef78d
chore: update deps
achingbrain Apr 21, 2021
302f0c3
chore: fix up tests
achingbrain Apr 21, 2021
3ac0bf9
chore: update deps, remove ts-ignores, fix linting
achingbrain Apr 22, 2021
e178955
chore: downgrade mock-ipfs-pinning-service
achingbrain Apr 22, 2021
de303dd
chore: fix up interface tests
achingbrain Apr 22, 2021
e842b5e
chore: demand non-broken datastore-pubsub
achingbrain Apr 22, 2021
76067b7
chore: types
achingbrain Apr 22, 2021
47780ac
chore: fix examples
achingbrain Apr 23, 2021
5cf6f5b
fix: interface core test swarm peers with webrtc does not dial the co…
vasco-santos Apr 23, 2021
7ddd620
chore: update it-multipart and it-tar
achingbrain Apr 23, 2021
a76d301
chore: fix up types
achingbrain Apr 23, 2021
e2a91af
chore: update bundle sizes, skip tests with playwright bug
achingbrain Apr 26, 2021
3b6bb57
chore: fix tests and make peer ids cids again
achingbrain Apr 26, 2021
68a659e
chore: fix linting and reduce number of timeout tests
achingbrain Apr 26, 2021
3d50ca0
chore: fix up test for webworkers
achingbrain Apr 26, 2021
95e4703
chore: linting
achingbrain Apr 26, 2021
3ff9d04
chore: fix timeout test
achingbrain Apr 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/core-api/BITSWAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ The returned object contains the following keys:

- `provideBufLen` is an integer.
- `wantlist` (array of [CID][cid]s)
- `peers` (array of peer IDs represented by CIDs)
- `peers` (array of peer IDs represented by strings)
- `blocksReceived` is a [BigInt][1]
- `dataReceived` is a [BigInt][1]
- `blocksSent` is a [BigInt][1]
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"browserify": "^16.2.3",
"browserify": "^17.0.0",
"concat-stream": "^2.0.0",
"execa": "^5.0.0",
"http-server": "^0.12.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/browser-exchange-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"license": "MIT",
"devDependencies": {
"browserify": "^16.2.3",
"browserify": "^17.0.0",
"execa": "^5.0.0",
"http-server": "^0.12.3",
"ipfs-http-client": "^49.0.4",
Expand All @@ -20,7 +20,7 @@
"dependencies": {
"ipfs": "^0.54.4",
"it-all": "^1.0.4",
"libp2p-websockets": "^0.15.1",
"libp2p-websockets": "^0.15.6",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
}
Expand Down
1 change: 1 addition & 0 deletions examples/browser-exchange-files/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ let workspace = (location.hash || 'default-workspace').replace(/^#/, '')

let fileSize = 0

/** @type {import('ipfs').IPFS} */
let node
let info

Expand Down
2 changes: 1 addition & 1 deletion examples/browser-http-client-upload-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Upload file to IPFS via browser using js-ipfs-http-client with Webpack",
"private": true,
"scripts": {
"clean": "rimraf ./dist",
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
"build": "parcel build index.html --no-scope-hoist",
"start": "parcel index.html",
"test": "test-ipfs-example"
Expand Down
5 changes: 3 additions & 2 deletions examples/browser-ipns-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"main": "index.js",
"scripts": {
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
"build": "parcel build index.html --no-scope-hoist",
"start": "parcel index.html",
"test": "test-ipfs-example"
Expand All @@ -16,7 +17,7 @@
"ipfs": "^0.54.4",
"ipfs-http-client": "^49.0.4",
"ipfs-utils": "^6.0.4",
"ipns": "^0.10.0",
"ipns": "^0.11.0",
"it-last": "^1.0.4",
"p-retry": "^4.2.0",
"uint8arrays": "^2.1.3"
Expand All @@ -27,7 +28,7 @@
"devDependencies": {
"delay": "^5.0.0",
"execa": "^5.0.0",
"ipfsd-ctl": "^8.0.0",
"ipfsd-ctl": "^8.0.1",
"go-ipfs": "0.8.0",
"parcel": "2.0.0-beta.2",
"path": "^0.12.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-parceljs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"last 2 versions and not dead and > 2%"
],
"scripts": {
"clean": "rimraf ./dist",
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
"lint": "standard public/**/*.js",
"start": "parcel public/index.html",
"build": "parcel build public/index.html --no-scope-hoist",
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-readablestream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"dependencies": {
"ipfs": "^0.54.4",
"it-to-stream": "^0.1.2",
"it-to-stream": "^1.0.0",
"videostream": "^3.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/circuit-relaying/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"delay": "^5.0.0",
"ipfs": "^0.54.4",
"ipfs-pubsub-room": "^2.0.1",
"libp2p-websockets": "^0.15.1",
"libp2p-websockets": "^0.15.6",
"uint8arrays": "^2.1.3"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-ipfs-repo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"license": "MIT",
"dependencies": {
"datastore-fs": "^2.0.0",
"datastore-fs": "4.0.0",
"ipfs": "^0.54.4",
"ipfs-repo": "^9.0.0",
"ipfs-repo": "^9.1.1",
"it-all": "^1.0.4"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-libp2p/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const libp2pBundle = (opts) => {

// Build and return our libp2p node
// n.b. for full configuration options, see https://github.com/libp2p/js-libp2p/blob/master/doc/CONFIGURATION.md
return new Libp2p({
return Libp2p.create({
peerId,
addresses: {
listen: ['/ip4/127.0.0.1/tcp/0']
Expand Down
14 changes: 7 additions & 7 deletions examples/custom-libp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"license": "MIT",
"dependencies": {
"ipfs": "^0.54.4",
"libp2p": "^0.30.12",
"libp2p-bootstrap": "^0.12.1",
"libp2p-kad-dht": "^0.21.0",
"libp2p-mdns": "^0.15.0",
"libp2p-mplex": "^0.10.0",
"libp2p-noise": "^2.0.1",
"libp2p-tcp": "^0.15.1"
"libp2p": "^0.31.0-rc.6",
"libp2p-bootstrap": "^0.12.3",
"libp2p-kad-dht": "libp2p/js-libp2p-kad-dht#chore/update-deps-12-04-2021",
"libp2p-mdns": "^0.16.0",
"libp2p-mplex": "^0.10.2",
"libp2p-noise": "^3.0.0",
"libp2p-tcp": "^0.15.4"
},
"devDependencies": {
"execa": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-libp2p/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function test () {
console.info('Dialling', address)

const peerId = await PeerId.create()
const libp2p = new Libp2p({
const libp2p = await Libp2p.create({
peerId,
addresses: {
listen: ['/ip4/127.0.0.1/tcp/0']
Expand Down
4 changes: 2 additions & 2 deletions examples/explore-ethereum-blockchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"devDependencies": {
"ipfs": "^0.54.4",
"ipfs-http-client": "^49.0.4",
"ipfsd-ctl": "^8.0.0",
"ipld-ethereum": "^5.0.1",
"ipfsd-ctl": "^8.0.1",
"ipld-ethereum": "^6.0.0",
"test-ipfs-example": "^3.0.0"
}
}
3 changes: 2 additions & 1 deletion examples/http-client-browser-pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"main": "dist/index.html",
"scripts": {
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
"build": "parcel build index.html --no-scope-hoist",
"start": "parcel index.html -p 8888",
"test": "test-ipfs-example"
Expand All @@ -21,7 +22,7 @@
"execa": "^5.0.0",
"go-ipfs": "0.8.0",
"ipfs": "^0.54.4",
"ipfsd-ctl": "^8.0.0",
"ipfsd-ctl": "^8.0.1",
"parcel": "2.0.0-beta.2",
"test-ipfs-example": "^3.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-bundle-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"copy-webpack-plugin": "^8.1.0",
"execa": "^5.0.0",
"ipfs": "^0.54.4",
"ipfsd-ctl": "^8.0.0",
"ipfsd-ctl": "^8.0.1",
"react-hot-loader": "^4.12.21",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/http-client-name-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "dist/index.html",
"private": true,
"scripts": {
"clean": "rimraf ./dist",
"build": "parcel build index.html",
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
"build": "parcel build index.html --no-scope-hoist",
"start": "parcel index.html -p 8888",
"test": "test-ipfs-example"
},
Expand All @@ -18,7 +18,7 @@
"devDependencies": {
"execa": "^5.0.0",
"go-ipfs": "0.8.0",
"ipfsd-ctl": "^8.0.0",
"ipfsd-ctl": "^8.0.1",
"parcel": "2.0.0-beta.2",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
Expand Down
3 changes: 2 additions & 1 deletion examples/ipfs-101/1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const IPFS = require('ipfs')
const all = require('it-all')
const uint8ArrayConcat = require('uint8arrays/concat')
const uint8ArrayFromString = require('uint8arrays/from-string')
const uint8ArrayToString = require('uint8arrays/to-string')

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

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

console.log('Added file contents:', data.toString())
console.log('Added file contents:', uint8ArrayToString(data))
}

main()
2 changes: 1 addition & 1 deletion examples/ipfs-101/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
} = require('test-ipfs-example/utils')

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

module.exports = runTest
6 changes: 3 additions & 3 deletions examples/ipfs-client-add-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "dist/index.html",
"private": true,
"scripts": {
"clean": "rimraf ./dist",
"build": "parcel build index.html",
"clean": "rimraf ./dist ./.cache ./.parcel-cache",
"build": "parcel build index.html --no-scope-hoist",
"start": "parcel index.html -p 8888",
"test": "test-ipfs-example"
},
Expand All @@ -16,7 +16,7 @@
"devDependencies": {
"execa": "^5.0.0",
"ipfs": "^0.54.4",
"ipfsd-ctl": "^8.0.0",
"ipfsd-ctl": "^8.0.1",
"parcel": "2.0.0-beta.2",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/run-in-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "David Dias <[email protected]>",
"license": "MIT",
"devDependencies": {
"electron": "^11.2.1",
"electron": "^12.0.2",
"electron-rebuild": "^2.3.4",
"ipfs": "^0.54.4",
"test-ipfs-example": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/traverse-ipld-graphs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ipld-block": "^0.11.0",
"ipld-dag-pb": "^0.22.1",
"ipld-git": "^0.6.1",
"ipld-ethereum": "^5.0.1",
"ipld-ethereum": "^6.0.0",
"multihashing-async": "^2.1.2"
}
}
2 changes: 1 addition & 1 deletion examples/types-use-ipfs-from-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ipfs": "^0.54.4"
},
"devDependencies": {
"typescript": "4.1.x"
"typescript": "4.2.x"
},
"scripts": {
"test": "tsc --noEmit"
Expand Down
2 changes: 1 addition & 1 deletion examples/types-use-ipfs-from-typed-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ipfs": "^0.54.4"
},
"devDependencies": {
"typescript": "4.1.x"
"typescript": "4.2.x"
},
"scripts": {
"test": "tsc --noEmit"
Expand Down
20 changes: 10 additions & 10 deletions packages/interface-ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,34 @@
},
"dependencies": {
"abort-controller": "^3.0.0",
"aegir": "^32.1.0",
"aegir": "^33.0.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"cids": "^1.1.6",
"delay": "^5.0.0",
"dirty-chai": "^2.0.1",
"err-code": "^3.0.1",
"ipfs-unixfs": "^4.0.1",
"ipfs-unixfs-importer": "^7.0.1",
"ipfs-unixfs": "^4.0.3",
"ipfs-unixfs-importer": "^7.0.3",
"ipfs-utils": "^6.0.4",
"ipld-block": "^0.11.0",
"ipld-dag-cbor": "^0.18.0",
"ipld-dag-pb": "^0.22.1",
"ipns": "^0.10.0",
"is-ipfs": "^4.0.0",
"iso-random-stream": "^1.1.1",
"ipns": "^0.11.0",
"is-ipfs": "^5.0.0",
"iso-random-stream": "^2.0.0",
"it-all": "^1.0.4",
"it-buffer-stream": "^2.0.0",
"it-concat": "^1.0.3",
"it-concat": "^2.0.0",
"it-drain": "^1.0.3",
"it-first": "^1.0.4",
"it-last": "^1.0.4",
"it-map": "^1.0.4",
"it-pushable": "^1.4.0",
"libp2p-crypto": "^0.19.0",
"libp2p-websockets": "^0.15.1",
"multiaddr": "^8.0.0",
"libp2p-crypto": "^0.19.3",
"libp2p-websockets": "^0.15.6",
"multiaddr": "^9.0.1",
"multibase": "^4.0.2",
"multihashing-async": "^2.1.2",
"nanoid": "^3.1.12",
Expand Down
7 changes: 0 additions & 7 deletions packages/interface-ipfs-core/src/add-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const { supportsFileReader } = require('ipfs-utils/src/supports')
const globSource = require('ipfs-utils/src/files/glob-source')
const { isNode } = require('ipfs-utils/src/env')
const { getDescribe, getIt, expect } = require('./utils/mocha')
const testTimeout = require('./utils/test-timeout')
const uint8ArrayFromString = require('uint8arrays/from-string')
const bufferStream = require('it-buffer-stream')

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

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

it('should respect timeout option when adding files', () => {
return testTimeout(() => drain(ipfs.addAll(uint8ArrayFromString('Hello'), {
timeout: 1
})))
})

it('should add a File as array of tuples', async function () {
if (!supportsFileReader) return this.skip('skip in node')

Expand Down
7 changes: 0 additions & 7 deletions packages/interface-ipfs-core/src/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const { supportsFileReader } = require('ipfs-utils/src/supports')
const urlSource = require('ipfs-utils/src/files/url-source')
const { isNode } = require('ipfs-utils/src/env')
const { getDescribe, getIt, expect } = require('./utils/mocha')
const testTimeout = require('./utils/test-timeout')
const echoUrl = (text) => `${process.env.ECHO_SERVER}/download?data=${encodeURIComponent(text)}`
const redirectUrl = (url) => `${process.env.ECHO_SERVER}/redirect?to=${encodeURI(url)}`
const uint8ArrayFromString = require('uint8arrays/from-string')
Expand Down Expand Up @@ -55,12 +54,6 @@ module.exports = (common, options) => {

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

it('should respect timeout option when adding a file', () => {
return testTimeout(() => ipfs.add('Hello', {
timeout: 1
}))
})

it('should add a File', async function () {
if (!supportsFileReader) return this.skip('skip in node')

Expand Down
Loading