From 0cee4a4c55767022584dcbade0b0b9b43326f9c9 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Mon, 24 Oct 2022 10:08:56 +0200 Subject: [PATCH 01/28] feat!: upgrade libp2p to 0.40.x (#4237) Upgrades all deps to support `libp2p@0.40.x`. BREAKING CHANGE: ipfs is now bundled with libp2p@0.40.x which has different config --- .github/workflows/test.yml | 18 +-- package.json | 2 +- packages/interface-ipfs-core/package.json | 36 ++--- .../src/miscellaneous/dns.js | 30 ++++- .../src/miscellaneous/resolve.js | 16 ++- .../interface-ipfs-core/src/name/resolve.js | 126 +++++++++++++++--- .../ipfs-options-websockets-filter-all.js | 4 +- .../interface-ipfs-core/src/utils/mocha.js | 1 - packages/ipfs-cli/package.json | 26 ++-- packages/ipfs-cli/src/commands/add.js | 2 +- packages/ipfs-cli/src/commands/block/put.js | 4 +- packages/ipfs-cli/src/commands/cid/format.js | 2 +- packages/ipfs-cli/src/commands/dag/put.js | 6 +- packages/ipfs-cli/src/commands/files/mkdir.js | 2 +- packages/ipfs-cli/src/commands/files/mv.js | 2 +- packages/ipfs-cli/src/commands/files/touch.js | 2 +- packages/ipfs-cli/src/commands/files/write.js | 2 +- .../src/commands/object/patch/append-data.js | 2 +- .../src/commands/object/patch/set-data.js | 2 +- packages/ipfs-cli/src/commands/object/put.js | 2 +- packages/ipfs-cli/test/object.spec.js | 6 +- packages/ipfs-core-config/package.json | 22 +-- .../src/libp2p-pubsub-routers.browser.js | 36 +++-- .../src/libp2p-pubsub-routers.js | 40 ++++-- .../ipfs-core-config/src/libp2p.browser.js | 6 +- packages/ipfs-core-config/src/libp2p.js | 8 +- packages/ipfs-core-types/package.json | 8 +- packages/ipfs-core-types/src/block/index.ts | 2 +- packages/ipfs-core-types/src/dag/index.ts | 2 +- packages/ipfs-core-types/src/files/index.ts | 2 +- packages/ipfs-core-types/src/root.ts | 2 +- packages/ipfs-core-utils/package.json | 16 +-- .../src/files/normalise-candidate-single.js | 1 - packages/ipfs-core/.aegir.js | 12 +- packages/ipfs-core/package.json | 84 ++++++------ .../ipfs-core/src/components/block/put.js | 2 +- .../ipfs-core/src/components/dag/export.js | 8 +- .../ipfs-core/src/components/files/chmod.js | 2 +- packages/ipfs-core/src/components/files/cp.js | 2 +- .../ipfs-core/src/components/files/mkdir.js | 2 +- packages/ipfs-core/src/components/files/mv.js | 2 +- packages/ipfs-core/src/components/files/rm.js | 2 +- .../ipfs-core/src/components/files/touch.js | 2 +- .../src/components/files/utils/add-link.js | 2 +- .../src/components/files/utils/create-node.js | 2 +- .../src/components/files/utils/dir-sharded.js | 2 +- .../src/components/files/utils/hamt-utils.js | 2 +- .../src/components/files/utils/persist.js | 2 +- .../src/components/files/utils/remove-link.js | 2 +- .../src/components/files/utils/update-tree.js | 2 +- .../ipfs-core/src/components/files/write.js | 2 +- packages/ipfs-core/src/components/libp2p.js | 46 ++++--- packages/ipfs-daemon/package.json | 4 +- packages/ipfs-daemon/src/index.js | 6 +- packages/ipfs-grpc-client/package.json | 10 +- packages/ipfs-grpc-server/package.json | 12 +- packages/ipfs-http-client/package.json | 22 +-- packages/ipfs-http-gateway/package.json | 8 +- packages/ipfs-http-response/package.json | 13 +- .../ipfs-http-response/src/dir-view/index.js | 2 +- packages/ipfs-http-response/src/index.js | 6 +- .../src/utils/content-type.js | 4 +- packages/ipfs-http-server/package.json | 28 ++-- packages/ipfs-message-port-client/.aegir.js | 12 +- .../ipfs-message-port-client/package.json | 8 +- .../ipfs-message-port-protocol/package.json | 4 +- .../ipfs-message-port-protocol/src/cid.js | 1 - .../ipfs-message-port-server/package.json | 4 +- packages/ipfs-message-port-server/src/core.js | 2 +- packages/ipfs/.aegir.js | 12 +- packages/ipfs/package.json | 9 +- packages/ipfs/test/utils/factory.js | 4 +- 72 files changed, 466 insertions(+), 323 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c9436e3a6..b16ab31931 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,7 @@ jobs: with: node-version: ${{ matrix.node }} - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npm run test:node -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npx lerna run test:node --since ${{ github.event.pull_request.base.sha }} --concurrency 1 - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: node @@ -67,7 +67,7 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npm run test:chrome -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npx lerna run test:chrome --since ${{ github.event.pull_request.base.sha }} --concurrency 1 - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: chrome @@ -84,7 +84,7 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npm run test:chrome-webworker -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npx lerna run test:chrome-webworker --since ${{ github.event.pull_request.base.sha }} --concurrency 1 - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: chrome-webworker @@ -101,7 +101,7 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npm run test:firefox -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npx lerna run test:firefox --since ${{ github.event.pull_request.base.sha }} --concurrency 1 - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: firefox @@ -119,7 +119,7 @@ jobs: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - run: npx playwright install --with-deps - - run: npm run test:firefox-webworker -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npx lerna run test:firefox-webworker --since ${{ github.event.pull_request.base.sha }} --concurrency 1 - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: firefox-webworker @@ -138,7 +138,7 @@ jobs: - uses: ipfs/aegir/actions/cache-node-modules@master - uses: GabrielBB/xvfb-action@v1 with: - run: npm run test:electron-main -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail + run: npx lerna run test:electron-main --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: electron-main @@ -162,7 +162,7 @@ jobs: - uses: ipfs/aegir/actions/cache-node-modules@master - run: npm install - run: npm run build - - run: npm run test:interop -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- -- -t ${{ matrix.type }} --bail + - run: npx lerna run test:interop --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- -t ${{ matrix.type }} --bail - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: interop-${{ matrix.type }} @@ -190,7 +190,7 @@ jobs: node-version: lts/* - run: npm install - run: npm run build - - run: npm run ${{ matrix.suite }} -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- -t ${{ matrix.type }} + - run: npx lerna run ${{ matrix.suite }} --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -t ${{ matrix.type }} --bail - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: interface-${{ matrix.type }} @@ -208,7 +208,7 @@ jobs: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - run: npx playwright install --with-deps - - run: npm run test:interface:message-port-client -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npx lerna run test:interface:message-port-client --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail release: runs-on: ubuntu-latest diff --git a/package.json b/package.json index e9d95e8489..824f5a9ed5 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "docker:rc:push-rc": "docker push ipfs/js-ipfs:v`npm show ipfs@next version -q`" }, "devDependencies": { - "lerna": "^5.0.0", + "lerna": "^6.0.1", "node-fetch": "npm:@achingbrain/node-fetch@^2.6.4", "npm-run-all": "^4.1.5", "rimraf": "^3.0.2" diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index b6fea6e411..350bdc6acd 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -64,15 +64,15 @@ "dep-check": "aegir dep-check -i ipfs-core-types -i copyfiles -i @libp2p/interfaces" }, "dependencies": { - "@ipld/car": "^4.1.0", - "@ipld/dag-cbor": "^7.0.0", - "@ipld/dag-pb": "^2.1.3", + "@ipld/car": "^5.0.0", + "@ipld/dag-cbor": "^8.0.0", + "@ipld/dag-pb": "^3.0.0", "@libp2p/crypto": "^1.0.0", "@libp2p/interface-peer-id": "^1.0.4", "@libp2p/interfaces": "^3.0.3", "@libp2p/peer-id": "^1.1.10", "@libp2p/peer-id-factory": "^1.0.10", - "@libp2p/websockets": "^3.0.0", + "@libp2p/websockets": "^5.0.0", "@multiformats/multiaddr": "^11.0.0", "@types/node": "^18.0.0", "@types/pako": "^2.0.0", @@ -80,30 +80,30 @@ "aegir": "^37.0.11", "blockstore-core": "^2.0.1", "copyfiles": "^2.4.1", - "dag-jose": "^2.0.1", + "dag-jose": "^3.0.1", "delay": "^5.0.0", "did-jwt": "^6.2.0", "err-code": "^3.0.1", "ipfs-core-types": "^0.12.1", - "ipfs-unixfs": "^7.0.0", - "ipfs-unixfs-importer": "^10.0.2", + "ipfs-unixfs": "^8.0.0", + "ipfs-unixfs-importer": "^11.0.0", "ipfs-utils": "^9.0.6", - "ipns": "^3.0.0", + "ipns": "^4.0.0", "is-ipfs": "^7.0.0", "iso-random-stream": "^2.0.2", - "it-all": "^1.0.4", - "it-buffer-stream": "^2.0.0", - "it-concat": "^2.0.0", - "it-drain": "^1.0.3", - "it-first": "^1.0.6", - "it-last": "^1.0.4", - "it-map": "^1.0.6", + "it-all": "^2.0.0", + "it-buffer-stream": "^3.0.0", + "it-concat": "^3.0.1", + "it-drain": "^2.0.0", + "it-first": "^2.0.0", + "it-last": "^2.0.0", + "it-map": "^2.0.0", "it-pipe": "^2.0.3", "it-pushable": "^3.0.0", "it-tar": "^6.0.0", - "it-to-buffer": "^2.0.0", + "it-to-buffer": "^3.0.0", "merge-options": "^3.0.4", - "multiformats": "^9.5.1", + "multiformats": "^10.0.0", "nanoid": "^4.0.0", "p-defer": "^4.0.0", "p-map": "^5.3.0", @@ -112,7 +112,7 @@ "pako": "^2.0.4", "readable-stream": "^4.0.0", "sinon": "^14.0.0", - "uint8arrays": "^3.0.0" + "uint8arrays": "^4.0.2" }, "browser": { "fs": false, diff --git a/packages/interface-ipfs-core/src/miscellaneous/dns.js b/packages/interface-ipfs-core/src/miscellaneous/dns.js index 36270e5e1d..3ca5b7d54f 100644 --- a/packages/interface-ipfs-core/src/miscellaneous/dns.js +++ b/packages/interface-ipfs-core/src/miscellaneous/dns.js @@ -29,8 +29,10 @@ export function testDns (factory, options) { after(() => factory.clean()) it('should non-recursively resolve ipfs.io', async function () { + const domain = 'ipfs.io' + try { - const res = await ipfs.dns('ipfs.io', { recursive: false }) + const res = await ipfs.dns(domain, { recursive: false }) // matches pattern /ipns/ expect(res).to.match(/\/ipns\/.+$/) @@ -40,13 +42,21 @@ export function testDns (factory, options) { return this.skip() } + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + throw err } }) it('should recursively resolve ipfs.io', async function () { + const domain = 'ipfs.io' + try { - const res = await ipfs.dns('ipfs.io', { recursive: true }) + const res = await ipfs.dns(domain, { recursive: true }) // matches pattern /ipfs/ expect(res).to.match(/\/ipfs\/.+$/) @@ -56,13 +66,21 @@ export function testDns (factory, options) { return this.skip() } + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + throw err } }) it('should resolve subdomain docs.ipfs.io', async function () { + const domain = 'docs.ipfs.io' + try { - const res = await ipfs.dns('docs.ipfs.io') + const res = await ipfs.dns(domain) // matches pattern /ipfs/ expect(res).to.match(/\/ipfs\/.+$/) @@ -72,6 +90,12 @@ export function testDns (factory, options) { return this.skip() } + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + throw err } }) diff --git a/packages/interface-ipfs-core/src/miscellaneous/resolve.js b/packages/interface-ipfs-core/src/miscellaneous/resolve.js index 8ca3fd0eba..49e004c4fa 100644 --- a/packages/interface-ipfs-core/src/miscellaneous/resolve.js +++ b/packages/interface-ipfs-core/src/miscellaneous/resolve.js @@ -96,9 +96,21 @@ export function testResolve (factory, options) { it('should resolve an IPNS DNS link', async function () { // @ts-expect-error this is mocha this.retries(3) - const resolved = await ipfs.resolve('/ipns/ipfs.io') + const domain = 'ipfs.io' - expect(isIpfs.ipfsPath(resolved)).to.be.true() + try { + const resolved = await ipfs.resolve(`/ipns/${domain}`) + + expect(isIpfs.ipfsPath(resolved)).to.be.true() + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) it('should resolve IPNS link recursively by default', async function () { diff --git a/packages/interface-ipfs-core/src/name/resolve.js b/packages/interface-ipfs-core/src/name/resolve.js index f1fa281733..69deee2ff9 100644 --- a/packages/interface-ipfs-core/src/name/resolve.js +++ b/packages/interface-ipfs-core/src/name/resolve.js @@ -160,34 +160,106 @@ export function testResolve (factory, options) { after(() => factory.clean()) - it('should resolve /ipns/ipfs.io', async () => { - expect(await last(ipfs.name.resolve('/ipns/ipfs.io'))) - .to.match(/\/ipfs\/.+$/) + it('should resolve /ipns/ipfs.io', async function () { + const domain = 'ipfs.io' + + try { + expect(await last(ipfs.name.resolve(`/ipns/${domain}`))) + .to.match(/\/ipfs\/.+$/) + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) - it('should resolve /ipns/ipfs.io recursive === false', async () => { - expect(await last(ipfs.name.resolve('/ipns/ipfs.io', { recursive: false }))) - .to.match(/\/ipns\/.+$/) + it('should resolve /ipns/ipfs.io recursive === false', async function () { + const domain = 'ipfs.io' + + try { + expect(await last(ipfs.name.resolve(`/ipns/${domain}`, { recursive: false }))) + .to.match(/\/ipns\/.+$/) + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) - it('should resolve /ipns/ipfs.io recursive === true', async () => { - expect(await last(ipfs.name.resolve('/ipns/ipfs.io', { recursive: true }))) - .to.match(/\/ipfs\/.+$/) + it('should resolve /ipns/ipfs.io recursive === true', async function () { + const domain = 'ipfs.io' + + try { + expect(await last(ipfs.name.resolve(`/ipns/${domain}`, { recursive: true }))) + .to.match(/\/ipfs\/.+$/) + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) - it('should resolve /ipns/ipfs.io with remainder', async () => { - expect(await last(ipfs.name.resolve('/ipns/ipfs.io/images/ipfs-logo.svg'))) - .to.match(/\/ipfs\/.+\/images\/ipfs-logo.svg$/) + it('should resolve /ipns/ipfs.io with remainder', async function () { + const domain = 'ipfs.io' + + try { + expect(await last(ipfs.name.resolve(`/ipns/${domain}/images/ipfs-logo.svg`))) + .to.match(/\/ipfs\/.+\/images\/ipfs-logo.svg$/) + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) - it('should resolve /ipns/ipfs.io with remainder recursive === false', async () => { - expect(await last(ipfs.name.resolve('/ipns/ipfs.io/images/ipfs-logo.svg', { recursive: false }))) - .to.match(/\/ipns\/.+\/images\/ipfs-logo.svg$/) + it('should resolve /ipns/ipfs.io with remainder recursive === false', async function () { + const domain = 'ipfs.io' + + try { + expect(await last(ipfs.name.resolve(`/ipns/${domain}/images/ipfs-logo.svg`, { recursive: false }))) + .to.match(/\/ipns\/.+\/images\/ipfs-logo.svg$/) + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) - it('should resolve /ipns/ipfs.io with remainder recursive === true', async () => { - expect(await last(ipfs.name.resolve('/ipns/ipfs.io/images/ipfs-logo.svg', { recursive: true }))) - .to.match(/\/ipfs\/.+\/images\/ipfs-logo.svg$/) + it('should resolve /ipns/ipfs.io with remainder recursive === true', async function () { + const domain = 'ipfs.io' + + try { + expect(await last(ipfs.name.resolve(`/ipns/${domain}/images/ipfs-logo.svg`, { recursive: true }))) + .to.match(/\/ipfs\/.+\/images\/ipfs-logo.svg$/) + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) it('should fail to resolve /ipns/ipfs.a', async () => { @@ -198,9 +270,21 @@ export function testResolve (factory, options) { } }) - it('should resolve ipns path with hamt-shard recursive === true', async () => { - expect(await last(ipfs.name.resolve('/ipns/tr.wikipedia-on-ipfs.org/wiki/Anasayfa.html', { recursive: true }))) - .to.match(/\/ipfs\/.+$/) + it('should resolve ipns path with hamt-shard recursive === true', async function () { + const domain = 'tr.wikipedia-on-ipfs.org' + + try { + expect(await last(ipfs.name.resolve(`/ipns/${domain}/wiki/Anasayfa.html`, { recursive: true }))) + .to.match(/\/ipfs\/.+$/) + } catch (/** @type {any} */ err) { + // happens when running tests offline + if (err.message.includes(`ECONNREFUSED ${domain}`)) { + // @ts-expect-error this is mocha + return this.skip() + } + + throw err + } }) }) } diff --git a/packages/interface-ipfs-core/src/utils/ipfs-options-websockets-filter-all.js b/packages/interface-ipfs-core/src/utils/ipfs-options-websockets-filter-all.js index 88bc5c0ac1..b41ac55df2 100644 --- a/packages/interface-ipfs-core/src/utils/ipfs-options-websockets-filter-all.js +++ b/packages/interface-ipfs-core/src/utils/ipfs-options-websockets-filter-all.js @@ -1,4 +1,4 @@ -import { WebSockets } from '@libp2p/websockets' +import { webSockets } from '@libp2p/websockets' import { all } from '@libp2p/websockets/filters' export function ipfsOptionsWebsocketsFilterAll () { @@ -6,7 +6,7 @@ export function ipfsOptionsWebsocketsFilterAll () { libp2p: { config: { transports: [ - new WebSockets({ + webSockets({ filter: all }) ] diff --git a/packages/interface-ipfs-core/src/utils/mocha.js b/packages/interface-ipfs-core/src/utils/mocha.js index df6b791a71..bd5e93941e 100644 --- a/packages/interface-ipfs-core/src/utils/mocha.js +++ b/packages/interface-ipfs-core/src/utils/mocha.js @@ -100,7 +100,6 @@ export function getIt (config) { /** * @param {string} name * @param {*} impl - * @returns */ const _it = (name, impl) => { if (Array.isArray(config.skip)) { diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index 5156fddad3..f13d967ba3 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -67,9 +67,9 @@ "build": "aegir build --no-bundle" }, "dependencies": { - "@ipld/dag-cbor": "^7.0.0", - "@ipld/dag-json": "^8.0.1", - "@ipld/dag-pb": "^2.1.3", + "@ipld/dag-cbor": "^8.0.0", + "@ipld/dag-json": "^9.0.0", + "@ipld/dag-pb": "^3.0.0", "@libp2p/logger": "^2.0.0", "@libp2p/peer-id": "^1.1.10", "@multiformats/mafmt": "^11.0.2", @@ -84,18 +84,18 @@ "ipfs-daemon": "^0.14.2", "ipfs-http-client": "^58.0.1", "ipfs-utils": "^9.0.6", - "it-concat": "^2.0.0", - "it-merge": "^1.0.3", + "it-concat": "^3.0.1", + "it-merge": "^2.0.0", "it-pipe": "^2.0.3", - "it-split": "^1.0.0", + "it-split": "^2.0.0", "it-tar": "^6.0.0", "jsondiffpatch": "^0.4.1", - "multiformats": "^9.5.1", + "multiformats": "^10.0.0", "parse-duration": "^1.0.0", "pretty-bytes": "^6.0.0", "progress": "^2.0.3", "stream-to-it": "^0.2.2", - "uint8arrays": "^3.0.0", + "uint8arrays": "^4.0.2", "yargs": "^17.4.0" }, "devDependencies": { @@ -106,11 +106,11 @@ "@types/rimraf": "^3.0.1", "@types/yargs": "^17.0.10", "aegir": "^37.0.11", - "ipfs-repo": "^15.0.3", - "it-all": "^1.0.4", - "it-first": "^1.0.4", - "it-map": "^1.0.6", - "it-to-buffer": "^2.0.0", + "ipfs-repo": "^16.0.0", + "it-all": "^2.0.0", + "it-first": "^2.0.0", + "it-map": "^2.0.0", + "it-to-buffer": "^3.0.0", "nanoid": "^4.0.0", "ncp": "^2.0.0", "pako": "^2.0.4", diff --git a/packages/ipfs-cli/src/commands/add.js b/packages/ipfs-cli/src/commands/add.js index e5c2434ae6..77f81e768b 100644 --- a/packages/ipfs-cli/src/commands/add.js +++ b/packages/ipfs-cli/src/commands/add.js @@ -86,7 +86,7 @@ async function * getSource (target, options = {}) { * @property {import('../types').Context} Argv.ctx * @property {boolean} Argv.trickle * @property {number} Argv.shardSplitThreshold - * @property {import('multiformats/cid').CIDVersion} Argv.cidVersion + * @property {import('multiformats/cid').Version} Argv.cidVersion * @property {boolean} Argv.rawLeaves * @property {boolean} Argv.onlyHash * @property {string} Argv.hash diff --git a/packages/ipfs-cli/src/commands/block/put.js b/packages/ipfs-cli/src/commands/block/put.js index 2f4b1607dc..8156286037 100644 --- a/packages/ipfs-cli/src/commands/block/put.js +++ b/packages/ipfs-cli/src/commands/block/put.js @@ -9,7 +9,7 @@ import parseDuration from 'parse-duration' * @property {string} Argv.format * @property {string} Argv.mhtype * @property {number} Argv.mhlen - * @property {import('multiformats/cid').CIDVersion} Argv.version + * @property {import('multiformats/cid').Version} Argv.version * @property {boolean} Argv.pin * @property {string} Argv.cidBase * @property {number} Argv.timeout @@ -62,7 +62,7 @@ const command = { if (block) { data = fs.readFileSync(block) } else { - data = (await concat(getStdin(), { type: 'buffer' })).slice() + data = (await concat(getStdin(), { type: 'buffer' })).subarray() } const cid = await ipfs.block.put(data, { diff --git a/packages/ipfs-cli/src/commands/cid/format.js b/packages/ipfs-cli/src/commands/cid/format.js index 9e680d6bef..8a0f4984f1 100644 --- a/packages/ipfs-cli/src/commands/cid/format.js +++ b/packages/ipfs-cli/src/commands/cid/format.js @@ -6,7 +6,7 @@ import { CID } from 'multiformats/cid' * @property {import('../../types').Context} Argv.ctx * @property {string[]} [Argv.cids] * @property {string} [Argv.format] - * @property {import('multiformats/cid').CIDVersion} [Argv.cidVersion] + * @property {import('multiformats/cid').Version} [Argv.cidVersion] * @property {string} [Argv.base] */ diff --git a/packages/ipfs-cli/src/commands/dag/put.js b/packages/ipfs-cli/src/commands/dag/put.js index d6de5428ad..d82f7a83c1 100644 --- a/packages/ipfs-cli/src/commands/dag/put.js +++ b/packages/ipfs-cli/src/commands/dag/put.js @@ -24,7 +24,7 @@ const codecs = [dagCBOR, dagJSON, dagPB, raw].reduce((/** @type {Record { const out = await cli('object put', { ipfs, getStdin: function * () { - yield Buffer.from('{}') + yield uint8ArrayFromString('{}') } }) @@ -431,7 +431,7 @@ describe('object', () => { it('append data from pipe', async () => { ipfs.bases.getBase.withArgs('base58btc').returns(base58btc) - const buf = Buffer.from('hello world') + const buf = uint8ArrayFromString('hello world') ipfs.object.patch.appendData.withArgs(cid, buf, defaultOptions).resolves( cid @@ -496,7 +496,7 @@ describe('object', () => { it('set-data from pipe', async () => { ipfs.bases.getBase.withArgs('base58btc').returns(base58btc) - const buf = Buffer.from('hello world') + const buf = uint8ArrayFromString('hello world') ipfs.object.patch.setData.withArgs(cid, buf, defaultOptions).resolves( cid diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index ce76cd7e38..7d903f97a8 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -95,26 +95,26 @@ }, "dependencies": { "@chainsafe/libp2p-gossipsub": "^4.0.0", - "@libp2p/floodsub": "^3.0.0", - "@libp2p/logger": "^2.0.0", - "@libp2p/mdns": "^3.0.0", - "@libp2p/tcp": "^3.0.1", - "@libp2p/webrtc-star": "^3.0.0", - "blockstore-datastore-adapter": "^3.0.0", + "@libp2p/floodsub": "^5.0.0", + "@libp2p/logger": "^2.0.2", + "@libp2p/mdns": "^5.0.0", + "@libp2p/tcp": "^5.0.0", + "@libp2p/webrtc-star": "^5.0.2", + "blockstore-datastore-adapter": "^4.0.0", "datastore-core": "^8.0.1", "datastore-fs": "^8.0.0", "datastore-level": "^9.0.0", "err-code": "^3.0.1", "hashlru": "^2.3.0", "interface-datastore": "^7.0.0", - "ipfs-repo": "^15.0.3", + "ipfs-repo": "^16.0.0", "ipfs-utils": "^9.0.6", "is-ipfs": "^7.0.0", - "it-all": "^1.0.4", - "it-drain": "^1.0.3", - "it-foreach": "^0.1.1", + "it-all": "^2.0.0", + "it-drain": "^2.0.0", + "it-foreach": "^1.0.0", "p-queue": "^7.2.0", - "uint8arrays": "^3.0.0" + "uint8arrays": "^4.0.2" }, "devDependencies": { "aegir": "^37.0.11", diff --git a/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js b/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js index d2749def9a..476df5b6c4 100644 --- a/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js +++ b/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js @@ -2,13 +2,33 @@ import { GossipSub } from '@chainsafe/libp2p-gossipsub' /** @typedef {import('@libp2p/interface-pubsub').PubSub} PubSub */ -/** @type {() => Record}>} */ +/** @type {() => Record PubSub>}>} */ export const routers = () => ({ - gossipsub: new GossipSub({ - allowPublishToZeroPeers: true, - fallbackToFloodsub: true, - emitSelf: true, - maxInboundStreams: 64, - maxOutboundStreams: 128 - }) + // @ts-expect-error GossubSub is out of date + gossipsub: (/** @type {any} */ components) => { + const gossipsub = new GossipSub({ + allowPublishToZeroPeers: true, + fallbackToFloodsub: true, + emitSelf: true, + maxInboundStreams: 64, + maxOutboundStreams: 128 + }) + // @ts-expect-error GossubSub is out of date + gossipsub.init({ + getPeerId () { + return components.peerId + }, + getPeerStore () { + return components.peerStore + }, + getRegistrar () { + return components.registrar + }, + getConnectionManager () { + return components.connectionManager + } + }) + + return gossipsub + } }) diff --git a/packages/ipfs-core-config/src/libp2p-pubsub-routers.js b/packages/ipfs-core-config/src/libp2p-pubsub-routers.js index b21da2882a..1d5dd7cb5e 100644 --- a/packages/ipfs-core-config/src/libp2p-pubsub-routers.js +++ b/packages/ipfs-core-config/src/libp2p-pubsub-routers.js @@ -1,18 +1,38 @@ import { GossipSub } from '@chainsafe/libp2p-gossipsub' -import { FloodSub } from '@libp2p/floodsub' +import { floodsub } from '@libp2p/floodsub' /** @typedef {import('@libp2p/interface-pubsub').PubSub} PubSub */ -/** @type {() => Record}>} */ +/** @type {() => Record PubSub>}>} */ export const routers = () => ({ - gossipsub: new GossipSub({ - allowPublishToZeroPeers: true, - fallbackToFloodsub: true, - emitSelf: true, - maxInboundStreams: 64, - maxOutboundStreams: 128 - }), - floodsub: new FloodSub({ + // @ts-expect-error GossubSub is out of date + gossipsub: (/** @type {any} */ components) => { + const gossipsub = new GossipSub({ + allowPublishToZeroPeers: true, + fallbackToFloodsub: true, + emitSelf: true, + maxInboundStreams: 64, + maxOutboundStreams: 128 + }) + // @ts-expect-error GossubSub is out of date + gossipsub.init({ + getPeerId () { + return components.peerId + }, + getPeerStore () { + return components.peerStore + }, + getRegistrar () { + return components.registrar + }, + getConnectionManager () { + return components.connectionManager + } + }) + + return gossipsub + }, + floodsub: floodsub({ emitSelf: true }) }) diff --git a/packages/ipfs-core-config/src/libp2p.browser.js b/packages/ipfs-core-config/src/libp2p.browser.js index 59de391ffd..f5f5d34225 100644 --- a/packages/ipfs-core-config/src/libp2p.browser.js +++ b/packages/ipfs-core-config/src/libp2p.browser.js @@ -1,12 +1,12 @@ -import { WebRTCStar } from '@libp2p/webrtc-star' +import { webRTCStar } from '@libp2p/webrtc-star' export function libp2pConfig () { - const webRtcStar = new WebRTCStar() + const webRtcStar = webRTCStar() /** @type {import('libp2p').Libp2pOptions} */ const options = { transports: [ - webRtcStar + webRtcStar.transport ], peerDiscovery: [ webRtcStar.discovery diff --git a/packages/ipfs-core-config/src/libp2p.js b/packages/ipfs-core-config/src/libp2p.js index 57032303da..01c4cb97f6 100644 --- a/packages/ipfs-core-config/src/libp2p.js +++ b/packages/ipfs-core-config/src/libp2p.js @@ -1,15 +1,15 @@ -import { TCP } from '@libp2p/tcp' -import { MulticastDNS } from '@libp2p/mdns' +import { tcp } from '@libp2p/tcp' +import { mdns } from '@libp2p/mdns' import os from 'os' export function libp2pConfig () { /** @type {import('libp2p').Libp2pOptions} */ const options = { transports: [ - new TCP() + tcp() ], peerDiscovery: [ - new MulticastDNS() + mdns() ], connectionManager: { maxParallelDials: 150, // 150 total parallel multiaddr dials diff --git a/packages/ipfs-core-types/package.json b/packages/ipfs-core-types/package.json index 7a5daf7c69..6db01f2275 100644 --- a/packages/ipfs-core-types/package.json +++ b/packages/ipfs-core-types/package.json @@ -47,16 +47,16 @@ "build": "aegir build" }, "dependencies": { - "@ipld/dag-pb": "^2.1.3", + "@ipld/dag-pb": "^3.0.0", "@libp2p/interface-keychain": "^1.0.3", "@libp2p/interface-peer-id": "^1.0.4", "@libp2p/interface-peer-info": "^1.0.2", - "@libp2p/interface-pubsub": "^2.0.0", + "@libp2p/interface-pubsub": "^3.0.0", "@multiformats/multiaddr": "^11.0.0", "@types/node": "^18.0.0", "interface-datastore": "^7.0.0", - "ipfs-unixfs": "^7.0.0", - "multiformats": "^9.5.1" + "ipfs-unixfs": "^8.0.0", + "multiformats": "^10.0.0" }, "devDependencies": { "aegir": "^37.0.11" diff --git a/packages/ipfs-core-types/src/block/index.ts b/packages/ipfs-core-types/src/block/index.ts index 9872bec152..5b0c7a9cef 100644 --- a/packages/ipfs-core-types/src/block/index.ts +++ b/packages/ipfs-core-types/src/block/index.ts @@ -1,5 +1,5 @@ import type { AbortOptions, PreloadOptions } from '../utils' -import type { CID, CIDVersion } from 'multiformats/cid' +import type { CID, Version as CIDVersion } from 'multiformats/cid' export interface API { /** diff --git a/packages/ipfs-core-types/src/dag/index.ts b/packages/ipfs-core-types/src/dag/index.ts index 875ea131cc..116ee95b33 100644 --- a/packages/ipfs-core-types/src/dag/index.ts +++ b/packages/ipfs-core-types/src/dag/index.ts @@ -1,5 +1,5 @@ import type { AbortOptions, PreloadOptions, IPFSPath } from '../utils' -import type { CID, CIDVersion } from 'multiformats/cid' +import type { CID, Version as CIDVersion } from 'multiformats/cid' export interface API { /** diff --git a/packages/ipfs-core-types/src/files/index.ts b/packages/ipfs-core-types/src/files/index.ts index c30f59334f..d64614a74a 100644 --- a/packages/ipfs-core-types/src/files/index.ts +++ b/packages/ipfs-core-types/src/files/index.ts @@ -1,5 +1,5 @@ import type { AbortOptions, IPFSPath } from '../utils' -import type { CID, CIDVersion } from 'multiformats/cid' +import type { CID, Version as CIDVersion } from 'multiformats/cid' import type { Mtime, MtimeLike } from 'ipfs-unixfs' import type { AddProgressFn } from '../root' diff --git a/packages/ipfs-core-types/src/root.ts b/packages/ipfs-core-types/src/root.ts index a761e201c2..c12ad0e832 100644 --- a/packages/ipfs-core-types/src/root.ts +++ b/packages/ipfs-core-types/src/root.ts @@ -1,5 +1,5 @@ import type { AbortOptions, PreloadOptions, IPFSPath, ImportCandidateStream, ImportCandidate } from './utils' -import type { CID, CIDVersion } from 'multiformats/cid' +import type { CID, Version as CIDVersion } from 'multiformats/cid' import type { Mtime } from 'ipfs-unixfs' import type { Multiaddr } from '@multiformats/multiaddr' import type { PeerId } from '@libp2p/interface-peer-id' diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index 9fb748860d..521618280e 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -144,22 +144,22 @@ "@multiformats/multiaddr": "^11.0.0", "@multiformats/multiaddr-to-uri": "^9.0.1", "any-signal": "^3.0.0", - "blob-to-it": "^1.0.1", - "browser-readablestream-to-it": "^1.0.1", + "blob-to-it": "^2.0.0", + "browser-readablestream-to-it": "^2.0.0", "err-code": "^3.0.1", "ipfs-core-types": "^0.12.1", - "ipfs-unixfs": "^7.0.0", + "ipfs-unixfs": "^8.0.0", "ipfs-utils": "^9.0.6", - "it-all": "^1.0.4", - "it-map": "^1.0.6", - "it-peekable": "^1.0.2", + "it-all": "^2.0.0", + "it-map": "^2.0.0", + "it-peekable": "^2.0.0", "it-to-stream": "^1.0.0", "merge-options": "^3.0.4", - "multiformats": "^9.5.1", + "multiformats": "^10.0.0", "nanoid": "^4.0.0", "parse-duration": "^1.0.0", "timeout-abort-controller": "^3.0.0", - "uint8arrays": "^3.0.0" + "uint8arrays": "^4.0.2" }, "devDependencies": { "@web-std/file": "^3.0.2", diff --git a/packages/ipfs-core-utils/src/files/normalise-candidate-single.js b/packages/ipfs-core-utils/src/files/normalise-candidate-single.js index 1616cde954..9be8814101 100644 --- a/packages/ipfs-core-utils/src/files/normalise-candidate-single.js +++ b/packages/ipfs-core-utils/src/files/normalise-candidate-single.js @@ -49,7 +49,6 @@ export async function * normaliseCandidateSingle (input, normaliseContent) { // Iterable if (Symbol.iterator in input || Symbol.asyncIterator in input) { - // @ts-expect-error it's (async)iterable const peekable = itPeekable(input) /** @type {any} value **/ diff --git a/packages/ipfs-core/.aegir.js b/packages/ipfs-core/.aegir.js index e54714d714..5e37662ad7 100644 --- a/packages/ipfs-core/.aegir.js +++ b/packages/ipfs-core/.aegir.js @@ -6,17 +6,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)) /** @type {import('aegir').Options["build"]["config"]} */ const esbuild = { - inject: [path.join(__dirname, '../../scripts/node-globals.js')], - plugins: [ - { - name: 'node built ins', - setup (build) { - build.onResolve({ filter: /^stream$/ }, () => { - return { path: require.resolve('readable-stream') } - }) - } - } - ] + inject: [path.join(__dirname, '../../scripts/node-globals.js')] } /** @type {import('aegir').PartialOptions} */ diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 0b889bb92f..4f9ffcd02d 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -74,77 +74,77 @@ "dep-check": "aegir dep-check -i interface-ipfs-core -i ipfs-core-types --i interface-blockstore -i @libp2p/interface-dht -i @libp2p/interface-keys -i @libp2p/interface-transport -i @libp2p/interfaces" }, "dependencies": { - "@chainsafe/libp2p-noise": "^8.0.0", - "@ipld/car": "^4.1.0", - "@ipld/dag-cbor": "^7.0.0", - "@ipld/dag-json": "^8.0.1", - "@ipld/dag-pb": "^2.1.3", - "@libp2p/bootstrap": "^2.0.0", + "@chainsafe/libp2p-noise": "^10.0.0", + "@ipld/car": "^5.0.0", + "@ipld/dag-cbor": "^8.0.0", + "@ipld/dag-json": "^9.0.0", + "@ipld/dag-pb": "^3.0.0", + "@libp2p/bootstrap": "^5.0.0", "@libp2p/crypto": "^1.0.0", - "@libp2p/delegated-content-routing": "^2.0.1", - "@libp2p/delegated-peer-routing": "^2.0.1", - "@libp2p/interface-dht": "^1.0.1", + "@libp2p/delegated-content-routing": "^3.0.0", + "@libp2p/delegated-peer-routing": "^3.0.0", + "@libp2p/interface-dht": "^1.0.2", "@libp2p/interface-keys": "^1.0.3", - "@libp2p/interface-peer-id": "^1.0.4", - "@libp2p/interface-transport": "^1.0.2", + "@libp2p/interface-peer-id": "^1.0.5", + "@libp2p/interface-transport": "^2.0.0", "@libp2p/interfaces": "^3.0.3", - "@libp2p/kad-dht": "^3.0.0", - "@libp2p/logger": "^2.0.0", - "@libp2p/mplex": "^5.2.0", - "@libp2p/peer-id": "^1.1.10", - "@libp2p/peer-id-factory": "^1.0.10", - "@libp2p/record": "^2.0.0", - "@libp2p/websockets": "^3.0.0", + "@libp2p/kad-dht": "^5.0.1", + "@libp2p/logger": "^2.0.2", + "@libp2p/mplex": "^7.0.0", + "@libp2p/peer-id": "^1.1.16", + "@libp2p/peer-id-factory": "^1.0.19", + "@libp2p/record": "^2.0.3", + "@libp2p/websockets": "^5.0.0", "@multiformats/mafmt": "^11.0.2", "@multiformats/multiaddr": "^11.0.0", "@multiformats/multiaddr-to-uri": "^9.0.1", - "@multiformats/murmur3": "^1.1.1", + "@multiformats/murmur3": "^2.0.0", "any-signal": "^3.0.0", "array-shuffle": "^3.0.0", "blockstore-core": "^2.0.1", - "dag-jose": "^2.0.1", + "dag-jose": "^3.0.1", "datastore-core": "^8.0.1", - "datastore-pubsub": "^4.0.2", + "datastore-pubsub": "^6.0.0", "dlv": "^1.1.3", "err-code": "^3.0.1", "hamt-sharding": "^3.0.0", "hashlru": "^2.3.0", "interface-blockstore": "^3.0.0", "interface-datastore": "^7.0.0", - "ipfs-bitswap": "^12.0.3", + "ipfs-bitswap": "^13.0.0", "ipfs-core-config": "^0.5.1", "ipfs-core-types": "^0.12.1", "ipfs-core-utils": "^0.16.1", "ipfs-http-client": "^58.0.1", - "ipfs-repo": "^15.0.3", - "ipfs-unixfs": "^7.0.0", - "ipfs-unixfs-exporter": "^8.0.6", - "ipfs-unixfs-importer": "^10.0.2", + "ipfs-repo": "^16.0.0", + "ipfs-unixfs": "^8.0.0", + "ipfs-unixfs-exporter": "^9.0.0", + "ipfs-unixfs-importer": "^11.0.0", "ipfs-utils": "^9.0.6", - "ipns": "^3.0.0", + "ipns": "^4.0.0", "is-domain-name": "^1.0.1", "is-ipfs": "^7.0.0", - "it-drain": "^1.0.3", - "it-filter": "^1.0.2", - "it-first": "^1.0.6", - "it-last": "^1.0.4", - "it-map": "^1.0.6", - "it-merge": "^1.0.3", - "it-parallel": "^2.0.1", - "it-peekable": "^1.0.2", + "it-drain": "^2.0.0", + "it-filter": "^2.0.0", + "it-first": "^2.0.0", + "it-last": "^2.0.0", + "it-map": "^2.0.0", + "it-merge": "^2.0.0", + "it-parallel": "^3.0.0", + "it-peekable": "^2.0.0", "it-pipe": "^2.0.3", "it-pushable": "^3.0.0", "it-tar": "^6.0.0", - "it-to-buffer": "^2.0.0", + "it-to-buffer": "^3.0.0", "just-safe-set": "^4.0.2", - "libp2p": "^0.39.2", + "libp2p": "^0.40.0", "merge-options": "^3.0.4", "mortice": "^3.0.0", - "multiformats": "^9.5.1", + "multiformats": "^10.0.0", "pako": "^2.0.4", "parse-duration": "^1.0.0", "timeout-abort-controller": "^3.0.0", - "uint8arrays": "^3.0.0" + "uint8arrays": "^4.0.2" }, "devDependencies": { "@chainsafe/libp2p-gossipsub": "^4.0.0", @@ -152,14 +152,14 @@ "@types/pako": "^2.0.0", "@types/rimraf": "^3.0.1", "aegir": "^37.0.11", - "blockstore-datastore-adapter": "^3.0.0", + "blockstore-datastore-adapter": "^4.0.0", "delay": "^5.0.0", - "go-ipfs": "^0.12.1", + "go-ipfs": "^0.12.0", "interface-blockstore-tests": "^3.0.0", "interface-ipfs-core": "^0.156.1", "ipfsd-ctl": "^12.0.3", "iso-url": "^1.0.0", - "it-all": "^1.0.4", + "it-all": "^2.0.0", "nanoid": "^4.0.0", "p-defer": "^4.0.0", "rimraf": "^3.0.2", diff --git a/packages/ipfs-core/src/components/block/put.js b/packages/ipfs-core/src/components/block/put.js index 1066790f44..54566cdef7 100644 --- a/packages/ipfs-core/src/components/block/put.js +++ b/packages/ipfs-core/src/components/block/put.js @@ -2,7 +2,7 @@ import { CID } from 'multiformats/cid' import { withTimeoutOption } from 'ipfs-core-utils/with-timeout-option' /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion */ /** diff --git a/packages/ipfs-core/src/components/dag/export.js b/packages/ipfs-core/src/components/dag/export.js index ad37aacb8a..5fc24ec7bc 100644 --- a/packages/ipfs-core/src/components/dag/export.js +++ b/packages/ipfs-core/src/components/dag/export.js @@ -25,7 +25,10 @@ const NO_LINKS_CODECS = [ /** * @template T - * @typedef {import('multiformats/block').Block} Block + * @template C + * @template A + * @template V + * @typedef {import('multiformats/block').Block} Block */ /** @@ -85,12 +88,11 @@ export function createExport ({ repo, preload, codecs }) { } /** - * @template T * @param {IPFSRepo} repo * @param {BlockWriter} writer * @param {AbortOptions} options * @param {import('ipfs-core-utils/multicodecs').Multicodecs} codecs - * @returns {(cid:CID)=>Promise|null>} + * @returns {(cid:CID)=>Promise|null>} */ function makeLoader (repo, writer, options, codecs) { return async (cid) => { diff --git a/packages/ipfs-core/src/components/files/chmod.js b/packages/ipfs-core/src/components/files/chmod.js index 76783e3c52..3806fd64f7 100644 --- a/packages/ipfs-core/src/components/files/chmod.js +++ b/packages/ipfs-core/src/components/files/chmod.js @@ -22,7 +22,7 @@ const mergeOptions = mergeOpts.bind({ ignoreUndefined: true }) const log = logger('ipfs:mfs:touch') /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('@ipld/dag-pb').PBNode} PBNode * @typedef {import('./').MfsContext} MfsContext * diff --git a/packages/ipfs-core/src/components/files/cp.js b/packages/ipfs-core/src/components/files/cp.js index 607156c177..57b4ad88cb 100644 --- a/packages/ipfs-core/src/components/files/cp.js +++ b/packages/ipfs-core/src/components/files/cp.js @@ -16,7 +16,7 @@ const log = logger('ipfs:mfs:cp') /** * @typedef {import('@ipld/dag-pb').PBNode} DAGNode * @typedef {import('multiformats/cid').CID} CID - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('ipfs-unixfs').Mtime} Mtime * @typedef {import('./utils/to-mfs-path').MfsPath} MfsPath * @typedef {import('./utils/to-trail').MfsTrail} MfsTrail diff --git a/packages/ipfs-core/src/components/files/mkdir.js b/packages/ipfs-core/src/components/files/mkdir.js index ec55f8e6e4..ec8164e992 100644 --- a/packages/ipfs-core/src/components/files/mkdir.js +++ b/packages/ipfs-core/src/components/files/mkdir.js @@ -16,7 +16,7 @@ const log = logger('ipfs:mfs:mkdir') /** * @typedef {import('@ipld/dag-pb').PBNode} PBNode * @typedef {import('multiformats/cid').CID} CID - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('ipfs-unixfs').MtimeLike} MtimeLike * @typedef {import('./').MfsContext} MfsContext * @typedef {object} DefaultOptions diff --git a/packages/ipfs-core/src/components/files/mv.js b/packages/ipfs-core/src/components/files/mv.js index b972d251b4..1470b9d95e 100644 --- a/packages/ipfs-core/src/components/files/mv.js +++ b/packages/ipfs-core/src/components/files/mv.js @@ -6,7 +6,7 @@ import { withTimeoutOption } from 'ipfs-core-utils/with-timeout-option' const mergeOptions = mergeOpts.bind({ ignoreUndefined: true }) /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('./').MfsContext} MfsContext * @typedef {object} DefaultOptions * @property {boolean} parents diff --git a/packages/ipfs-core/src/components/files/rm.js b/packages/ipfs-core/src/components/files/rm.js index 33d5cb5e43..6321cac958 100644 --- a/packages/ipfs-core/src/components/files/rm.js +++ b/packages/ipfs-core/src/components/files/rm.js @@ -10,7 +10,7 @@ import mergeOpts from 'merge-options' const mergeOptions = mergeOpts.bind({ ignoreUndefined: true }) /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('./').MfsContext} MfsContext * @typedef {object} DefaultOptions * @property {boolean} recursive diff --git a/packages/ipfs-core/src/components/files/touch.js b/packages/ipfs-core/src/components/files/touch.js index 41d5f6fba2..5530b9dd89 100644 --- a/packages/ipfs-core/src/components/files/touch.js +++ b/packages/ipfs-core/src/components/files/touch.js @@ -15,7 +15,7 @@ const mergeOptions = mergeOpts.bind({ ignoreUndefined: true }) const log = logger('ipfs:mfs:touch') /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('ipfs-unixfs').MtimeLike} MtimeLike * @typedef {import('./').MfsContext} MfsContext * @typedef {object} DefaultOptions diff --git a/packages/ipfs-core/src/components/files/utils/add-link.js b/packages/ipfs-core/src/components/files/utils/add-link.js index 60a2772aea..7c1e16da7d 100644 --- a/packages/ipfs-core/src/components/files/utils/add-link.js +++ b/packages/ipfs-core/src/components/files/utils/add-link.js @@ -18,7 +18,7 @@ const log = logger('ipfs:mfs:core:utils:add-link') /** * @typedef {import('ipfs-unixfs').Mtime} Mtime - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('hamt-sharding').Bucket} Bucket * @typedef {import('../').MfsContext} MfsContext * @typedef {import('@ipld/dag-pb').PBNode} PBNode diff --git a/packages/ipfs-core/src/components/files/utils/create-node.js b/packages/ipfs-core/src/components/files/utils/create-node.js index 09250a6e59..c2ff579f6c 100644 --- a/packages/ipfs-core/src/components/files/utils/create-node.js +++ b/packages/ipfs-core/src/components/files/utils/create-node.js @@ -4,7 +4,7 @@ import { CID } from 'multiformats/cid' /** * @typedef {import('ipfs-unixfs').MtimeLike} MtimeLike - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('../').MfsContext} MfsContext */ diff --git a/packages/ipfs-core/src/components/files/utils/dir-sharded.js b/packages/ipfs-core/src/components/files/utils/dir-sharded.js index 81cd48043b..32a7511393 100644 --- a/packages/ipfs-core/src/components/files/utils/dir-sharded.js +++ b/packages/ipfs-core/src/components/files/utils/dir-sharded.js @@ -27,7 +27,7 @@ import { * @property {Mtime} [mtime] * @property {number} [mode] * @property {import('multiformats/codecs/interface').BlockCodec} [codec] - * @property {import('multiformats/cid').CIDVersion} [cidVersion] + * @property {import('multiformats/cid').Version} [cidVersion] * @property {boolean} [onlyHash] * @property {AbortSignal} [signal] */ diff --git a/packages/ipfs-core/src/components/files/utils/hamt-utils.js b/packages/ipfs-core/src/components/files/utils/hamt-utils.js index f70907678d..e31940ca46 100644 --- a/packages/ipfs-core/src/components/files/utils/hamt-utils.js +++ b/packages/ipfs-core/src/components/files/utils/hamt-utils.js @@ -17,7 +17,7 @@ import { const log = logger('ipfs:mfs:core:utils:hamt-utils') /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('ipfs-unixfs').Mtime} Mtime * @typedef {import('../').MfsContext} MfsContext * @typedef {import('@ipld/dag-pb').PBNode} PBNode diff --git a/packages/ipfs-core/src/components/files/utils/persist.js b/packages/ipfs-core/src/components/files/utils/persist.js index 0d8c6bbcc9..5617683655 100644 --- a/packages/ipfs-core/src/components/files/utils/persist.js +++ b/packages/ipfs-core/src/components/files/utils/persist.js @@ -6,7 +6,7 @@ import { sha256 } from 'multiformats/hashes/sha2' * @typedef {object} PersistOptions * @property {import('multiformats/codecs/interface').BlockCodec} [codec] * @property {import('multiformats/hashes/interface').MultihashHasher} [hasher] - * @property {import('multiformats/cid').CIDVersion} [cidVersion] + * @property {import('multiformats/cid').Version} [cidVersion] * @property {boolean} [onlyHash] * @property {AbortSignal} [signal] */ diff --git a/packages/ipfs-core/src/components/files/utils/remove-link.js b/packages/ipfs-core/src/components/files/utils/remove-link.js index 104cff1fa4..0d81494a48 100644 --- a/packages/ipfs-core/src/components/files/utils/remove-link.js +++ b/packages/ipfs-core/src/components/files/utils/remove-link.js @@ -13,7 +13,7 @@ const log = logger('ipfs:mfs:core:utils:remove-link') /** * @typedef {import('../').MfsContext} MfsContext - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('hamt-sharding').Bucket} Bucket * @typedef {import('@ipld/dag-pb').PBNode} PBNode * diff --git a/packages/ipfs-core/src/components/files/utils/update-tree.js b/packages/ipfs-core/src/components/files/utils/update-tree.js index 26af608e75..eb504332a1 100644 --- a/packages/ipfs-core/src/components/files/utils/update-tree.js +++ b/packages/ipfs-core/src/components/files/utils/update-tree.js @@ -12,7 +12,7 @@ const defaultOptions = { /** * @typedef {import('multiformats/cid').CID} CID - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('../').MfsContext} MfsContext * @typedef {import('./to-trail').MfsTrail} MfsTrail */ diff --git a/packages/ipfs-core/src/components/files/write.js b/packages/ipfs-core/src/components/files/write.js index 9e81518b39..3bca1e99fa 100644 --- a/packages/ipfs-core/src/components/files/write.js +++ b/packages/ipfs-core/src/components/files/write.js @@ -29,7 +29,7 @@ const mergeOptions = mergeOpts.bind({ ignoreUndefined: true }) const log = logger('ipfs:mfs:write') /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('ipfs-unixfs').MtimeLike} MtimeLike * @typedef {import('./').MfsContext} MfsContext * @typedef {import('./utils/to-mfs-path').FilePath} FilePath diff --git a/packages/ipfs-core/src/components/libp2p.js b/packages/ipfs-core/src/components/libp2p.js index 3ca9c8517b..1c1b57c29f 100644 --- a/packages/ipfs-core/src/components/libp2p.js +++ b/packages/ipfs-core/src/components/libp2p.js @@ -2,20 +2,20 @@ import get from 'dlv' import mergeOpts from 'merge-options' import errCode from 'err-code' import { routers } from 'ipfs-core-config/libp2p-pubsub-routers' -import { DelegatedPeerRouting } from '@libp2p/delegated-peer-routing' -import { DelegatedContentRouting } from '@libp2p/delegated-content-routing' +import { delegatedPeerRouting } from '@libp2p/delegated-peer-routing' +import { delegatedContentRouting } from '@libp2p/delegated-content-routing' import { create as ipfsHttpClient } from 'ipfs-http-client' import { multiaddr } from '@multiformats/multiaddr' import { ipfsCore as pkgversion } from '../version.js' import { libp2pConfig as getEnvLibp2pOptions } from 'ipfs-core-config/libp2p' import { createLibp2p as createNode } from 'libp2p' -import { KadDHT } from '@libp2p/kad-dht' -import { Bootstrap } from '@libp2p/bootstrap' +import { kadDHT } from '@libp2p/kad-dht' +import { bootstrap } from '@libp2p/bootstrap' import { ipnsValidator } from 'ipns/validator' import { ipnsSelector } from 'ipns/selector' -import { WebSockets } from '@libp2p/websockets' -import { Mplex } from '@libp2p/mplex' -import { Noise } from '@chainsafe/libp2p-noise' +import { webSockets } from '@libp2p/websockets' +import { mplex } from '@libp2p/mplex' +import { noise } from '@chainsafe/libp2p-noise' const mergeOptions = mergeOpts.bind({ ignoreUndefined: true, concatArrays: true }) @@ -125,13 +125,13 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId, peerDiscovery: [], transports: [], streamMuxers: [ - new Mplex({ + mplex({ maxInboundStreams: 256, maxOutboundStreams: 1024 }) ], connectionEncryption: [ - new Noise() + noise() ], relay: { enabled: get(options, 'relay.enabled', get(config, 'relay.enabled', true)), @@ -150,7 +150,7 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId, } if (get(config, 'Routing.Type', 'dhtclient') !== 'none') { - libp2pOptions.dht = new KadDHT({ + libp2pOptions.dht = kadDHT({ clientMode: get(config, 'Routing.Type', 'dht') !== 'dhtserver', kBucketSize: get(options, 'dht.kBucketSize', 20), validators: { @@ -166,7 +166,7 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId, if (boostrapNodes.length > 0) { libp2pOptions.peerDiscovery?.push( - new Bootstrap({ + bootstrap({ list: boostrapNodes }) ) @@ -207,13 +207,20 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId, const delegateHttpClient = ipfsHttpClient(delegateApiOptions) - libp2pFinalConfig.contentRouters?.push(new DelegatedContentRouting(delegateHttpClient)) - libp2pFinalConfig.peerRouters?.push(new DelegatedPeerRouting(delegateHttpClient)) + libp2pFinalConfig.contentRouters?.push(delegatedContentRouting(delegateHttpClient)) + libp2pFinalConfig.peerRouters?.push(delegatedPeerRouting(delegateHttpClient)) } + // TODO: fixme if (!get(options, 'config.Discovery.MDNS.Enabled', get(config, 'Discovery.MDNS.Enabled', true))) { libp2pFinalConfig.peerDiscovery = libp2pFinalConfig.peerDiscovery?.filter(d => { - return d != null && d[Symbol.toStringTag] !== '@libp2p/mdns' + try { + if (typeof d === 'function') { + // @ts-expect-error not components + return d({})[Symbol.toStringTag] !== '@libp2p/mdns' + } + } catch {} + return true }) } @@ -222,8 +229,15 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId, } // add WebSocket transport if not overridden by user config - if (libp2pFinalConfig.transports.find(t => t[Symbol.toStringTag] === '@libp2p/websockets') == null) { - libp2pFinalConfig.transports.push(new WebSockets()) + if (libp2pFinalConfig.transports.find(t => { + try { + if (typeof t === 'function') { + return t({})[Symbol.toStringTag] === '@libp2p/websockets' + } + } catch {} + return false + }) == null) { + libp2pFinalConfig.transports.push(webSockets()) } return libp2pFinalConfig diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index 32c9cd255c..3ffddb23c5 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -64,7 +64,7 @@ }, "dependencies": { "@libp2p/logger": "^2.0.0", - "@libp2p/webrtc-star": "^3.0.0", + "@libp2p/webrtc-star": "^5.0.2", "@mapbox/node-pre-gyp": "^1.0.5", "ipfs-core": "^0.16.1", "ipfs-core-types": "^0.12.1", @@ -72,7 +72,7 @@ "ipfs-http-gateway": "^0.11.1", "ipfs-http-server": "^0.13.2", "ipfs-utils": "^9.0.6", - "libp2p": "^0.39.2" + "libp2p": "^0.40.0" }, "devDependencies": { "aegir": "^37.0.11", diff --git a/packages/ipfs-daemon/src/index.js b/packages/ipfs-daemon/src/index.js index 5ccbe80093..fa92fd4357 100644 --- a/packages/ipfs-daemon/src/index.js +++ b/packages/ipfs-daemon/src/index.js @@ -1,5 +1,5 @@ import { logger } from '@libp2p/logger' -import { WebRTCStar } from '@libp2p/webrtc-star' +import { webRTCStar } from '@libp2p/webrtc-star' import { create } from 'ipfs-core' import { HttpApi } from 'ipfs-http-server' import { HttpGateway } from 'ipfs-http-gateway' @@ -97,11 +97,11 @@ async function getLibp2p ({ libp2pOptions }) { if (wrtc || electronWebRTC) { log(`Using ${wrtc ? 'wrtc' : 'electron-webrtc'} for webrtc support`) - const transport = new WebRTCStar({ + const transport = webRTCStar({ wrtc: wrtc ?? electronWebRTC }) - libp2pOptions.transports = [...libp2pOptions.transports ?? [], transport] + libp2pOptions.transports = [...libp2pOptions.transports ?? [], transport.transport] libp2pOptions.peerDiscovery = [...libp2pOptions.peerDiscovery ?? [], transport.discovery] } diff --git a/packages/ipfs-grpc-client/package.json b/packages/ipfs-grpc-client/package.json index 0978bfc1fe..7ba287b0e0 100644 --- a/packages/ipfs-grpc-client/package.json +++ b/packages/ipfs-grpc-client/package.json @@ -77,19 +77,19 @@ "ipfs-core-types": "^0.12.1", "ipfs-core-utils": "^0.16.1", "ipfs-grpc-protocol": "^0.7.0", - "ipfs-unixfs": "^7.0.0", - "it-first": "^1.0.6", + "ipfs-unixfs": "^8.0.0", + "it-first": "^2.0.0", "it-pushable": "^3.0.0", - "multiformats": "^9.5.1", + "multiformats": "^10.0.0", "p-defer": "^4.0.0", "protobufjs": "^7.0.0", - "uint8arrays": "^3.0.0", + "uint8arrays": "^4.0.2", "wherearewe": "^2.0.1", "ws": "^8.5.0" }, "devDependencies": { "aegir": "^37.0.11", - "it-all": "^1.0.4", + "it-all": "^2.0.0", "protobufjs-cli": "^1.0.0", "sinon": "^14.0.0" }, diff --git a/packages/ipfs-grpc-server/package.json b/packages/ipfs-grpc-server/package.json index 1f8fe443fd..f1be1b9bfb 100644 --- a/packages/ipfs-grpc-server/package.json +++ b/packages/ipfs-grpc-server/package.json @@ -71,22 +71,22 @@ "coercer": "^1.1.2", "ipfs-core-types": "^0.12.1", "ipfs-grpc-protocol": "^0.7.0", - "it-first": "^1.0.6", - "it-map": "^1.0.6", - "it-peekable": "^1.0.2", + "it-first": "^2.0.0", + "it-map": "^2.0.0", + "it-peekable": "^2.0.0", "it-pipe": "^2.0.3", "it-pushable": "^3.0.0", "nanoid": "^4.0.0", "protobufjs": "^7.0.0", - "uint8arrays": "^3.0.0", + "uint8arrays": "^4.0.2", "ws": "^8.5.0" }, "devDependencies": { "@types/ws": "^8.5.3", "aegir": "^37.0.11", "ipfs-core": "^0.16.1", - "it-all": "^1.0.4", - "it-drain": "^1.0.3", + "it-all": "^2.0.0", + "it-drain": "^2.0.0", "sinon": "^14.0.0" } } diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index 42ba926c9c..4f3ce60095 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -67,33 +67,33 @@ "dep-check": "aegir dep-check -i ipfs-core -i ipfs-core-types" }, "dependencies": { - "@ipld/dag-cbor": "^7.0.0", - "@ipld/dag-json": "^8.0.1", - "@ipld/dag-pb": "^2.1.3", + "@ipld/dag-cbor": "^8.0.0", + "@ipld/dag-json": "^9.0.0", + "@ipld/dag-pb": "^3.0.0", "@libp2p/logger": "^2.0.0", "@libp2p/peer-id": "^1.1.10", "@multiformats/multiaddr": "^11.0.0", "any-signal": "^3.0.0", - "dag-jose": "^2.0.1", + "dag-jose": "^3.0.1", "err-code": "^3.0.1", "ipfs-core-types": "^0.12.1", "ipfs-core-utils": "^0.16.1", "ipfs-utils": "^9.0.6", - "it-first": "^1.0.6", - "it-last": "^1.0.4", + "it-first": "^2.0.0", + "it-last": "^2.0.0", "merge-options": "^3.0.4", - "multiformats": "^9.5.1", + "multiformats": "^10.0.0", "parse-duration": "^1.0.0", "stream-to-it": "^0.2.2", - "uint8arrays": "^3.0.0" + "uint8arrays": "^4.0.2" }, "devDependencies": { "aegir": "^37.0.11", "delay": "^5.0.0", - "go-ipfs": "^0.12.1", + "go-ipfs": "^0.12.0", "ipfsd-ctl": "^12.0.3", - "it-all": "^1.0.4", - "it-first": "^1.0.4", + "it-all": "^2.0.0", + "it-first": "^2.0.0", "nock": "^13.0.2", "p-defer": "^4.0.0" }, diff --git a/packages/ipfs-http-gateway/package.json b/packages/ipfs-http-gateway/package.json index d3b1c0f41a..b3afa2a0cf 100644 --- a/packages/ipfs-http-gateway/package.json +++ b/packages/ipfs-http-gateway/package.json @@ -76,17 +76,17 @@ "ipfs-core-types": "^0.12.1", "ipfs-http-response": "^4.0.1", "is-ipfs": "^7.0.0", - "it-last": "^1.0.4", + "it-last": "^2.0.0", "it-to-stream": "^1.0.0", "joi": "^17.2.1", - "multiformats": "^9.5.1", - "uint8arrays": "^3.0.0" + "multiformats": "^10.0.0", + "uint8arrays": "^4.0.2" }, "devDependencies": { "@types/hapi-pino": "^8.0.1", "@types/hapi__hapi": "^20.0.5", "aegir": "^37.0.11", - "file-type": "^17.1.1", + "file-type": "^18.0.0", "sinon": "^14.0.0" } } diff --git a/packages/ipfs-http-response/package.json b/packages/ipfs-http-response/package.json index 7fa2ca6d0e..60938387dd 100644 --- a/packages/ipfs-http-response/package.json +++ b/packages/ipfs-http-response/package.json @@ -68,11 +68,10 @@ "dependencies": { "@libp2p/logger": "^2.0.0", "ejs": "^3.1.6", - "file-type": "^17.1.1", - "filesize": "^9.0.11", - "it-buffer": "^0.1.1", - "it-concat": "^2.0.0", - "it-map": "^1.0.6", + "file-type": "^18.0.0", + "filesize": "^10.0.5", + "it-concat": "^3.0.1", + "it-map": "^2.0.0", "it-reader": "^6.0.1", "it-to-stream": "^1.0.0", "mime-types": "^2.1.30", @@ -85,8 +84,8 @@ "get-stream": "^6.0.0", "ipfs-core": "^0.16.1", "ipfsd-ctl": "^12.0.3", - "it-all": "^1.0.4", - "uint8arrays": "^3.0.0" + "it-all": "^2.0.0", + "uint8arrays": "^4.0.2" }, "browser": { "file-type": "file-type/browser", diff --git a/packages/ipfs-http-response/src/dir-view/index.js b/packages/ipfs-http-response/src/dir-view/index.js index 61afe89410..8bd4e3a3a0 100644 --- a/packages/ipfs-http-response/src/dir-view/index.js +++ b/packages/ipfs-http-response/src/dir-view/index.js @@ -1,4 +1,4 @@ -import filesize from 'filesize' +import { filesize } from 'filesize' import style from './style.js' import { cidArray } from '../utils/path.js' import ejs from 'ejs' diff --git a/packages/ipfs-http-response/src/index.js b/packages/ipfs-http-response/src/index.js index 821dbaa202..6fb4994d2c 100644 --- a/packages/ipfs-http-response/src/index.js +++ b/packages/ipfs-http-response/src/index.js @@ -3,8 +3,6 @@ // @ts-expect-error no types import toStream from 'it-to-stream' import concat from 'it-concat' -// @ts-expect-error no types -import toBuffer from 'it-buffer' import { logger } from '@libp2p/logger' import * as ipfsResolver from './resolver.js' import * as pathUtils from './utils/path.js' @@ -73,7 +71,7 @@ export async function getResponse (ipfsNode, ipfsPath) { const { source, contentType } = await detectContentType(ipfsPath, ipfsNode.cat(resolvedData.cid)) if (typeof Blob === 'undefined') { - const responseStream = toStream.readable(toBuffer(source)) + const responseStream = toStream.readable(source) return contentType ? new Response(responseStream, getHeader(200, 'OK', { 'Content-Type': contentType })) @@ -82,7 +80,7 @@ export async function getResponse (ipfsNode, ipfsPath) { try { const data = await concat(source) - const blob = new Blob([data.slice()]) + const blob = new Blob([data.subarray()]) return contentType ? new Response(blob, getHeader(200, 'OK', { 'Content-Type': contentType })) diff --git a/packages/ipfs-http-response/src/utils/content-type.js b/packages/ipfs-http-response/src/utils/content-type.js index eff8d80a83..7f0c912d82 100644 --- a/packages/ipfs-http-response/src/utils/content-type.js +++ b/packages/ipfs-http-response/src/utils/content-type.js @@ -39,7 +39,9 @@ export const detectContentType = async (path, source) => { yield * stream })() } catch (/** @type {any} */ err) { - if (err.code !== 'ERR_UNDER_READ') throw err + if (err.code !== 'ERR_UNDER_READ') { + throw err + } // not enough bytes for sniffing, just yield the data output = (async function * () { // eslint-disable-line require-await diff --git a/packages/ipfs-http-server/package.json b/packages/ipfs-http-server/package.json index 4dd51c632b..381f6d1657 100644 --- a/packages/ipfs-http-server/package.json +++ b/packages/ipfs-http-server/package.json @@ -67,7 +67,7 @@ "@hapi/boom": "^9.1.0", "@hapi/content": "^5.0.2", "@hapi/hapi": "^20.0.0", - "@ipld/dag-pb": "^2.1.3", + "@ipld/dag-pb": "^3.0.0", "@libp2p/interface-dht": "^1.0.1", "@libp2p/interfaces": "^3.0.3", "@libp2p/logger": "^2.0.0", @@ -80,24 +80,24 @@ "ipfs-core-types": "^0.12.1", "ipfs-core-utils": "^0.16.1", "ipfs-http-gateway": "^0.11.1", - "ipfs-unixfs": "^7.0.0", - "it-all": "^1.0.4", - "it-drain": "^1.0.3", - "it-filter": "^1.0.2", - "it-last": "^1.0.4", - "it-map": "^1.0.6", - "it-merge": "^1.0.3", - "it-multipart": "^2.0.0", + "ipfs-unixfs": "^8.0.0", + "it-all": "^2.0.0", + "it-drain": "^2.0.0", + "it-filter": "^2.0.0", + "it-last": "^2.0.0", + "it-map": "^2.0.0", + "it-merge": "^2.0.0", + "it-multipart": "^3.0.0", "it-pipe": "^2.0.3", "it-pushable": "^3.0.0", - "it-reduce": "^1.0.5", + "it-reduce": "^2.0.0", "joi": "^17.2.1", "just-safe-set": "^4.0.2", - "multiformats": "^9.5.1", + "multiformats": "^10.0.0", "parse-duration": "^1.0.0", "stream-to-it": "^0.2.2", "timeout-abort-controller": "^3.0.0", - "uint8arrays": "^3.0.0" + "uint8arrays": "^4.0.2" }, "devDependencies": { "@types/hapi-pino": "^8.0.1", @@ -108,8 +108,8 @@ "form-data": "^4.0.0", "ipfs-http-client": "^58.0.1", "iso-random-stream": "^2.0.2", - "it-first": "^1.0.4", - "it-to-buffer": "^2.0.0", + "it-first": "^2.0.0", + "it-to-buffer": "^3.0.0", "qs": "^6.9.4", "sinon": "^14.0.0", "stream-to-promise": "^3.0.0" diff --git a/packages/ipfs-message-port-client/.aegir.js b/packages/ipfs-message-port-client/.aegir.js index 5f0ca24907..1d3d9961be 100644 --- a/packages/ipfs-message-port-client/.aegir.js +++ b/packages/ipfs-message-port-client/.aegir.js @@ -7,17 +7,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)) /** @type {import('aegir').Options["build"]["config"]} */ const buildConfig = { - inject: [path.join(__dirname, '../../scripts/node-globals.js')], - plugins: [ - { - name: 'node built ins', - setup (build) { - build.onResolve({ filter: /^stream$/ }, () => { - return { path: require.resolve('readable-stream') } - }) - } - } - ] + inject: [path.join(__dirname, '../../scripts/node-globals.js')] } /** @type {import('aegir').PartialOptions} */ diff --git a/packages/ipfs-message-port-client/package.json b/packages/ipfs-message-port-client/package.json index 95a7a04465..1c468bce19 100644 --- a/packages/ipfs-message-port-client/package.json +++ b/packages/ipfs-message-port-client/package.json @@ -64,13 +64,13 @@ "dep-check": "aegir dep-check -i ipfs-core -i ipfs-core-types -i esbuild" }, "dependencies": { - "browser-readablestream-to-it": "^1.0.1", + "browser-readablestream-to-it": "^2.0.0", "err-code": "^3.0.1", "ipfs-core-types": "^0.12.1", "ipfs-message-port-protocol": "^0.13.1", - "ipfs-unixfs": "^7.0.0", - "it-peekable": "^1.0.2", - "multiformats": "^9.5.1" + "ipfs-unixfs": "^8.0.0", + "it-peekable": "^2.0.0", + "multiformats": "^10.0.0" }, "devDependencies": { "aegir": "^37.0.11", diff --git a/packages/ipfs-message-port-protocol/package.json b/packages/ipfs-message-port-protocol/package.json index 1a2b7c9535..531d955f25 100644 --- a/packages/ipfs-message-port-protocol/package.json +++ b/packages/ipfs-message-port-protocol/package.json @@ -88,10 +88,10 @@ }, "dependencies": { "ipfs-core-types": "^0.12.1", - "multiformats": "^9.5.1" + "multiformats": "^10.0.0" }, "devDependencies": { "aegir": "^37.0.11", - "uint8arrays": "^3.0.0" + "uint8arrays": "^4.0.2" } } diff --git a/packages/ipfs-message-port-protocol/src/cid.js b/packages/ipfs-message-port-protocol/src/cid.js index 584dfcd238..99d64468dc 100644 --- a/packages/ipfs-message-port-protocol/src/cid.js +++ b/packages/ipfs-message-port-protocol/src/cid.js @@ -43,7 +43,6 @@ export const decodeCID = encodedCID => { }) } - // @ts-expect-error non-enumerable field that doesn't always get transferred if (!cid.asCID) { Object.defineProperty(cid, 'asCID', { get: () => cid diff --git a/packages/ipfs-message-port-server/package.json b/packages/ipfs-message-port-server/package.json index 3ba12133cd..ccc9192a41 100644 --- a/packages/ipfs-message-port-server/package.json +++ b/packages/ipfs-message-port-server/package.json @@ -94,11 +94,11 @@ "dependencies": { "ipfs-core-types": "^0.12.1", "ipfs-message-port-protocol": "^0.13.1", - "it-all": "^1.0.4" + "it-all": "^2.0.0" }, "devDependencies": { "aegir": "^37.0.11", - "multiformats": "^9.5.1" + "multiformats": "^10.0.0" }, "browser": { "worker_threads": false diff --git a/packages/ipfs-message-port-server/src/core.js b/packages/ipfs-message-port-server/src/core.js index 50c8aa618e..5a2a39cee5 100644 --- a/packages/ipfs-message-port-server/src/core.js +++ b/packages/ipfs-message-port-server/src/core.js @@ -9,7 +9,7 @@ import { import { decodeCID, encodeCID } from 'ipfs-message-port-protocol/cid' /** - * @typedef {import('multiformats/cid').CIDVersion} CIDVersion + * @typedef {import('multiformats/cid').Version} CIDVersion * @typedef {import('ipfs-core-types').IPFS} IPFS * @typedef {import('ipfs-core-types/src/root').AddOptions} AddOptions * @typedef {import('ipfs-core-types/src/root').AddAllOptions} AddAllOptions diff --git a/packages/ipfs/.aegir.js b/packages/ipfs/.aegir.js index 4d424964be..768a934ce9 100644 --- a/packages/ipfs/.aegir.js +++ b/packages/ipfs/.aegir.js @@ -9,17 +9,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)) /** @type {import('aegir').Options["build"]["config"]} */ const esbuild = { - inject: [path.join(__dirname, '../../scripts/node-globals.js')], - plugins: [ - { - name: 'node built ins', - setup (build) { - build.onResolve({ filter: /^stream$/ }, () => { - return { path: require.resolve('readable-stream') } - }) - } - } - ] + inject: [path.join(__dirname, '../../scripts/node-globals.js')] } /** @type {import('aegir').PartialOptions} */ diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index 5f3f4281ca..77f19fc64a 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -70,7 +70,7 @@ "test:interface:client": "aegir test -f test/interface-client.js", "test:interface:http-js": "aegir test -f test/interface-http-js.js", "test:interface:http-go": "aegir test -f test/interface-http-go.js", - "test:interop": "cross-env DEBUG=$DEBUG IPFS_LOGGING=$IPFS_LOGGING IPFS_JS_EXEC=$PWD/src/cli.js LIBP2P_TCP_REUSEPORT=false ipfs-interop", + "test:interop": "cross-env DEBUG=$DEBUG IPFS_LOGGING=$IPFS_LOGGING IPFS_JS_EXEC=$PWD/src/cli.js KUBO_RPC_MODULE=$PWD/../ipfs-http-client/src/index.js LIBP2P_TCP_REUSEPORT=false ipfs-interop", "test:external": "aegir test-dependant", "clean": "aegir clean", "dep-check": "aegir dep-check -i ipfs-core-types -i @types/*" @@ -84,21 +84,22 @@ }, "devDependencies": { "@libp2p/webrtc-star-signalling-server": "^2.0.1", - "@libp2p/websockets": "^3.0.0", + "@libp2p/websockets": "^5.0.0", "@types/semver": "^7.3.4", "@types/update-notifier": "^6.0.1", "aegir": "^37.0.11", "cross-env": "^7.0.0", "electron-webrtc": "^0.3.0", - "go-ipfs": "^0.12.1", + "go-ipfs": "^0.12.0", "interface-ipfs-core": "^0.156.1", "ipfs-client": "^0.9.1", "ipfs-core-types": "^0.12.1", "ipfs-http-client": "^58.0.1", - "ipfs-interop": "^9.0.1", + "ipfs-interop": "ipfs/interop#deps/update-multiformats", "ipfs-utils": "^9.0.6", "ipfsd-ctl": "^12.0.3", "iso-url": "^1.0.0", + "kubo-rpc-client": "^1.0.1", "merge-options": "^3.0.4", "mock-ipfs-pinning-service": "^0.4.2", "url": "^0.11.0", diff --git a/packages/ipfs/test/utils/factory.js b/packages/ipfs/test/utils/factory.js index 9d3ec48789..eb435572cc 100644 --- a/packages/ipfs/test/utils/factory.js +++ b/packages/ipfs/test/utils/factory.js @@ -7,7 +7,7 @@ import * as ipfsModule from 'ipfs-core' import goIpfs from 'go-ipfs' import path, { dirname } from 'path' import { fileURLToPath } from 'url' -import { WebSockets } from '@libp2p/websockets' +import { webSockets } from '@libp2p/websockets' import { all as WebSocketsFiltersAll } from '@libp2p/websockets/filters' const merge = mergeOpts.bind({ ignoreUndefined: true }) @@ -29,7 +29,7 @@ const commonOptions = { dialTimeout: 60e3 // increase timeout because travis is slow }, transports: [ - new WebSockets({ + webSockets({ filter: WebSocketsFiltersAll }) ] From e8b7b66bfa98c2a1c0d0bfc19f698d7d00b6c888 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 11:16:51 +0100 Subject: [PATCH 02/28] chore: release master (#4221) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- packages/interface-ipfs-core/CHANGELOG.md | 24 +++++++++++++++ packages/interface-ipfs-core/package.json | 4 +-- packages/ipfs-cli/CHANGELOG.md | 27 +++++++++++++++++ packages/ipfs-cli/package.json | 12 ++++---- packages/ipfs-client/CHANGELOG.md | 10 +++++++ packages/ipfs-client/package.json | 6 ++-- packages/ipfs-core-config/CHANGELOG.md | 18 +++++++++++ packages/ipfs-core-config/package.json | 4 +-- packages/ipfs-core-types/CHANGELOG.md | 11 +++++++ packages/ipfs-core-types/package.json | 2 +- packages/ipfs-core-utils/CHANGELOG.md | 18 +++++++++++ packages/ipfs-core-utils/package.json | 4 +-- packages/ipfs-core/CHANGELOG.md | 30 +++++++++++++++++++ packages/ipfs-core/package.json | 12 ++++---- packages/ipfs-daemon/CHANGELOG.md | 22 ++++++++++++++ packages/ipfs-daemon/package.json | 12 ++++---- packages/ipfs-grpc-client/CHANGELOG.md | 19 ++++++++++++ packages/ipfs-grpc-client/package.json | 6 ++-- packages/ipfs-grpc-server/CHANGELOG.md | 25 ++++++++++++++++ packages/ipfs-grpc-server/package.json | 6 ++-- packages/ipfs-http-client/CHANGELOG.md | 19 ++++++++++++ packages/ipfs-http-client/package.json | 6 ++-- packages/ipfs-http-gateway/CHANGELOG.md | 24 +++++++++++++++ packages/ipfs-http-gateway/package.json | 6 ++-- packages/ipfs-http-response/CHANGELOG.md | 23 ++++++++++++++ packages/ipfs-http-response/package.json | 4 +-- packages/ipfs-http-server/CHANGELOG.md | 22 ++++++++++++++ packages/ipfs-http-server/package.json | 10 +++---- .../ipfs-message-port-client/CHANGELOG.md | 25 +++++++++++++++- .../ipfs-message-port-client/package.json | 12 ++++---- .../ipfs-message-port-protocol/CHANGELOG.md | 20 ++++++++++++- .../ipfs-message-port-protocol/package.json | 4 +-- .../ipfs-message-port-server/CHANGELOG.md | 21 ++++++++++++- .../ipfs-message-port-server/package.json | 6 ++-- packages/ipfs/CHANGELOG.md | 24 +++++++++++++++ packages/ipfs/package.json | 14 ++++----- 37 files changed, 445 insertions(+), 69 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da605357c8..6f9bc03873 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{"packages/interface-ipfs-core":"0.156.1","packages/ipfs":"0.64.2","packages/ipfs-cli":"0.14.2","packages/ipfs-client":"0.9.1","packages/ipfs-core":"0.16.1","packages/ipfs-core-config":"0.5.1","packages/ipfs-core-types":"0.12.1","packages/ipfs-core-utils":"0.16.1","packages/ipfs-daemon":"0.14.2","packages/ipfs-grpc-client":"0.11.1","packages/ipfs-grpc-protocol":"0.7.0","packages/ipfs-grpc-server":"0.10.1","packages/ipfs-http-client":"58.0.1","packages/ipfs-http-gateway":"0.11.1","packages/ipfs-http-response":"4.0.1","packages/ipfs-http-server":"0.13.2","packages/ipfs-message-port-client":"0.13.1","packages/ipfs-message-port-protocol":"0.13.1","packages/ipfs-message-port-server":"0.13.1"} \ No newline at end of file +{"packages/interface-ipfs-core":"0.157.0","packages/ipfs":"0.65.0","packages/ipfs-cli":"0.15.0","packages/ipfs-client":"0.9.2","packages/ipfs-core":"0.17.0","packages/ipfs-core-config":"0.6.0","packages/ipfs-core-types":"0.13.0","packages/ipfs-core-utils":"0.17.0","packages/ipfs-daemon":"0.15.0","packages/ipfs-grpc-client":"0.12.0","packages/ipfs-grpc-protocol":"0.7.0","packages/ipfs-grpc-server":"0.11.0","packages/ipfs-http-client":"59.0.0","packages/ipfs-http-gateway":"0.12.0","packages/ipfs-http-response":"5.0.0","packages/ipfs-http-server":"0.14.0","packages/ipfs-message-port-client":"0.14.0","packages/ipfs-message-port-protocol":"0.14.0","packages/ipfs-message-port-server":"0.14.0"} \ No newline at end of file diff --git a/packages/interface-ipfs-core/CHANGELOG.md b/packages/interface-ipfs-core/CHANGELOG.md index 858c371c3d..a0bb3b192a 100644 --- a/packages/interface-ipfs-core/CHANGELOG.md +++ b/packages/interface-ipfs-core/CHANGELOG.md @@ -3,6 +3,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.157.0](https://www.github.com/ipfs/js-ipfs/compare/interface-ipfs-core-v0.156.1...interface-ipfs-core-v0.157.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config +* require IPNS V2 signatures (#4207) + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Bug Fixes + +* require IPNS V2 signatures ([#4207](https://www.github.com/ipfs/js-ipfs/issues/4207)) ([d1b0a8a](https://www.github.com/ipfs/js-ipfs/commit/d1b0a8a71073b4ece0dbda5a5405d76dd8d5b358)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + ### [0.156.1](https://www.github.com/ipfs/js-ipfs/compare/interface-ipfs-core-v0.156.0...interface-ipfs-core-v0.156.1) (2022-09-21) diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index 350bdc6acd..1ff79ce8e3 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -1,6 +1,6 @@ { "name": "interface-ipfs-core", - "version": "0.156.1", + "version": "0.157.0", "description": "A test suite and interface you can use to implement a IPFS core interface.", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core#readme", @@ -84,7 +84,7 @@ "delay": "^5.0.0", "did-jwt": "^6.2.0", "err-code": "^3.0.1", - "ipfs-core-types": "^0.12.1", + "ipfs-core-types": "^0.13.0", "ipfs-unixfs": "^8.0.0", "ipfs-unixfs-importer": "^11.0.0", "ipfs-utils": "^9.0.6", diff --git a/packages/ipfs-cli/CHANGELOG.md b/packages/ipfs-cli/CHANGELOG.md index e3c70a2390..e747821246 100644 --- a/packages/ipfs-cli/CHANGELOG.md +++ b/packages/ipfs-cli/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-cli-v0.14.2...ipfs-cli-v0.15.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Bug Fixes + +* replace slice with subarray for increased performance ([#4210](https://www.github.com/ipfs/js-ipfs/issues/4210)) ([dfc43d4](https://www.github.com/ipfs/js-ipfs/commit/dfc43d4e9be67fdf25553677f469379d966ff806)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core bumped from ^0.16.1 to ^0.17.0 + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-core-utils bumped from ^0.16.1 to ^0.17.0 + * ipfs-daemon bumped from ^0.14.2 to ^0.15.0 + * ipfs-http-client bumped from ^58.0.1 to ^59.0.0 + ### [0.14.2](https://www.github.com/ipfs/js-ipfs/compare/ipfs-cli-v0.14.1...ipfs-cli-v0.14.2) (2022-09-21) diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index f13d967ba3..c7e36fa50c 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-cli", - "version": "0.14.2", + "version": "0.15.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-cli#readme", @@ -78,11 +78,11 @@ "byteman": "^1.3.5", "execa": "^6.1.0", "get-folder-size": "^4.0.0", - "ipfs-core": "^0.16.1", - "ipfs-core-types": "^0.12.1", - "ipfs-core-utils": "^0.16.1", - "ipfs-daemon": "^0.14.2", - "ipfs-http-client": "^58.0.1", + "ipfs-core": "^0.17.0", + "ipfs-core-types": "^0.13.0", + "ipfs-core-utils": "^0.17.0", + "ipfs-daemon": "^0.15.0", + "ipfs-http-client": "^59.0.0", "ipfs-utils": "^9.0.6", "it-concat": "^3.0.1", "it-merge": "^2.0.0", diff --git a/packages/ipfs-client/CHANGELOG.md b/packages/ipfs-client/CHANGELOG.md index a84a6bce7f..7f40df6471 100644 --- a/packages/ipfs-client/CHANGELOG.md +++ b/packages/ipfs-client/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [0.9.2](https://www.github.com/ipfs/js-ipfs/compare/ipfs-client-v0.9.1...ipfs-client-v0.9.2) (2022-10-24) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-grpc-client bumped from ^0.11.1 to ^0.12.0 + * ipfs-http-client bumped from ^58.0.1 to ^59.0.0 + ### [0.9.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-client-v0.9.0...ipfs-client-v0.9.1) (2022-09-21) diff --git a/packages/ipfs-client/package.json b/packages/ipfs-client/package.json index 71c6cb0730..f22f85c30e 100644 --- a/packages/ipfs-client/package.json +++ b/packages/ipfs-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-client", - "version": "0.9.1", + "version": "0.9.2", "description": "A client library to talk to local IPFS daemons", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-client#readme", @@ -61,8 +61,8 @@ "dep-check": "aegir dep-check -i aegir" }, "dependencies": { - "ipfs-grpc-client": "^0.11.1", - "ipfs-http-client": "^58.0.1", + "ipfs-grpc-client": "^0.12.0", + "ipfs-http-client": "^59.0.0", "merge-options": "^3.0.4" }, "devDependencies": { diff --git a/packages/ipfs-core-config/CHANGELOG.md b/packages/ipfs-core-config/CHANGELOG.md index a66a6ce3bf..7a13703a7a 100644 --- a/packages/ipfs-core-config/CHANGELOG.md +++ b/packages/ipfs-core-config/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.6.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-config-v0.5.1...ipfs-core-config-v0.6.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * ipfs-core-utils bumped from ^0.16.1 to ^0.17.0 + ### [0.5.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-config-v0.5.0...ipfs-core-config-v0.5.1) (2022-09-21) diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index 7d903f97a8..9d467a388d 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core-config", - "version": "0.5.1", + "version": "0.6.0", "description": "Package to store node and browser specific config for ipfs-core", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", @@ -118,6 +118,6 @@ }, "devDependencies": { "aegir": "^37.0.11", - "ipfs-core-utils": "^0.16.1" + "ipfs-core-utils": "^0.17.0" } } diff --git a/packages/ipfs-core-types/CHANGELOG.md b/packages/ipfs-core-types/CHANGELOG.md index dfa468ea55..3448740886 100644 --- a/packages/ipfs-core-types/CHANGELOG.md +++ b/packages/ipfs-core-types/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.13.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-types-v0.12.1...ipfs-core-types-v0.13.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + ### [0.12.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-types-v0.12.0...ipfs-core-types-v0.12.1) (2022-09-21) diff --git a/packages/ipfs-core-types/package.json b/packages/ipfs-core-types/package.json index 6db01f2275..fe6156f316 100644 --- a/packages/ipfs-core-types/package.json +++ b/packages/ipfs-core-types/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core-types", - "version": "0.12.1", + "version": "0.13.0", "description": "IPFS interface definitions used by implementations for API compatibility.", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-core-types#readme", diff --git a/packages/ipfs-core-utils/CHANGELOG.md b/packages/ipfs-core-utils/CHANGELOG.md index 214f070458..ea41400734 100644 --- a/packages/ipfs-core-utils/CHANGELOG.md +++ b/packages/ipfs-core-utils/CHANGELOG.md @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.17.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-utils-v0.16.1...ipfs-core-utils-v0.17.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + ### [0.16.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-utils-v0.16.0...ipfs-core-utils-v0.16.1) (2022-09-21) diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index 521618280e..e032d1f6d5 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core-utils", - "version": "0.16.1", + "version": "0.17.0", "description": "Package to share code between ipfs and ipfs-http-client", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", @@ -147,7 +147,7 @@ "blob-to-it": "^2.0.0", "browser-readablestream-to-it": "^2.0.0", "err-code": "^3.0.1", - "ipfs-core-types": "^0.12.1", + "ipfs-core-types": "^0.13.0", "ipfs-unixfs": "^8.0.0", "ipfs-utils": "^9.0.6", "it-all": "^2.0.0", diff --git a/packages/ipfs-core/CHANGELOG.md b/packages/ipfs-core/CHANGELOG.md index 0964a5d648..214d8be095 100644 --- a/packages/ipfs-core/CHANGELOG.md +++ b/packages/ipfs-core/CHANGELOG.md @@ -3,6 +3,36 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.17.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-v0.16.1...ipfs-core-v0.17.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config +* require IPNS V2 signatures (#4207) + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Bug Fixes + +* replace slice with subarray for increased performance ([#4210](https://www.github.com/ipfs/js-ipfs/issues/4210)) ([dfc43d4](https://www.github.com/ipfs/js-ipfs/commit/dfc43d4e9be67fdf25553677f469379d966ff806)) +* require IPNS V2 signatures ([#4207](https://www.github.com/ipfs/js-ipfs/issues/4207)) ([d1b0a8a](https://www.github.com/ipfs/js-ipfs/commit/d1b0a8a71073b4ece0dbda5a5405d76dd8d5b358)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-config bumped from ^0.5.1 to ^0.6.0 + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-core-utils bumped from ^0.16.1 to ^0.17.0 + * ipfs-http-client bumped from ^58.0.1 to ^59.0.0 + * devDependencies + * interface-ipfs-core bumped from ^0.156.1 to ^0.157.0 + ### [0.16.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-v0.16.0...ipfs-core-v0.16.1) (2022-09-21) diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 4f9ffcd02d..36e6c546eb 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core", - "version": "0.16.1", + "version": "0.17.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-core#readme", @@ -112,10 +112,10 @@ "interface-blockstore": "^3.0.0", "interface-datastore": "^7.0.0", "ipfs-bitswap": "^13.0.0", - "ipfs-core-config": "^0.5.1", - "ipfs-core-types": "^0.12.1", - "ipfs-core-utils": "^0.16.1", - "ipfs-http-client": "^58.0.1", + "ipfs-core-config": "^0.6.0", + "ipfs-core-types": "^0.13.0", + "ipfs-core-utils": "^0.17.0", + "ipfs-http-client": "^59.0.0", "ipfs-repo": "^16.0.0", "ipfs-unixfs": "^8.0.0", "ipfs-unixfs-exporter": "^9.0.0", @@ -156,7 +156,7 @@ "delay": "^5.0.0", "go-ipfs": "^0.12.0", "interface-blockstore-tests": "^3.0.0", - "interface-ipfs-core": "^0.156.1", + "interface-ipfs-core": "^0.157.0", "ipfsd-ctl": "^12.0.3", "iso-url": "^1.0.0", "it-all": "^2.0.0", diff --git a/packages/ipfs-daemon/CHANGELOG.md b/packages/ipfs-daemon/CHANGELOG.md index 9739a51ab0..f464e2044e 100644 --- a/packages/ipfs-daemon/CHANGELOG.md +++ b/packages/ipfs-daemon/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-daemon-v0.14.2...ipfs-daemon-v0.15.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core bumped from ^0.16.1 to ^0.17.0 + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-grpc-server bumped from ^0.10.1 to ^0.11.0 + * ipfs-http-gateway bumped from ^0.11.1 to ^0.12.0 + * ipfs-http-server bumped from ^0.13.2 to ^0.14.0 + ### [0.14.2](https://www.github.com/ipfs/js-ipfs/compare/ipfs-daemon-v0.14.1...ipfs-daemon-v0.14.2) (2022-09-21) diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index 3ffddb23c5..8bb7bf1a15 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-daemon", - "version": "0.14.2", + "version": "0.15.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-daemon#readme", @@ -66,11 +66,11 @@ "@libp2p/logger": "^2.0.0", "@libp2p/webrtc-star": "^5.0.2", "@mapbox/node-pre-gyp": "^1.0.5", - "ipfs-core": "^0.16.1", - "ipfs-core-types": "^0.12.1", - "ipfs-grpc-server": "^0.10.1", - "ipfs-http-gateway": "^0.11.1", - "ipfs-http-server": "^0.13.2", + "ipfs-core": "^0.17.0", + "ipfs-core-types": "^0.13.0", + "ipfs-grpc-server": "^0.11.0", + "ipfs-http-gateway": "^0.12.0", + "ipfs-http-server": "^0.14.0", "ipfs-utils": "^9.0.6", "libp2p": "^0.40.0" }, diff --git a/packages/ipfs-grpc-client/CHANGELOG.md b/packages/ipfs-grpc-client/CHANGELOG.md index fc85d455bb..b7412886fa 100644 --- a/packages/ipfs-grpc-client/CHANGELOG.md +++ b/packages/ipfs-grpc-client/CHANGELOG.md @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.12.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-client-v0.11.1...ipfs-grpc-client-v0.12.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-core-utils bumped from ^0.16.1 to ^0.17.0 + ### [0.11.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-client-v0.11.0...ipfs-grpc-client-v0.11.1) (2022-09-21) diff --git a/packages/ipfs-grpc-client/package.json b/packages/ipfs-grpc-client/package.json index 7ba287b0e0..be61046b25 100644 --- a/packages/ipfs-grpc-client/package.json +++ b/packages/ipfs-grpc-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-grpc-client", - "version": "0.11.1", + "version": "0.12.0", "description": "A client library for the IPFS gRPC API", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-grpc-client#readme", @@ -74,8 +74,8 @@ "@multiformats/multiaddr": "^11.0.0", "change-case": "^4.1.1", "err-code": "^3.0.1", - "ipfs-core-types": "^0.12.1", - "ipfs-core-utils": "^0.16.1", + "ipfs-core-types": "^0.13.0", + "ipfs-core-utils": "^0.17.0", "ipfs-grpc-protocol": "^0.7.0", "ipfs-unixfs": "^8.0.0", "it-first": "^2.0.0", diff --git a/packages/ipfs-grpc-server/CHANGELOG.md b/packages/ipfs-grpc-server/CHANGELOG.md index 87e48c8716..b2d30683e7 100644 --- a/packages/ipfs-grpc-server/CHANGELOG.md +++ b/packages/ipfs-grpc-server/CHANGELOG.md @@ -4,6 +4,31 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.11.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-server-v0.10.1...ipfs-grpc-server-v0.11.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Bug Fixes + +* replace slice with subarray for increased performance ([#4210](https://www.github.com/ipfs/js-ipfs/issues/4210)) ([dfc43d4](https://www.github.com/ipfs/js-ipfs/commit/dfc43d4e9be67fdf25553677f469379d966ff806)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * devDependencies + * ipfs-core bumped from ^0.16.1 to ^0.17.0 + ### [0.10.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-server-v0.10.0...ipfs-grpc-server-v0.10.1) (2022-09-21) diff --git a/packages/ipfs-grpc-server/package.json b/packages/ipfs-grpc-server/package.json index f1be1b9bfb..b1ae97ea46 100644 --- a/packages/ipfs-grpc-server/package.json +++ b/packages/ipfs-grpc-server/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-grpc-server", - "version": "0.10.1", + "version": "0.11.0", "description": "A server library for the IPFS gRPC API", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-grpc-server#readme", @@ -69,7 +69,7 @@ "@multiformats/multiaddr": "^11.0.0", "change-case": "^4.1.1", "coercer": "^1.1.2", - "ipfs-core-types": "^0.12.1", + "ipfs-core-types": "^0.13.0", "ipfs-grpc-protocol": "^0.7.0", "it-first": "^2.0.0", "it-map": "^2.0.0", @@ -84,7 +84,7 @@ "devDependencies": { "@types/ws": "^8.5.3", "aegir": "^37.0.11", - "ipfs-core": "^0.16.1", + "ipfs-core": "^0.17.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", "sinon": "^14.0.0" diff --git a/packages/ipfs-http-client/CHANGELOG.md b/packages/ipfs-http-client/CHANGELOG.md index 9306c543d0..db033b37cb 100644 --- a/packages/ipfs-http-client/CHANGELOG.md +++ b/packages/ipfs-http-client/CHANGELOG.md @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [59.0.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-client-v58.0.1...ipfs-http-client-v59.0.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-core-utils bumped from ^0.16.1 to ^0.17.0 + ### [58.0.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-client-v58.0.0...ipfs-http-client-v58.0.1) (2022-09-21) diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index 4f3ce60095..961cd3fb72 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-client", - "version": "58.0.1", + "version": "59.0.0", "description": "A client library for the IPFS HTTP API", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme", @@ -76,8 +76,8 @@ "any-signal": "^3.0.0", "dag-jose": "^3.0.1", "err-code": "^3.0.1", - "ipfs-core-types": "^0.12.1", - "ipfs-core-utils": "^0.16.1", + "ipfs-core-types": "^0.13.0", + "ipfs-core-utils": "^0.17.0", "ipfs-utils": "^9.0.6", "it-first": "^2.0.0", "it-last": "^2.0.0", diff --git a/packages/ipfs-http-gateway/CHANGELOG.md b/packages/ipfs-http-gateway/CHANGELOG.md index c1775c3dc4..3ca7dff416 100644 --- a/packages/ipfs-http-gateway/CHANGELOG.md +++ b/packages/ipfs-http-gateway/CHANGELOG.md @@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.12.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-gateway-v0.11.1...ipfs-http-gateway-v0.12.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Bug Fixes + +* replace slice with subarray for increased performance ([#4210](https://www.github.com/ipfs/js-ipfs/issues/4210)) ([dfc43d4](https://www.github.com/ipfs/js-ipfs/commit/dfc43d4e9be67fdf25553677f469379d966ff806)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-http-response bumped from ^4.0.1 to ^5.0.0 + ### [0.11.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-gateway-v0.11.0...ipfs-http-gateway-v0.11.1) (2022-09-21) diff --git a/packages/ipfs-http-gateway/package.json b/packages/ipfs-http-gateway/package.json index b3afa2a0cf..4e7cfae2ca 100644 --- a/packages/ipfs-http-gateway/package.json +++ b/packages/ipfs-http-gateway/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-gateway", - "version": "0.11.1", + "version": "0.12.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-gateway#readme", @@ -73,8 +73,8 @@ "@libp2p/logger": "^2.0.0", "@multiformats/uri-to-multiaddr": "^7.0.0", "hapi-pino": "^8.5.0", - "ipfs-core-types": "^0.12.1", - "ipfs-http-response": "^4.0.1", + "ipfs-core-types": "^0.13.0", + "ipfs-http-response": "^5.0.0", "is-ipfs": "^7.0.0", "it-last": "^2.0.0", "it-to-stream": "^1.0.0", diff --git a/packages/ipfs-http-response/CHANGELOG.md b/packages/ipfs-http-response/CHANGELOG.md index 5cc103b599..fbcc75134e 100644 --- a/packages/ipfs-http-response/CHANGELOG.md +++ b/packages/ipfs-http-response/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.0.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-response-v4.0.1...ipfs-http-response-v5.0.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Bug Fixes + +* replace slice with subarray for increased performance ([#4210](https://www.github.com/ipfs/js-ipfs/issues/4210)) ([dfc43d4](https://www.github.com/ipfs/js-ipfs/commit/dfc43d4e9be67fdf25553677f469379d966ff806)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * ipfs-core bumped from ^0.16.1 to ^0.17.0 + ### [4.0.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-response-v4.0.0...ipfs-http-response-v4.0.1) (2022-09-21) diff --git a/packages/ipfs-http-response/package.json b/packages/ipfs-http-response/package.json index 60938387dd..e5e2027264 100644 --- a/packages/ipfs-http-response/package.json +++ b/packages/ipfs-http-response/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-response", - "version": "4.0.1", + "version": "5.0.0", "description": "Creates an HTTP response from an IPFS Hash", "author": "Vasco Santos ", "license": "Apache-2.0 OR MIT", @@ -82,7 +82,7 @@ "@types/mime-types": "^2.1.1", "aegir": "^37.0.11", "get-stream": "^6.0.0", - "ipfs-core": "^0.16.1", + "ipfs-core": "^0.17.0", "ipfsd-ctl": "^12.0.3", "it-all": "^2.0.0", "uint8arrays": "^4.0.2" diff --git a/packages/ipfs-http-server/CHANGELOG.md b/packages/ipfs-http-server/CHANGELOG.md index 9f8ffbe707..675af7d1a6 100644 --- a/packages/ipfs-http-server/CHANGELOG.md +++ b/packages/ipfs-http-server/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-server-v0.13.2...ipfs-http-server-v0.14.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-core-utils bumped from ^0.16.1 to ^0.17.0 + * ipfs-http-gateway bumped from ^0.11.1 to ^0.12.0 + * devDependencies + * ipfs-http-client bumped from ^58.0.1 to ^59.0.0 + ### [0.13.2](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-server-v0.13.1...ipfs-http-server-v0.13.2) (2022-09-21) diff --git a/packages/ipfs-http-server/package.json b/packages/ipfs-http-server/package.json index 381f6d1657..d53a1bb040 100644 --- a/packages/ipfs-http-server/package.json +++ b/packages/ipfs-http-server/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-server", - "version": "0.13.2", + "version": "0.14.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-server#readme", @@ -77,9 +77,9 @@ "any-signal": "^3.0.0", "dlv": "^1.1.3", "hapi-pino": "^8.5.0", - "ipfs-core-types": "^0.12.1", - "ipfs-core-utils": "^0.16.1", - "ipfs-http-gateway": "^0.11.1", + "ipfs-core-types": "^0.13.0", + "ipfs-core-utils": "^0.17.0", + "ipfs-http-gateway": "^0.12.0", "ipfs-unixfs": "^8.0.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", @@ -106,7 +106,7 @@ "aegir": "^37.0.11", "err-code": "^3.0.1", "form-data": "^4.0.0", - "ipfs-http-client": "^58.0.1", + "ipfs-http-client": "^59.0.0", "iso-random-stream": "^2.0.2", "it-first": "^2.0.0", "it-to-buffer": "^3.0.0", diff --git a/packages/ipfs-message-port-client/CHANGELOG.md b/packages/ipfs-message-port-client/CHANGELOG.md index 34baf859c1..f5daada84f 100644 --- a/packages/ipfs-message-port-client/CHANGELOG.md +++ b/packages/ipfs-message-port-client/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-client-v0.13.1...ipfs-message-port-client-v0.14.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-message-port-protocol bumped from ^0.13.1 to ^0.14.0 + * devDependencies + * interface-ipfs-core bumped from ^0.156.1 to ^0.157.0 + * ipfs-core bumped from ^0.16.1 to ^0.17.0 + * ipfs-message-port-server bumped from ^0.13.1 to ^0.14.0 + ### [0.13.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-client-v0.13.0...ipfs-message-port-client-v0.13.1) (2022-09-21) @@ -577,4 +600,4 @@ Co-authored-by: achingbrain ### Features -* share IPFS node between browser tabs ([#3081](https://github.com/ipfs/js-ipfs/issues/3081)) ([1b8b1b8](https://github.com/ipfs/js-ipfs/commit/1b8b1b822a252498889c54972a1f57e1fedc39d0)), closes [#3022](https://github.com/ipfs/js-ipfs/issues/3022) +* share IPFS node between browser tabs ([#3081](https://github.com/ipfs/js-ipfs/issues/3081)) ([1b8b1b8](https://github.com/ipfs/js-ipfs/commit/1b8b1b822a252498889c54972a1f57e1fedc39d0)), closes [#3022](https://github.com/ipfs/js-ipfs/issues/3022) \ No newline at end of file diff --git a/packages/ipfs-message-port-client/package.json b/packages/ipfs-message-port-client/package.json index 1c468bce19..a521670f6d 100644 --- a/packages/ipfs-message-port-client/package.json +++ b/packages/ipfs-message-port-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-message-port-client", - "version": "0.13.1", + "version": "0.14.0", "description": "IPFS client library for accessing IPFS node over message port", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-client#readme", @@ -66,16 +66,16 @@ "dependencies": { "browser-readablestream-to-it": "^2.0.0", "err-code": "^3.0.1", - "ipfs-core-types": "^0.12.1", - "ipfs-message-port-protocol": "^0.13.1", + "ipfs-core-types": "^0.13.0", + "ipfs-message-port-protocol": "^0.14.0", "ipfs-unixfs": "^8.0.0", "it-peekable": "^2.0.0", "multiformats": "^10.0.0" }, "devDependencies": { "aegir": "^37.0.11", - "interface-ipfs-core": "^0.156.1", - "ipfs-core": "^0.16.1", - "ipfs-message-port-server": "^0.13.1" + "interface-ipfs-core": "^0.157.0", + "ipfs-core": "^0.17.0", + "ipfs-message-port-server": "^0.14.0" } } diff --git a/packages/ipfs-message-port-protocol/CHANGELOG.md b/packages/ipfs-message-port-protocol/CHANGELOG.md index 8582118e94..5512f5d061 100644 --- a/packages/ipfs-message-port-protocol/CHANGELOG.md +++ b/packages/ipfs-message-port-protocol/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-protocol-v0.13.1...ipfs-message-port-protocol-v0.14.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + ### [0.13.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-protocol-v0.13.0...ipfs-message-port-protocol-v0.13.1) (2022-09-21) @@ -404,4 +422,4 @@ Co-authored-by: achingbrain ### Features -* share IPFS node between browser tabs ([#3081](https://github.com/ipfs/js-ipfs/issues/3081)) ([1b8b1b8](https://github.com/ipfs/js-ipfs/commit/1b8b1b822a252498889c54972a1f57e1fedc39d0)), closes [#3022](https://github.com/ipfs/js-ipfs/issues/3022) +* share IPFS node between browser tabs ([#3081](https://github.com/ipfs/js-ipfs/issues/3081)) ([1b8b1b8](https://github.com/ipfs/js-ipfs/commit/1b8b1b822a252498889c54972a1f57e1fedc39d0)), closes [#3022](https://github.com/ipfs/js-ipfs/issues/3022) \ No newline at end of file diff --git a/packages/ipfs-message-port-protocol/package.json b/packages/ipfs-message-port-protocol/package.json index 531d955f25..3cf972b5f1 100644 --- a/packages/ipfs-message-port-protocol/package.json +++ b/packages/ipfs-message-port-protocol/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-message-port-protocol", - "version": "0.13.1", + "version": "0.14.0", "description": "IPFS client/server protocol over message port", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-protocol#readme", @@ -87,7 +87,7 @@ "dep-check": "aegir dep-check -i ipfs-core-types" }, "dependencies": { - "ipfs-core-types": "^0.12.1", + "ipfs-core-types": "^0.13.0", "multiformats": "^10.0.0" }, "devDependencies": { diff --git a/packages/ipfs-message-port-server/CHANGELOG.md b/packages/ipfs-message-port-server/CHANGELOG.md index a98b5b6eb4..e8c8d4f89b 100644 --- a/packages/ipfs-message-port-server/CHANGELOG.md +++ b/packages/ipfs-message-port-server/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-server-v0.13.1...ipfs-message-port-server-v0.14.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-message-port-protocol bumped from ^0.13.1 to ^0.14.0 + ### [0.13.1](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-server-v0.13.0...ipfs-message-port-server-v0.13.1) (2022-09-21) @@ -452,4 +471,4 @@ Co-authored-by: achingbrain ### Features -* share IPFS node between browser tabs ([#3081](https://github.com/ipfs/js-ipfs/issues/3081)) ([1b8b1b8](https://github.com/ipfs/js-ipfs/commit/1b8b1b822a252498889c54972a1f57e1fedc39d0)), closes [#3022](https://github.com/ipfs/js-ipfs/issues/3022) +* share IPFS node between browser tabs ([#3081](https://github.com/ipfs/js-ipfs/issues/3081)) ([1b8b1b8](https://github.com/ipfs/js-ipfs/commit/1b8b1b822a252498889c54972a1f57e1fedc39d0)), closes [#3022](https://github.com/ipfs/js-ipfs/issues/3022) \ No newline at end of file diff --git a/packages/ipfs-message-port-server/package.json b/packages/ipfs-message-port-server/package.json index ccc9192a41..371fa1f331 100644 --- a/packages/ipfs-message-port-server/package.json +++ b/packages/ipfs-message-port-server/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-message-port-server", - "version": "0.13.1", + "version": "0.14.0", "description": "IPFS server library for exposing IPFS node over message port", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme", @@ -92,8 +92,8 @@ "dep-check": "aegir dep-check -i ipfs-core-types" }, "dependencies": { - "ipfs-core-types": "^0.12.1", - "ipfs-message-port-protocol": "^0.13.1", + "ipfs-core-types": "^0.13.0", + "ipfs-message-port-protocol": "^0.14.0", "it-all": "^2.0.0" }, "devDependencies": { diff --git a/packages/ipfs/CHANGELOG.md b/packages/ipfs/CHANGELOG.md index aa06d69534..7e4ba52a9e 100644 --- a/packages/ipfs/CHANGELOG.md +++ b/packages/ipfs/CHANGELOG.md @@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.65.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-v0.64.2...ipfs-v0.65.0) (2022-10-24) + + +### ⚠ BREAKING CHANGES + +* ipfs is now bundled with libp2p@0.40.x which has different config + +### Features + +* upgrade libp2p to 0.40.x ([#4237](https://www.github.com/ipfs/js-ipfs/issues/4237)) ([0cee4a4](https://www.github.com/ipfs/js-ipfs/commit/0cee4a4c55767022584dcbade0b0b9b43326f9c9)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-cli bumped from ^0.14.2 to ^0.15.0 + * ipfs-core bumped from ^0.16.1 to ^0.17.0 + * devDependencies + * interface-ipfs-core bumped from ^0.156.1 to ^0.157.0 + * ipfs-client bumped from ^0.9.1 to ^0.9.2 + * ipfs-core-types bumped from ^0.12.1 to ^0.13.0 + * ipfs-http-client bumped from ^58.0.1 to ^59.0.0 + ### [0.64.2](https://www.github.com/ipfs/js-ipfs/compare/ipfs-v0.64.1...ipfs-v0.64.2) (2022-09-21) diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index 77f19fc64a..d80160a62a 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -1,6 +1,6 @@ { "name": "ipfs", - "version": "0.64.2", + "version": "0.65.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs#readme", @@ -77,8 +77,8 @@ }, "dependencies": { "@libp2p/logger": "^2.0.0", - "ipfs-cli": "^0.14.2", - "ipfs-core": "^0.16.1", + "ipfs-cli": "^0.15.0", + "ipfs-core": "^0.17.0", "semver": "^7.3.2", "update-notifier": "^6.0.0" }, @@ -91,10 +91,10 @@ "cross-env": "^7.0.0", "electron-webrtc": "^0.3.0", "go-ipfs": "^0.12.0", - "interface-ipfs-core": "^0.156.1", - "ipfs-client": "^0.9.1", - "ipfs-core-types": "^0.12.1", - "ipfs-http-client": "^58.0.1", + "interface-ipfs-core": "^0.157.0", + "ipfs-client": "^0.9.2", + "ipfs-core-types": "^0.13.0", + "ipfs-http-client": "^59.0.0", "ipfs-interop": "ipfs/interop#deps/update-multiformats", "ipfs-utils": "^9.0.6", "ipfsd-ctl": "^12.0.3", From a77e40cc130dd4834287297b7b51f2b525f81fe3 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 25 Oct 2022 07:44:09 +0100 Subject: [PATCH 03/28] docs: add missing upgrade guides (#4240) Add guides for the last few releases. --- docs/upgrading/v0.62-v0.63.md | 4 ++-- docs/upgrading/v0.63-v0.64.md | 16 ++++++++++++++++ docs/upgrading/v0.64-v0.65.md | 23 +++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 docs/upgrading/v0.63-v0.64.md create mode 100644 docs/upgrading/v0.64-v0.65.md diff --git a/docs/upgrading/v0.62-v0.63.md b/docs/upgrading/v0.62-v0.63.md index e931a9aa49..14505b2e26 100644 --- a/docs/upgrading/v0.62-v0.63.md +++ b/docs/upgrading/v0.62-v0.63.md @@ -1,12 +1,12 @@ # Migrating to ipfs@0.63 and ipfs-core@0.15 -> A migration guide for refactoring your application code from `ipfs@0.63.x` to `ipfs@0.64.x` +> A migration guide for refactoring your application code from `ipfs@0.62.x` to `ipfs@0.63.x` ## Table of Contents - [ESM](#esm) -- [libp2p@0.37.x](#libp2p037x) +- [`libp2p@0.37.x`](#libp2p037x) - [PeerIds](#peerids) - [multiaddrs](#multiaddrs) diff --git a/docs/upgrading/v0.63-v0.64.md b/docs/upgrading/v0.63-v0.64.md new file mode 100644 index 0000000000..cc685da864 --- /dev/null +++ b/docs/upgrading/v0.63-v0.64.md @@ -0,0 +1,16 @@ + +# Migrating to ipfs@0.64 and ipfs-core@0.16 + +> A migration guide for refactoring your application code from `ipfs@0.63.x` to `ipfs@0.64.x` + +## Table of Contents + +- [libp2p](#libp2p) + +## libp2p + +The upgrade to `ipfs@0.64.x` incorporates an update to `libp2p@0.38.x` but no API changes. + +If your application uses only the default libp2p config there is nothing to do. + +If you supply a custom `libp2p` instance to the `ipfs` factory function you should consult the [`libp2p@0.38.x` upgrade guide](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.37-v0.38.md) for any changes you need to make. diff --git a/docs/upgrading/v0.64-v0.65.md b/docs/upgrading/v0.64-v0.65.md new file mode 100644 index 0000000000..b765f0c91b --- /dev/null +++ b/docs/upgrading/v0.64-v0.65.md @@ -0,0 +1,23 @@ + +# Migrating to ipfs@0.65 and ipfs-core@0.17 + +> A migration guide for refactoring your application code from `ipfs@0.64.x` to `ipfs@0.65.x` + +## Table of Contents + +- [libp2p](#libp2p) +- [multiformats](#multiformats) + +## libp2p + +The upgrade to `ipfs@0.65.x` incorporates an update to `libp2p@0.40.x` but no API changes. + +If your application uses only the default libp2p config there is nothing to do. + +If you supply a custom `libp2p` instance to the `ipfs` factory function you should consult the [`libp2p@0.40.x` upgrade guide](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.39-v0.40.md) for any changes you need to make. + +## multiformats + +`ipfs@0.65.x` now uses `multiformats@10.x.x`, this means instances of the `CID` class now come from that module and not `multiformats@9.x.x` so any `instanceof` checks your codebase has may break if instances are compare to the class loaded from a different module version. + +If your project also has a dependency on the `multiformats` module, it should be updated to `10.x.x` in line with js-ipfs. From 58e6f46843f37ae87503da8288ebb24cb3bc7a44 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 25 Oct 2022 08:48:46 +0100 Subject: [PATCH 04/28] docs: add ts section to esm upgrade guide (#4241) Improve docs around upgrading ts projects to use esm. --- docs/upgrading/v0.62-v0.63.md | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/upgrading/v0.62-v0.63.md b/docs/upgrading/v0.62-v0.63.md index 14505b2e26..9c9910891b 100644 --- a/docs/upgrading/v0.62-v0.63.md +++ b/docs/upgrading/v0.62-v0.63.md @@ -6,6 +6,7 @@ ## Table of Contents - [ESM](#esm) + - [TypeScript and ESM](#typescript-and-esm) - [`libp2p@0.37.x`](#libp2p037x) - [PeerIds](#peerids) - [multiaddrs](#multiaddrs) @@ -34,6 +35,48 @@ async function loadIpfs () { } ``` +### TypeScript and ESM + +When authoring typescript it can often look like you are writing ESM: + +```ts +import { create } from 'ipfs-core' + +create() +``` + +When this is transpiled to JavaScript the default settings will emit CJS which will fail at runtime: + +```js +"use strict"; +exports.__esModule = true; +var ipfs_core_1 = require("ipfs-core"); +(0, ipfs_core_1.create)(); +``` + +You may also see errors about private identifiers: + +```console +node_modules/@libp2p/interfaces/dist/src/events.d.ts:19:5 - error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher. + +19 #private; + ~~~~~~~~ +``` + +To build correctly with ESM as a target, update your `tsconfig.json` to include the following: + +```js +{ + "module": "es2020", // ensures output is ESM + "target": "es2020", // support modern features like private identifiers + // other settings +} +``` + +They must both be set to `es2020` at least, more recent versions will also work. + +If in doubt, examine the JavaScript files `tsc` emits and ensure that any `ipfs` modules are being loaded with `import` and not `require`. + ## `libp2p@0.37.x` `ipfs@0.63.x` upgrades to `libp2p@0.37.x`. This is a significant refactor that ports the entire stack to TypeScript and publishes all modules as ESM-only code. From 2781e1b2ff062474a5e49a917f1b45d0ab64e46d Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 27 Oct 2022 21:58:58 +0100 Subject: [PATCH 05/28] docs: update link to libp2p@0.37.x upgrade guide --- docs/upgrading/v0.62-v0.63.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrading/v0.62-v0.63.md b/docs/upgrading/v0.62-v0.63.md index 9c9910891b..ed3dcb1c8e 100644 --- a/docs/upgrading/v0.62-v0.63.md +++ b/docs/upgrading/v0.62-v0.63.md @@ -81,7 +81,7 @@ If in doubt, examine the JavaScript files `tsc` emits and ensure that any `ipfs` `ipfs@0.63.x` upgrades to `libp2p@0.37.x`. This is a significant refactor that ports the entire stack to TypeScript and publishes all modules as ESM-only code. -Please see the [libp2p 0.37.x upgrade guide](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.36-v.037.md) for how this may affect your application. +Please see the [libp2p 0.37.x upgrade guide](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.36-v0.37.md) for how this may affect your application. ## PeerIds From 6ae5eb7da33adfdee70c7edc09a0f644d5347718 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 28 Oct 2022 07:55:06 +0100 Subject: [PATCH 06/28] chore: fix test --- packages/interface-ipfs-core/src/files/write.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/interface-ipfs-core/src/files/write.js b/packages/interface-ipfs-core/src/files/write.js index f3c7116ff2..4dedb4080b 100644 --- a/packages/interface-ipfs-core/src/files/write.js +++ b/packages/interface-ipfs-core/src/files/write.js @@ -204,7 +204,7 @@ export function testWrite (factory, options) { }) it('writes a small file using an HTML5 Blob (Browser only)', async function () { - if (!global.Blob) { + if (!global.Blob || !global.FileReader) { // @ts-expect-error this is mocha return this.skip() } From 419aae1b2c988b64f74adf1b029e7ef63d28eef8 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 17 Nov 2022 16:59:13 +0000 Subject: [PATCH 07/28] test: remove @ts-expect-errors for this being mocha (#4250) If we specify the return type of the `getIt` util, tsc will know what type `this` is in the test context so we can remove the error overrides. --- package.json | 2 +- packages/interface-ipfs-core/src/add-all.js | 20 +----- packages/interface-ipfs-core/src/add.js | 14 +---- .../interface-ipfs-core/src/dag/export.js | 2 - .../interface-ipfs-core/src/files/touch.js | 3 - .../interface-ipfs-core/src/files/write.js | 2 - packages/interface-ipfs-core/src/key/gen.js | 4 +- packages/interface-ipfs-core/src/key/list.js | 1 - .../interface-ipfs-core/src/key/rename.js | 1 - packages/interface-ipfs-core/src/key/rm.js | 1 - .../src/miscellaneous/dns.js | 6 -- .../src/miscellaneous/id.js | 2 - .../src/miscellaneous/resolve.js | 4 -- .../src/name-pubsub/cancel.js | 2 - .../src/name-pubsub/pubsub.js | 3 - .../src/name-pubsub/state.js | 1 - .../src/name-pubsub/subs.js | 2 - .../interface-ipfs-core/src/name/publish.js | 3 - .../interface-ipfs-core/src/name/resolve.js | 12 ---- packages/interface-ipfs-core/src/pin/add.js | 4 -- .../src/pubsub/subscribe.js | 1 - packages/interface-ipfs-core/src/refs.js | 2 - .../interface-ipfs-core/src/utils/mocha.js | 12 +++- .../src/pins/normalise-input.js | 63 ++++++++++++++++--- packages/ipfs-http-client/src/key/gen.js | 10 +-- .../ipfs-message-port-protocol/src/cid.js | 15 ++--- packages/ipfs/package.json | 6 +- 27 files changed, 83 insertions(+), 115 deletions(-) diff --git a/package.json b/package.json index 824f5a9ed5..65e59f9df1 100644 --- a/package.json +++ b/package.json @@ -73,4 +73,4 @@ "workspaces": [ "packages/*" ] -} +} \ No newline at end of file diff --git a/packages/interface-ipfs-core/src/add-all.js b/packages/interface-ipfs-core/src/add-all.js index b56c5d1445..0e5efd94ea 100644 --- a/packages/interface-ipfs-core/src/add-all.js +++ b/packages/interface-ipfs-core/src/add-all.js @@ -76,8 +76,7 @@ export function testAddAll (factory, options) { it('should add a File as array of tuples', async function () { if (!supportsFileReader) { - // @ts-expect-error this is mocha - return this.skip('skip in node') + return this.skip() } const tuple = { @@ -102,8 +101,7 @@ export function testAddAll (factory, options) { it('should add array of objects with readable stream content', async function () { if (!isNode) { - // @ts-expect-error this is mocha - this.skip('Only node supports readable streams') + this.skip() } const expectedCid = 'QmVv4Wz46JaZJeH5PMV4LGbRiiMKEmszPYY3g6fjGnVXBS' @@ -336,7 +334,6 @@ export function testAddAll (factory, options) { }) it('should add a directory with only-hash=true', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const content = String(Math.random() + Date.now()) @@ -358,21 +355,18 @@ export function testAddAll (factory, options) { }) it('should add with mode as string', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mode = '0777' await testMode(mode, parseInt(mode, 8)) }) it('should add with mode as number', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mode = parseInt('0777', 8) await testMode(mode, mode) }) it('should add with mtime as Date', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mtime = new Date(5000) await testMtime(mtime, { @@ -382,7 +376,6 @@ export function testAddAll (factory, options) { }) it('should add with mtime as { nsecs, secs }', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mtime = { secs: 5, @@ -392,7 +385,6 @@ export function testAddAll (factory, options) { }) it('should add with mtime as timespec', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) await testMtime({ Seconds: 5, @@ -404,7 +396,6 @@ export function testAddAll (factory, options) { }) it('should add with mtime as hrtime', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mtime = process.hrtime() await testMtime(mtime, { @@ -414,7 +405,6 @@ export function testAddAll (factory, options) { }) it('should add a directory from the file system', async function () { - // @ts-expect-error this is mocha if (!isNode) this.skip() const filesPath = resolve('test/fixtures/test-folder', 'interface-ipfs-core') @@ -423,7 +413,6 @@ export function testAddAll (factory, options) { }) it('should add a directory from the file system with an odd name', async function () { - // @ts-expect-error this is mocha if (!isNode) this.skip() const filesPath = resolve('test/fixtures/weird name folder [v0]', 'interface-ipfs-core') @@ -433,7 +422,6 @@ export function testAddAll (factory, options) { }) it('should ignore a directory from the file system', async function () { - // @ts-expect-error this is mocha if (!isNode) this.skip() const filesPath = resolve('test/fixtures/test-folder', 'interface-ipfs-core') @@ -443,7 +431,6 @@ export function testAddAll (factory, options) { }) it('should add a file from the file system', async function () { - // @ts-expect-error this is mocha if (!isNode) this.skip() const filePath = resolve('test/fixtures/test-folder', 'interface-ipfs-core') @@ -454,7 +441,6 @@ export function testAddAll (factory, options) { }) it('should add a hidden file in a directory from the file system', async function () { - // @ts-expect-error this is mocha if (!isNode) this.skip() const filesPath = resolve('test/fixtures', 'interface-ipfs-core') @@ -465,10 +451,8 @@ export function testAddAll (factory, options) { }) it('should add a file with only-hash=true', async function () { - // @ts-expect-error this is mocha if (!isNode) this.skip() - // @ts-expect-error this is mocha this.slow(10 * 1000) const out = await all(ipfs.addAll([{ diff --git a/packages/interface-ipfs-core/src/add.js b/packages/interface-ipfs-core/src/add.js index 38cd90175b..1d0f05dec2 100644 --- a/packages/interface-ipfs-core/src/add.js +++ b/packages/interface-ipfs-core/src/add.js @@ -73,8 +73,7 @@ export function testAdd (factory, options) { it('should add a File', async function () { if (!supportsFileReader) { - // @ts-expect-error this is mocha - return this.skip('skip in node') + return this.skip() } const fileAdded = await ipfs.add(new File(['should add a File'], 'filename.txt', { type: 'text/plain' })) @@ -83,8 +82,7 @@ export function testAdd (factory, options) { it('should add a File as tuple', async function () { if (!supportsFileReader) { - // @ts-expect-error this is mocha - return this.skip('skip in node') + return this.skip() } const tuple = { @@ -212,7 +210,6 @@ export function testAdd (factory, options) { it('should add readable stream', async function () { if (!isNode) { - // @ts-expect-error this is mocha this.skip() } const expectedCid = 'QmVv4Wz46JaZJeH5PMV4LGbRiiMKEmszPYY3g6fjGnVXBS' @@ -264,7 +261,6 @@ export function testAdd (factory, options) { }) it('should add with only-hash=true', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const content = String(Math.random() + Date.now()) @@ -292,21 +288,18 @@ export function testAdd (factory, options) { }) it('should add with mode as string', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mode = '0777' await testMode(mode, parseInt(mode, 8)) }) it('should add with mode as number', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mode = parseInt('0777', 8) await testMode(mode, mode) }) it('should add with mtime as Date', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mtime = new Date(5000) await testMtime(mtime, { @@ -316,7 +309,6 @@ export function testAdd (factory, options) { }) it('should add with mtime as { nsecs, secs }', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mtime = { secs: 5, @@ -326,7 +318,6 @@ export function testAdd (factory, options) { }) it('should add with mtime as timespec', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) await testMtime({ Seconds: 5, @@ -338,7 +329,6 @@ export function testAdd (factory, options) { }) it('should add with mtime as hrtime', async function () { - // @ts-expect-error this is mocha this.slow(10 * 1000) const mtime = process.hrtime() await testMtime(mtime, { diff --git a/packages/interface-ipfs-core/src/dag/export.js b/packages/interface-ipfs-core/src/dag/export.js index abd9ddd2dc..8a1b4cc0ab 100644 --- a/packages/interface-ipfs-core/src/dag/export.js +++ b/packages/interface-ipfs-core/src/dag/export.js @@ -72,7 +72,6 @@ export function testExport (factory, options) { }) it('export of shuffled devnet export identical to canonical original', async function () { - // @ts-expect-error this is mocha this.timeout(360000) const input = loadFixture('test/fixtures/car/lotus_devnet_genesis.car', 'interface-ipfs-core') @@ -83,7 +82,6 @@ export function testExport (factory, options) { }) it('export of shuffled testnet export identical to canonical original', async function () { - // @ts-expect-error this is mocha this.timeout(360000) const input = loadFixture('test/fixtures/car/lotus_testnet_export_128.car', 'interface-ipfs-core') diff --git a/packages/interface-ipfs-core/src/files/touch.js b/packages/interface-ipfs-core/src/files/touch.js index 614a7bb17e..a4edfef830 100644 --- a/packages/interface-ipfs-core/src/files/touch.js +++ b/packages/interface-ipfs-core/src/files/touch.js @@ -53,7 +53,6 @@ export function testTouch (factory, options) { after(() => factory.clean()) it('should have default mtime', async function () { - // @ts-expect-error this is mocha this.slow(5 * 1000) const testPath = `/test-${nanoid()}` @@ -74,7 +73,6 @@ export function testTouch (factory, options) { }) it('should update file mtime', async function () { - // @ts-expect-error this is mocha this.slow(5 * 1000) const testPath = `/test-${nanoid()}` const mtime = new Date() @@ -92,7 +90,6 @@ export function testTouch (factory, options) { }) it('should update directory mtime', async function () { - // @ts-expect-error this is mocha this.slow(5 * 1000) const testPath = `/test-${nanoid()}` const mtime = new Date() diff --git a/packages/interface-ipfs-core/src/files/write.js b/packages/interface-ipfs-core/src/files/write.js index 4dedb4080b..4c4f148b75 100644 --- a/packages/interface-ipfs-core/src/files/write.js +++ b/packages/interface-ipfs-core/src/files/write.js @@ -188,7 +188,6 @@ export function testWrite (factory, options) { it('writes a small file using a Node stream (Node only)', async function () { if (!isNode) { - // @ts-expect-error this is mocha this.skip() } const filePath = `/small-file-${Math.random()}.txt` @@ -205,7 +204,6 @@ export function testWrite (factory, options) { it('writes a small file using an HTML5 Blob (Browser only)', async function () { if (!global.Blob || !global.FileReader) { - // @ts-expect-error this is mocha return this.skip() } diff --git a/packages/interface-ipfs-core/src/key/gen.js b/packages/interface-ipfs-core/src/key/gen.js index f09d9346d6..72511fe496 100644 --- a/packages/interface-ipfs-core/src/key/gen.js +++ b/packages/interface-ipfs-core/src/key/gen.js @@ -44,7 +44,6 @@ export function testGen (factory, options) { keyTypes.forEach((kt) => { it(`should generate a new ${kt.opts.type || 'default'} key`, async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) const name = nanoid() const key = await ipfs.key.gen(name, kt.opts) @@ -61,8 +60,7 @@ export function testGen (factory, options) { } catch (/** @type {any} */ err) { if (err.code === 'ERR_NOT_IMPLEMENTED') { // key export is not exposed over the HTTP API - // @ts-expect-error this is mocha - this.skip('Cannot verify key type') + this.skip() } throw err diff --git a/packages/interface-ipfs-core/src/key/list.js b/packages/interface-ipfs-core/src/key/list.js index 15de84f4fe..9b85ac9742 100644 --- a/packages/interface-ipfs-core/src/key/list.js +++ b/packages/interface-ipfs-core/src/key/list.js @@ -27,7 +27,6 @@ export function testList (factory, options) { after(() => factory.clean()) it('should list all the keys', async function () { - // @ts-expect-error this is mocha this.timeout(60 * 1000) const keys = await Promise.all([1, 2, 3].map(() => ipfs.key.gen(nanoid(), { type: 'rsa', size: 2048 }))) diff --git a/packages/interface-ipfs-core/src/key/rename.js b/packages/interface-ipfs-core/src/key/rename.js index b8f4c1bc4a..6acfb6a35f 100644 --- a/packages/interface-ipfs-core/src/key/rename.js +++ b/packages/interface-ipfs-core/src/key/rename.js @@ -27,7 +27,6 @@ export function testRename (factory, options) { after(() => factory.clean()) it('should rename a key', async function () { - // @ts-expect-error this is mocha this.timeout(30 * 1000) const oldName = nanoid() diff --git a/packages/interface-ipfs-core/src/key/rm.js b/packages/interface-ipfs-core/src/key/rm.js index 5cde9bf106..f24771f1ec 100644 --- a/packages/interface-ipfs-core/src/key/rm.js +++ b/packages/interface-ipfs-core/src/key/rm.js @@ -27,7 +27,6 @@ export function testRm (factory, options) { after(() => factory.clean()) it('should rm a key', async function () { - // @ts-expect-error this is mocha this.timeout(30 * 1000) const key = await ipfs.key.gen(nanoid(), { type: 'rsa', size: 2048 }) diff --git a/packages/interface-ipfs-core/src/miscellaneous/dns.js b/packages/interface-ipfs-core/src/miscellaneous/dns.js index 3ca5b7d54f..8d7837d250 100644 --- a/packages/interface-ipfs-core/src/miscellaneous/dns.js +++ b/packages/interface-ipfs-core/src/miscellaneous/dns.js @@ -38,13 +38,11 @@ export function testDns (factory, options) { expect(res).to.match(/\/ipns\/.+$/) } catch (/** @type {any} */ err) { if (err.message.includes('could not resolve name')) { - // @ts-expect-error this is mocha return this.skip() } // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -62,13 +60,11 @@ export function testDns (factory, options) { expect(res).to.match(/\/ipfs\/.+$/) } catch (/** @type {any} */ err) { if (err.message.includes('could not resolve name')) { - // @ts-expect-error this is mocha return this.skip() } // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -86,13 +82,11 @@ export function testDns (factory, options) { expect(res).to.match(/\/ipfs\/.+$/) } catch (/** @type {any} */ err) { if (err.message.includes('could not resolve name')) { - // @ts-expect-error this is mocha return this.skip() } // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } diff --git a/packages/interface-ipfs-core/src/miscellaneous/id.js b/packages/interface-ipfs-core/src/miscellaneous/id.js index cd67e48ddf..59107c232c 100644 --- a/packages/interface-ipfs-core/src/miscellaneous/id.js +++ b/packages/interface-ipfs-core/src/miscellaneous/id.js @@ -59,7 +59,6 @@ export function testId (factory, options) { it('should return swarm ports opened after startup', async function () { if (isWebWorker) { // TODO: webworkers are not currently dialable - // @ts-expect-error this is mocha return this.skip() } @@ -69,7 +68,6 @@ export function testId (factory, options) { it('should get the id of another node in the swarm', async function () { if (isWebWorker) { // TODO: https://github.com/libp2p/js-libp2p-websockets/issues/129 - // @ts-expect-error this is mocha return this.skip() } diff --git a/packages/interface-ipfs-core/src/miscellaneous/resolve.js b/packages/interface-ipfs-core/src/miscellaneous/resolve.js index 49e004c4fa..3a2648e79a 100644 --- a/packages/interface-ipfs-core/src/miscellaneous/resolve.js +++ b/packages/interface-ipfs-core/src/miscellaneous/resolve.js @@ -94,7 +94,6 @@ export function testResolve (factory, options) { // Test resolve turns /ipns/domain.com into /ipfs/QmHash it('should resolve an IPNS DNS link', async function () { - // @ts-expect-error this is mocha this.retries(3) const domain = 'ipfs.io' @@ -105,7 +104,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -114,7 +112,6 @@ export function testResolve (factory, options) { }) it('should resolve IPNS link recursively by default', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) // webworkers are not dialable because webrtc is not available const node = (await factory.spawn({ @@ -140,7 +137,6 @@ export function testResolve (factory, options) { }) it('should resolve IPNS link non-recursively if recursive==false', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) // webworkers are not dialable because webrtc is not available const node = (await factory.spawn({ diff --git a/packages/interface-ipfs-core/src/name-pubsub/cancel.js b/packages/interface-ipfs-core/src/name-pubsub/cancel.js index 39971ec5d8..a655840ad0 100644 --- a/packages/interface-ipfs-core/src/name-pubsub/cancel.js +++ b/packages/interface-ipfs-core/src/name-pubsub/cancel.js @@ -32,7 +32,6 @@ export function testCancel (factory, options) { after(() => factory.clean()) it('should return false when the name that is intended to cancel is not subscribed', async function () { - // @ts-expect-error this is mocha this.timeout(60 * 1000) const res = await ipfs.name.pubsub.cancel(nodeId) @@ -42,7 +41,6 @@ export function testCancel (factory, options) { }) it('should cancel a subscription correctly returning true', async function () { - // @ts-expect-error this is mocha this.timeout(300 * 1000) const peerId = await createEd25519PeerId() diff --git a/packages/interface-ipfs-core/src/name-pubsub/pubsub.js b/packages/interface-ipfs-core/src/name-pubsub/pubsub.js index 7849334951..688be1cf0b 100644 --- a/packages/interface-ipfs-core/src/name-pubsub/pubsub.js +++ b/packages/interface-ipfs-core/src/name-pubsub/pubsub.js @@ -82,7 +82,6 @@ export function testPubsub (factory, options) { after(() => factory.clean()) it('should publish and then resolve correctly', async function () { - // @ts-expect-error this is mocha this.timeout(80 * 1000) const routingKey = ipns.peerIdToRoutingKey(idA.id) @@ -98,7 +97,6 @@ export function testPubsub (factory, options) { }) it('should self resolve, publish and then resolve correctly', async function () { - // @ts-expect-error this is mocha this.timeout(6000) const emptyDirCid = '/ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn' const { path } = await nodeA.add(uint8ArrayFromString('pubsub records')) @@ -120,7 +118,6 @@ export function testPubsub (factory, options) { }) it('should handle event on publish correctly', async function () { - // @ts-expect-error this is mocha this.timeout(80 * 1000) const testAccountName = 'test-account' diff --git a/packages/interface-ipfs-core/src/name-pubsub/state.js b/packages/interface-ipfs-core/src/name-pubsub/state.js index 17ab98f449..fd966f6da4 100644 --- a/packages/interface-ipfs-core/src/name-pubsub/state.js +++ b/packages/interface-ipfs-core/src/name-pubsub/state.js @@ -26,7 +26,6 @@ export function testState (factory, options) { after(() => factory.clean()) it('should get the current state of pubsub', async function () { - // @ts-expect-error this is mocha this.timeout(50 * 1000) const res = await ipfs.name.pubsub.state() diff --git a/packages/interface-ipfs-core/src/name-pubsub/subs.js b/packages/interface-ipfs-core/src/name-pubsub/subs.js index 3f2d264204..558f3a7b86 100644 --- a/packages/interface-ipfs-core/src/name-pubsub/subs.js +++ b/packages/interface-ipfs-core/src/name-pubsub/subs.js @@ -27,7 +27,6 @@ export function testSubs (factory, options) { after(() => factory.clean()) it('should get an empty array as a result of subscriptions before any resolve', async function () { - // @ts-expect-error this is mocha this.timeout(60 * 1000) const res = await ipfs.name.pubsub.subs() @@ -36,7 +35,6 @@ export function testSubs (factory, options) { }) it('should get the list of subscriptions updated after a resolve', async function () { - // @ts-expect-error this is mocha this.timeout(300 * 1000) const id = 'QmNP1ASen5ZREtiJTtVD3jhMKhoPb1zppET1tgpjHx2NGA' diff --git a/packages/interface-ipfs-core/src/name/publish.js b/packages/interface-ipfs-core/src/name/publish.js index e44b806387..0cc06a70bb 100644 --- a/packages/interface-ipfs-core/src/name/publish.js +++ b/packages/interface-ipfs-core/src/name/publish.js @@ -46,7 +46,6 @@ export function testPublish (factory, options) { after(() => factory.clean()) it('should publish an IPNS record with the default params', async function () { - // @ts-expect-error this is mocha this.timeout(50 * 1000) const value = fixture.cid @@ -71,7 +70,6 @@ export function testPublish (factory, options) { }) it('should publish correctly when the file was not added but resolve is disabled', async function () { - // @ts-expect-error this is mocha this.timeout(50 * 1000) const value = 'QmPFVLPmp9zv5Z5KUqLhe2EivAGccQW2r7M7jhVJGLZoZU' @@ -97,7 +95,6 @@ export function testPublish (factory, options) { }) it('should publish with a key received as param, instead of using the key of the node', async function () { - // @ts-expect-error this is mocha this.timeout(90 * 1000) const value = fixture.cid diff --git a/packages/interface-ipfs-core/src/name/resolve.js b/packages/interface-ipfs-core/src/name/resolve.js index 69deee2ff9..4b5aa290c0 100644 --- a/packages/interface-ipfs-core/src/name/resolve.js +++ b/packages/interface-ipfs-core/src/name/resolve.js @@ -44,7 +44,6 @@ export function testResolve (factory, options) { after(() => factory.clean()) it('should resolve a record default options', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) const { path } = await ipfs.add(uint8ArrayFromString('should resolve a record default options')) @@ -58,7 +57,6 @@ export function testResolve (factory, options) { }) it('should resolve a record from peerid as cidv1 in base32', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) const { cid } = await ipfs.add(uint8ArrayFromString('should resolve a record from cidv1b32')) const { id: peerId } = await ipfs.id() @@ -80,7 +78,6 @@ export function testResolve (factory, options) { }) it('should resolve a record recursive === true', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) const { path } = await ipfs.add(uint8ArrayFromString('should resolve a record recursive === true')) @@ -94,7 +91,6 @@ export function testResolve (factory, options) { }) it('should resolve a record default options with remainder', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) const { path } = await ipfs.add(uint8ArrayFromString('should resolve a record default options with remainder')) @@ -115,7 +111,6 @@ export function testResolve (factory, options) { }) it('should resolve a record recursive === true with remainder', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) const { path } = await ipfs.add(uint8ArrayFromString('should resolve a record recursive = true with remainder')) @@ -169,7 +164,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -186,7 +180,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -203,7 +196,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -220,7 +212,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -237,7 +228,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -254,7 +244,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } @@ -279,7 +268,6 @@ export function testResolve (factory, options) { } catch (/** @type {any} */ err) { // happens when running tests offline if (err.message.includes(`ECONNREFUSED ${domain}`)) { - // @ts-expect-error this is mocha return this.skip() } diff --git a/packages/interface-ipfs-core/src/pin/add.js b/packages/interface-ipfs-core/src/pin/add.js index 3823cbac0d..62ab0c4a85 100644 --- a/packages/interface-ipfs-core/src/pin/add.js +++ b/packages/interface-ipfs-core/src/pin/add.js @@ -102,9 +102,7 @@ export function testAdd (factory, options) { }) it('should fail to pin a hash not in datastore', async function () { - // @ts-expect-error this is mocha this.slow(3 * 1000) - // @ts-expect-error this is mocha this.timeout(5 * 1000) const falseHash = `${`${fixtures.directory.cid}`.slice(0, -2)}ss` @@ -113,9 +111,7 @@ export function testAdd (factory, options) { }) it('needs all children in datastore to pin recursively', async function () { - // @ts-expect-error this is mocha this.slow(3 * 1000) - // @ts-expect-error this is mocha this.timeout(5 * 1000) await all(ipfs.block.rm(fixtures.directory.files[0].cid)) diff --git a/packages/interface-ipfs-core/src/pubsub/subscribe.js b/packages/interface-ipfs-core/src/pubsub/subscribe.js index bad06e4015..87ecd48f7b 100644 --- a/packages/interface-ipfs-core/src/pubsub/subscribe.js +++ b/packages/interface-ipfs-core/src/pubsub/subscribe.js @@ -194,7 +194,6 @@ export function testSubscribe (factory, options) { it('should receive messages from a different node with floodsub', async function () { if (!isNode) { - // @ts-expect-error this is mocha return this.skip() } diff --git a/packages/interface-ipfs-core/src/refs.js b/packages/interface-ipfs-core/src/refs.js index 8bea1e73e3..739447410a 100644 --- a/packages/interface-ipfs-core/src/refs.js +++ b/packages/interface-ipfs-core/src/refs.js @@ -50,7 +50,6 @@ export function testRefs (factory, options) { const { path, params, expected, expectError, expectTimeout } = options // eslint-disable-next-line no-loop-func it(name, async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) // Call out to IPFS @@ -81,7 +80,6 @@ export function testRefs (factory, options) { }) it('should get refs with cbor links', async function () { - // @ts-expect-error this is mocha this.timeout(20 * 1000) // Call out to IPFS diff --git a/packages/interface-ipfs-core/src/utils/mocha.js b/packages/interface-ipfs-core/src/utils/mocha.js index bd5e93941e..cf90f1f74e 100644 --- a/packages/interface-ipfs-core/src/utils/mocha.js +++ b/packages/interface-ipfs-core/src/utils/mocha.js @@ -93,15 +93,20 @@ export function getDescribe (config) { * @param {object} [config] * @param {boolean | Skip | (string | Skip)[]} [config.skip] * @param {boolean} [config.only] + * @returns {Mocha.TestFunction} */ export function getIt (config) { if (!config) return it /** - * @param {string} name - * @param {*} impl + * @param {string | Mocha.Func} name + * @param {Mocha.Func | Mocha.AsyncFunc} [impl] */ const _it = (name, impl) => { + if (typeof name !== 'string') { + throw new Error('Pass test name as first argument to it') + } + if (Array.isArray(config.skip)) { const skip = config.skip .map((s) => isSkip(s) ? s : { name: s, reason: '🤷' }) @@ -124,9 +129,10 @@ export function getIt (config) { } } - it(name, impl) + return it(name, impl) } + _it.retries = it.retries _it.skip = it.skip _it.only = it.only // eslint-disable-line no-only-tests/no-only-tests diff --git a/packages/ipfs-core-utils/src/pins/normalise-input.js b/packages/ipfs-core-utils/src/pins/normalise-input.js index feef80f43c..3675f53ca6 100644 --- a/packages/ipfs-core-utils/src/pins/normalise-input.js +++ b/packages/ipfs-core-utils/src/pins/normalise-input.js @@ -17,6 +17,30 @@ import { CID } from 'multiformats/cid' * @property {any} [metadata] */ +/** + * @param {any} thing + * @returns {thing is IterableIterator & Iterator} + */ +function isIterable (thing) { + return Symbol.iterator in thing +} + +/** + * @param {any} thing + * @returns {thing is AsyncIterableIterator & AsyncIterator} + */ +function isAsyncIterable (thing) { + return Symbol.asyncIterator in thing +} + +/** + * @param {any} thing + * @returns {thing is CID} + */ +function isCID (thing) { + return CID.asCID(thing) != null +} + /** * Transform one of: * @@ -71,14 +95,16 @@ export async function * normaliseInput (input) { } // Iterable - if (Symbol.iterator in input) { - // @ts-expect-error + if (isIterable(input)) { const iterator = input[Symbol.iterator]() const first = iterator.next() - if (first.done) return iterator - // Iterable - if (CID.asCID(first.value) || first.value instanceof String || typeof first.value === 'string') { + if (first.done) { + return iterator + } + + // Iterable + if (isCID(first.value)) { yield toPin({ cid: first.value }) for (const cid of iterator) { yield toPin({ cid }) @@ -86,7 +112,16 @@ export async function * normaliseInput (input) { return } - // Iterable<{ cid: CID recursive, metadata }> + // Iterable + if (first.value instanceof String || typeof first.value === 'string') { + yield toPin({ path: first.value }) + for (const path of iterator) { + yield toPin({ path }) + } + return + } + + // Iterable if (first.value.cid != null || first.value.path != null) { yield toPin(first.value) for (const obj of iterator) { @@ -99,14 +134,13 @@ export async function * normaliseInput (input) { } // AsyncIterable - if (Symbol.asyncIterator in input) { - // @ts-expect-error + if (isAsyncIterable(input)) { const iterator = input[Symbol.asyncIterator]() const first = await iterator.next() if (first.done) return iterator - // AsyncIterable - if (CID.asCID(first.value) || first.value instanceof String || typeof first.value === 'string') { + // AsyncIterable + if (isCID(first.value)) { yield toPin({ cid: first.value }) for await (const cid of iterator) { yield toPin({ cid }) @@ -114,6 +148,15 @@ export async function * normaliseInput (input) { return } + // AsyncIterable + if (first.value instanceof String || typeof first.value === 'string') { + yield toPin({ path: first.value }) + for await (const path of iterator) { + yield toPin({ path }) + } + return + } + // AsyncIterable<{ cid: CID|String recursive, metadata }> if (first.value.cid != null || first.value.path != null) { yield toPin(first.value) diff --git a/packages/ipfs-http-client/src/key/gen.js b/packages/ipfs-http-client/src/key/gen.js index 50a5e634fc..766a2d26b6 100644 --- a/packages/ipfs-http-client/src/key/gen.js +++ b/packages/ipfs-http-client/src/key/gen.js @@ -11,14 +11,16 @@ export const createGen = configure(api => { /** * @type {KeyAPI["gen"]} */ - async function gen (name, options = { type: 'Ed25519' }) { + async function gen (name, options) { + const opts = options ?? { type: 'Ed25519' } + const res = await api.post('key/gen', { - signal: options.signal, + signal: opts.signal, searchParams: toUrlSearchParams({ arg: name, - ...options + ...opts }), - headers: options.headers + headers: opts.headers }) const data = await res.json() diff --git a/packages/ipfs-message-port-protocol/src/cid.js b/packages/ipfs-message-port-protocol/src/cid.js index 99d64468dc..a4522896ba 100644 --- a/packages/ipfs-message-port-protocol/src/cid.js +++ b/packages/ipfs-message-port-protocol/src/cid.js @@ -36,15 +36,14 @@ export const decodeCID = encodedCID => { // @ts-expect-error we are converting this into an object compatible with the CID class const cid = (encodedCID) - // @ts-expect-error non-enumerable field that doesn't always get transferred - if (!cid._baseCache) { - Object.defineProperty(cid, '_baseCache', { - value: new Map() + if (!cid.asCID) { + Object.defineProperty(cid, 'asCID', { + get: () => cid }) } - if (!cid.asCID) { - Object.defineProperty(cid, 'asCID', { + if (!cid['/']) { + Object.defineProperty(cid, '/', { get: () => cid }) } @@ -53,10 +52,6 @@ export const decodeCID = encodedCID => { Object.setPrototypeOf(cid.multihash.bytes, Uint8Array.prototype) Object.setPrototypeOf(cid.bytes, Uint8Array.prototype) Object.setPrototypeOf(cid, CID.prototype) - // TODO: Figure out a way to avoid `Symbol.for` here as it can get out of - // sync with cids implementation. - // See: https://github.com/moxystudio/js-class-is/issues/25 - Object.defineProperty(cid, Symbol.for('@ipld/js-cid/CID'), { value: true }) return cid } diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index d80160a62a..12b812e452 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -89,7 +89,6 @@ "@types/update-notifier": "^6.0.1", "aegir": "^37.0.11", "cross-env": "^7.0.0", - "electron-webrtc": "^0.3.0", "go-ipfs": "^0.12.0", "interface-ipfs-core": "^0.157.0", "ipfs-client": "^0.9.2", @@ -102,7 +101,10 @@ "kubo-rpc-client": "^1.0.1", "merge-options": "^3.0.4", "mock-ipfs-pinning-service": "^0.4.2", - "url": "^0.11.0", + "url": "^0.11.0" + }, + "optionalDependencies": { + "electron-webrtc": "^0.3.0", "wrtc": "^0.4.6" }, "browser": { From b7220416cc8b53a767a9105148ce2e7d66506051 Mon Sep 17 00:00:00 2001 From: ElinaAndreeva <92360180+ElinaAndreeva@users.noreply.github.com> Date: Thu, 17 Nov 2022 21:00:19 +0400 Subject: [PATCH 08/28] docs: DisableNatPortMap should be true to disable port mapping (#4244) Fixed a mistake Fixes #4236 --- docs/CONFIG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 546d9d1ddf..acfa8b2ac3 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -283,7 +283,7 @@ The "basic" connection manager tries to keep between `LowWater` and `HighWater` By default when running under nodejs, libp2p will try to use [UPnP](https://en.wikipedia.org/wiki/Universal_Plug_and_Play) to open a random high port on your router for any TCP connections you have configured. -Set `DisableNatPortMap` to `false` to disable this behaviour. +Set `DisableNatPortMap` to `true` to disable this behaviour. ### Example From 6be59068cc99c517526bfa123ad475ae05fcbaef Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 17 Nov 2022 19:20:56 +0000 Subject: [PATCH 09/28] fix: mfs blob import for files larger than 262144b (#4251) Turn the `Blob`/`File` object into a `ReadableStream` then turn that into an `AsyncIterator` the same as the other input types. Fixes #3601 Fixes #3576 --- packages/interface-ipfs-core/package.json | 3 +- .../interface-ipfs-core/src/files/stat.js | 22 ++++++++ packages/ipfs-core/package.json | 1 + .../files/utils/to-async-iterator.js | 51 +------------------ 4 files changed, 27 insertions(+), 50 deletions(-) diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index 1ff79ce8e3..30a369b572 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -112,7 +112,8 @@ "pako": "^2.0.4", "readable-stream": "^4.0.0", "sinon": "^14.0.0", - "uint8arrays": "^4.0.2" + "uint8arrays": "^4.0.2", + "wherearewe": "^2.0.1" }, "browser": { "fs": false, diff --git a/packages/interface-ipfs-core/src/files/stat.js b/packages/interface-ipfs-core/src/files/stat.js index 04e949764f..3b63389c4a 100644 --- a/packages/interface-ipfs-core/src/files/stat.js +++ b/packages/interface-ipfs-core/src/files/stat.js @@ -11,6 +11,7 @@ import { identity } from 'multiformats/hashes/identity' import { randomBytes } from 'iso-random-stream' import isShardAtPath from '../utils/is-shard-at-path.js' import * as raw from 'multiformats/codecs/raw' +import { isBrowser } from 'wherearewe' /** * @typedef {import('ipfsd-ctl').Factory} Factory @@ -103,6 +104,27 @@ export function testStat (factory, options) { }) }) + it('should stat a large browser File', async function () { + if (!isBrowser) { + this.skip() + } + + const filePath = `/stat-${Math.random()}/large-file-${Math.random()}.txt` + const blob = new Blob([largeFile]) + + await ipfs.files.write(filePath, blob, { + create: true, + parents: true + }) + + await expect(ipfs.files.stat(filePath)).to.eventually.include({ + size: largeFile.length, + cumulativeSize: 490800, + blocks: 2, + type: 'file' + }) + }) + it('stats a raw node', async () => { const filePath = `/stat-${Math.random()}/large-file-${Math.random()}.txt` diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 36e6c546eb..aac1e417ce 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -102,6 +102,7 @@ "any-signal": "^3.0.0", "array-shuffle": "^3.0.0", "blockstore-core": "^2.0.1", + "browser-readablestream-to-it": "^2.0.0", "dag-jose": "^3.0.1", "datastore-core": "^8.0.1", "datastore-pubsub": "^6.0.0", diff --git a/packages/ipfs-core/src/components/files/utils/to-async-iterator.js b/packages/ipfs-core/src/components/files/utils/to-async-iterator.js index 06f7a9ee5c..219b959a19 100644 --- a/packages/ipfs-core/src/components/files/utils/to-async-iterator.js +++ b/packages/ipfs-core/src/components/files/utils/to-async-iterator.js @@ -1,9 +1,7 @@ import errCode from 'err-code' import { logger } from '@libp2p/logger' -import { - MFS_MAX_CHUNK_SIZE -} from '../../../utils.js' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' +import browserStreamToIt from 'browser-readablestream-to-it' const log = logger('ipfs:mfs:utils:to-async-iterator') @@ -44,52 +42,7 @@ export function toAsyncIterator (content) { if (global.Blob && content instanceof global.Blob) { // HTML5 Blob objects (including Files) log('Content was an HTML5 Blob') - - let index = 0 - - const iterator = { - next: () => { - if (index > content.size) { - return { - done: true - } - } - - return new Promise((resolve, reject) => { - const chunk = content.slice(index, MFS_MAX_CHUNK_SIZE) - index += MFS_MAX_CHUNK_SIZE - - const reader = new global.FileReader() - - /** - * @param {{ error?: Error }} ev - */ - const handleLoad = (ev) => { - // @ts-expect-error No overload matches this call. - reader.removeEventListener('loadend', handleLoad, false) - - if (ev.error) { - return reject(ev.error) - } - - resolve({ - done: false, - value: new Uint8Array(/** @type {ArrayBuffer} */(reader.result)) - }) - } - - // @ts-expect-error No overload matches this call. - reader.addEventListener('loadend', handleLoad) - reader.readAsArrayBuffer(chunk) - }) - } - } - - return { - [Symbol.asyncIterator]: () => { - return iterator - } - } + return browserStreamToIt(content.stream()) } throw errCode(new Error(`Don't know how to convert ${content} into an async iterator`), 'ERR_INVALID_PARAMS') From 521c84a958b04d61702577a5adce28519c1b2a3b Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Mon, 9 Jan 2023 15:25:45 +0000 Subject: [PATCH 10/28] fix!: update multiformats to v11.x.x and related depenendcies (#4277) `multiformats@11.x.x` shipped with a [breaking change](https://github.com/multiformats/js-multiformats/pull/230) so update all deps using multiformats to the latest version. --- .github/workflows/test.yml | 21 +++-- docs/DEVELOPMENT.md | 2 +- lerna.json | 23 ----- package.json | 56 ++++++------ packages/interface-ipfs-core/package.json | 28 +++--- packages/ipfs-cli/package.json | 20 ++--- packages/ipfs-cli/src/commands/cid/base32.js | 3 +- packages/ipfs-client/package.json | 2 +- packages/ipfs-core-config/package.json | 19 ++-- .../src/libp2p-pubsub-routers.browser.js | 36 ++------ .../src/libp2p-pubsub-routers.js | 36 ++------ .../ipfs-core-config/src/libp2p.browser.js | 3 - packages/ipfs-core-config/src/libp2p.js | 8 +- packages/ipfs-core-types/package.json | 12 +-- packages/ipfs-core-utils/package.json | 6 +- packages/ipfs-core/package.json | 74 +++++++-------- packages/ipfs-core/src/components/libp2p.js | 3 + packages/ipfs-core/src/components/stats/bw.js | 20 +++-- packages/ipfs-core/test/utils/create-node.js | 3 +- packages/ipfs-daemon/package.json | 6 +- packages/ipfs-daemon/src/index.js | 6 -- packages/ipfs-grpc-client/package.json | 10 +-- packages/ipfs-grpc-protocol/package.json | 2 +- packages/ipfs-grpc-server/package.json | 6 +- packages/ipfs-http-client/package.json | 12 +-- packages/ipfs-http-client/test/node/agent.js | 2 +- .../test/node/custom-headers.js | 6 +- .../ipfs-http-client/test/node/request-api.js | 89 +++++++++++++------ packages/ipfs-http-client/test/node/swarm.js | 3 +- packages/ipfs-http-gateway/package.json | 8 +- packages/ipfs-http-response/package.json | 3 +- packages/ipfs-http-response/src/index.js | 25 ++---- packages/ipfs-http-server/package.json | 14 +-- .../src/api/resources/swarm.js | 22 ++++- .../ipfs-http-server/src/api/routes/debug.js | 58 ------------ .../ipfs-http-server/test/inject/swarm.js | 8 +- .../ipfs-message-port-client/package.json | 6 +- .../ipfs-message-port-protocol/package.json | 4 +- .../ipfs-message-port-protocol/src/cid.js | 2 +- .../ipfs-message-port-protocol/src/dag.js | 3 +- .../ipfs-message-port-server/package.json | 4 +- packages/ipfs/package.json | 6 +- 42 files changed, 298 insertions(+), 382 deletions(-) delete mode 100644 lerna.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b16ab31931..8db52dbd39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,7 @@ jobs: with: node-version: ${{ matrix.node }} - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npx lerna run test:node --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npm run test:node - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: node @@ -67,7 +67,7 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npx lerna run test:chrome --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npm run test:chrome - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: chrome @@ -84,7 +84,7 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npx lerna run test:chrome-webworker --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npm run test:chrome-webworker - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: chrome-webworker @@ -101,7 +101,7 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npx lerna run test:firefox --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npm run test:firefox - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: firefox @@ -119,7 +119,7 @@ jobs: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - run: npx playwright install --with-deps - - run: npx lerna run test:firefox-webworker --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npm run test:firefox-webworker - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: firefox-webworker @@ -138,13 +138,14 @@ jobs: - uses: ipfs/aegir/actions/cache-node-modules@master - uses: GabrielBB/xvfb-action@v1 with: - run: npx lerna run test:electron-main --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail + run: npm run test:electron-main - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: electron-main test-interop: name: Interop tests ${{ matrix.project }} ${{ matrix.type }} + needs: build runs-on: ubuntu-latest strategy: matrix: @@ -160,9 +161,7 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npm install - - run: npm run build - - run: npx lerna run test:interop --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- -t ${{ matrix.type }} --bail + - run: npm run test:interop -- -- -- -t ${{ matrix.type }} - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: interop-${{ matrix.type }} @@ -190,7 +189,7 @@ jobs: node-version: lts/* - run: npm install - run: npm run build - - run: npx lerna run ${{ matrix.suite }} --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -t ${{ matrix.type }} --bail + - run: npm run ${{ matrix.suite }} -- -- -t ${{ matrix.type }} - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: interface-${{ matrix.type }} @@ -208,7 +207,7 @@ jobs: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - run: npx playwright install --with-deps - - run: npx lerna run test:interface:message-port-client --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail + - run: npm run test:interface:message-port-client release: runs-on: ubuntu-latest diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 6ac3a4f7d9..d68f0e3974 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -31,7 +31,7 @@ $ npm install -g npm@latest > npm install ``` -This will install [lerna](https://www.npmjs.com/package/lerna) and bootstrap the various packages, deduping and hoisting dependencies into the root folder. +This will install the dependencies of the various packages, deduping and hoisting dependencies into the root folder. If later you add new dependencies to submodules or just wish to remove all the `node_modules`/`dist` folders and start again, run `npm run reset && npm install` from the root. diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 86c45bda4a..0000000000 --- a/lerna.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "version": "independent", - "useWorkspaces": true, - "command": { - "bootstrap": { - "hoist": true - }, - "run": { - "stream": true - }, - "publish": { - "message": "chore: publish", - "createRelease": "github", - "conventionalCommits": true, - "verifyAccess": false - }, - "version": { - "allowBranch": ["master", "release/*"], - "forcePublish": true, - "ignore-changes": [".github/**", "docs/**"] - } - } -} diff --git a/package.json b/package.json index 65e59f9df1..411c0fcc4c 100644 --- a/package.json +++ b/package.json @@ -17,30 +17,29 @@ }, "private": true, "scripts": { - "link": "lerna link", - "reset": "lerna run clean && rimraf packages/*/node_modules node_modules package-lock.json packages/*/package-lock.json", - "test": "lerna run test", - "test:node": "lerna run test:node", - "test:chrome": "lerna run test:chrome", - "test:chrome-webworker": "lerna run test:chrome-webworker", - "test:firefox": "lerna run test:firefox", - "test:firefox-webworker": "lerna run test:firefox-webworker", - "test:electron-main": "lerna run test:electron-main", - "test:external": "lerna run test:external", - "test:cli": "lerna run test:cli", - "test:interop": "lerna run test:interop", - "test:interface:client": "lerna run test:interface:client", - "test:interface:core": "lerna run test:interface:core", - "test:interface:http-go": "lerna run test:interface:http-go", - "test:interface:http-js": "lerna run test:interface:http-js", - "test:interface:message-port-client": "lerna run test:interface:message-port-client", - "coverage": "lerna run coverage", - "build": "lerna run build", - "clean": "lerna run clean", - "lint": "lerna run lint", - "dep-check": "lerna run dep-check", + "reset": "aegir run clean && aegir clean packages/*/node_modules node_modules package-lock.json packages/*/package-lock.json", + "test": "aegir run test", + "test:node": "aegir run test:node", + "test:chrome": "aegir run test:chrome", + "test:chrome-webworker": "aegir run test:chrome-webworker", + "test:firefox": "aegir run test:firefox", + "test:firefox-webworker": "aegir run test:firefox-webworker", + "test:electron-main": "aegir run test:electron-main", + "test:external": "aegir run test:external", + "test:cli": "aegir run test:cli", + "test:interop": "aegir run test:interop", + "test:interface:client": "aegir run test:interface:client", + "test:interface:core": "aegir run test:interface:core", + "test:interface:http-go": "aegir run test:interface:http-go", + "test:interface:http-js": "aegir run test:interface:http-js", + "test:interface:message-port-client": "aegir run test:interface:message-port-client", + "coverage": "aegir run coverage", + "build": "aegir run build", + "clean": "aegir run clean", + "lint": "aegir run lint", + "dep-check": "aegir run dep-check", "release": "run-s build npm:release docker:release", - "npm:release": "lerna publish from-package --no-push --no-private --yes", + "npm:release": "aegir publish from-package --no-push --no-private --yes", "docker:release": "run-s docker:release:*", "docker:release:build": "docker build . --no-cache --tag js-ipfs:latest --file ./Dockerfile.latest", "docker:release:tag-latest": "docker tag js-ipfs:latest docker.io/ipfs/js-ipfs:latest", @@ -48,9 +47,9 @@ "docker:release:push-latest": "docker push ipfs/js-ipfs:latest", "docker:release:push-version": "docker push ipfs/js-ipfs:v`npm show ipfs@latest version -q`", "release:rc": "run-s npm:rc:* docker:rc", - "npm:rc:version": "lerna version prerelease --preid `git rev-parse --short HEAD` --force-publish --no-push --yes", + "npm:rc:version": "aegir version prerelease --preid `git rev-parse --short HEAD` --force-publish --no-push --yes", "npm:rc:build": "npm run build", - "npm:rc:publish": "lerna publish from-package --no-push --no-private --dist-tag next --yes", + "npm:rc:publish": "aegir publish from-package --no-push --no-private --dist-tag next --yes", "docker:rc": "run-s docker:rc:*", "docker:rc:build": "docker build . --no-cache --tag js-ipfs:next --file ./Dockerfile.next", "docker:rc:tag-next": "docker tag js-ipfs:next docker.io/ipfs/js-ipfs:next", @@ -59,10 +58,9 @@ "docker:rc:push-rc": "docker push ipfs/js-ipfs:v`npm show ipfs@next version -q`" }, "devDependencies": { - "lerna": "^6.0.1", + "aegir": "^37.9.0", "node-fetch": "npm:@achingbrain/node-fetch@^2.6.4", - "npm-run-all": "^4.1.5", - "rimraf": "^3.0.2" + "npm-run-all": "^4.1.5" }, "eslintConfig": { "extends": "ipfs", @@ -73,4 +71,4 @@ "workspaces": [ "packages/*" ] -} \ No newline at end of file +} diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index 30a369b572..3479d6457b 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -65,31 +65,31 @@ }, "dependencies": { "@ipld/car": "^5.0.0", - "@ipld/dag-cbor": "^8.0.0", - "@ipld/dag-pb": "^3.0.0", - "@libp2p/crypto": "^1.0.0", - "@libp2p/interface-peer-id": "^1.0.4", + "@ipld/dag-cbor": "^9.0.0", + "@ipld/dag-pb": "^4.0.0", + "@libp2p/crypto": "^1.0.7", + "@libp2p/interface-peer-id": "^2.0.0", "@libp2p/interfaces": "^3.0.3", - "@libp2p/peer-id": "^1.1.10", - "@libp2p/peer-id-factory": "^1.0.10", + "@libp2p/peer-id": "^2.0.0", + "@libp2p/peer-id-factory": "^2.0.0", "@libp2p/websockets": "^5.0.0", "@multiformats/multiaddr": "^11.0.0", "@types/node": "^18.0.0", "@types/pako": "^2.0.0", "@types/readable-stream": "^2.3.13", - "aegir": "^37.0.11", - "blockstore-core": "^2.0.1", + "aegir": "^37.9.0", + "blockstore-core": "^3.0.0", "copyfiles": "^2.4.1", "dag-jose": "^3.0.1", "delay": "^5.0.0", "did-jwt": "^6.2.0", "err-code": "^3.0.1", "ipfs-core-types": "^0.13.0", - "ipfs-unixfs": "^8.0.0", - "ipfs-unixfs-importer": "^11.0.0", + "ipfs-unixfs": "^9.0.0", + "ipfs-unixfs-importer": "^12.0.0", "ipfs-utils": "^9.0.6", - "ipns": "^4.0.0", - "is-ipfs": "^7.0.0", + "ipns": "^5.0.1", + "is-ipfs": "^8.0.0", "iso-random-stream": "^2.0.2", "it-all": "^2.0.0", "it-buffer-stream": "^3.0.0", @@ -103,7 +103,7 @@ "it-tar": "^6.0.0", "it-to-buffer": "^3.0.0", "merge-options": "^3.0.4", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "nanoid": "^4.0.0", "p-defer": "^4.0.0", "p-map": "^5.3.0", @@ -111,7 +111,7 @@ "p-wait-for": "^5.0.0", "pako": "^2.0.4", "readable-stream": "^4.0.0", - "sinon": "^14.0.0", + "sinon": "^15.0.1", "uint8arrays": "^4.0.2", "wherearewe": "^2.0.1" }, diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index c7e36fa50c..b30887b259 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -67,11 +67,11 @@ "build": "aegir build --no-bundle" }, "dependencies": { - "@ipld/dag-cbor": "^8.0.0", - "@ipld/dag-json": "^9.0.0", - "@ipld/dag-pb": "^3.0.0", - "@libp2p/logger": "^2.0.0", - "@libp2p/peer-id": "^1.1.10", + "@ipld/dag-cbor": "^9.0.0", + "@ipld/dag-json": "^10.0.0", + "@ipld/dag-pb": "^4.0.0", + "@libp2p/logger": "^2.0.2", + "@libp2p/peer-id": "^2.0.0", "@multiformats/mafmt": "^11.0.2", "@multiformats/multiaddr": "^11.0.0", "@multiformats/multiaddr-to-uri": "^9.0.1", @@ -90,7 +90,7 @@ "it-split": "^2.0.0", "it-tar": "^6.0.0", "jsondiffpatch": "^0.4.1", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "parse-duration": "^1.0.0", "pretty-bytes": "^6.0.0", "progress": "^2.0.3", @@ -99,14 +99,14 @@ "yargs": "^17.4.0" }, "devDependencies": { - "@libp2p/crypto": "^1.0.0", + "@libp2p/crypto": "^1.0.7", "@types/get-folder-size": "^3.0.1", "@types/ncp": "^2.0.5", "@types/progress": "^2.0.3", "@types/rimraf": "^3.0.1", "@types/yargs": "^17.0.10", - "aegir": "^37.0.11", - "ipfs-repo": "^16.0.0", + "aegir": "^37.9.0", + "ipfs-repo": "^17.0.0", "it-all": "^2.0.0", "it-first": "^2.0.0", "it-map": "^2.0.0", @@ -115,7 +115,7 @@ "ncp": "^2.0.0", "pako": "^2.0.4", "rimraf": "^3.0.2", - "sinon": "^14.0.0", + "sinon": "^15.0.1", "string-argv": "^0.3.1", "temp-write": "^5.0.0" } diff --git a/packages/ipfs-cli/src/commands/cid/base32.js b/packages/ipfs-cli/src/commands/cid/base32.js index 5cba80a1aa..9f9a932387 100644 --- a/packages/ipfs-cli/src/commands/cid/base32.js +++ b/packages/ipfs-cli/src/commands/cid/base32.js @@ -1,6 +1,7 @@ import split from 'it-split' import { CID } from 'multiformats/cid' import { base32 } from 'multiformats/bases/base32' +import { toString as uint8arrayToString } from 'uint8arrays/to-string' /** * @typedef {object} Argv @@ -24,7 +25,7 @@ const command = { } for await (const data of input) { - const input = data.toString().trim() + const input = (data instanceof Uint8Array ? uint8arrayToString(data) : data).trim() if (!input) { continue diff --git a/packages/ipfs-client/package.json b/packages/ipfs-client/package.json index f22f85c30e..e477c8a7d4 100644 --- a/packages/ipfs-client/package.json +++ b/packages/ipfs-client/package.json @@ -66,6 +66,6 @@ "merge-options": "^3.0.4" }, "devDependencies": { - "aegir": "^37.0.11" + "aegir": "^37.9.0" } } diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index 9d467a388d..f8e153fb3b 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -94,22 +94,23 @@ "build": "aegir build" }, "dependencies": { - "@chainsafe/libp2p-gossipsub": "^4.0.0", - "@libp2p/floodsub": "^5.0.0", + "@chainsafe/libp2p-gossipsub": "^5.2.1", + "@libp2p/floodsub": "^6.0.0", "@libp2p/logger": "^2.0.2", - "@libp2p/mdns": "^5.0.0", - "@libp2p/tcp": "^5.0.0", - "@libp2p/webrtc-star": "^5.0.2", - "blockstore-datastore-adapter": "^4.0.0", + "@libp2p/mdns": "^6.0.0", + "@libp2p/prometheus-metrics": "^1.0.1", + "@libp2p/tcp": "^6.0.2", + "@libp2p/webrtc-star": "^6.0.0", + "blockstore-datastore-adapter": "^5.0.0", "datastore-core": "^8.0.1", "datastore-fs": "^8.0.0", "datastore-level": "^9.0.0", "err-code": "^3.0.1", "hashlru": "^2.3.0", "interface-datastore": "^7.0.0", - "ipfs-repo": "^16.0.0", + "ipfs-repo": "^17.0.0", "ipfs-utils": "^9.0.6", - "is-ipfs": "^7.0.0", + "is-ipfs": "^8.0.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", "it-foreach": "^1.0.0", @@ -117,7 +118,7 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^37.0.11", + "aegir": "^37.9.0", "ipfs-core-utils": "^0.17.0" } } diff --git a/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js b/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js index 476df5b6c4..a5d6dba740 100644 --- a/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js +++ b/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js @@ -1,34 +1,14 @@ -import { GossipSub } from '@chainsafe/libp2p-gossipsub' +import { gossipsub } from '@chainsafe/libp2p-gossipsub' /** @typedef {import('@libp2p/interface-pubsub').PubSub} PubSub */ /** @type {() => Record PubSub>}>} */ export const routers = () => ({ - // @ts-expect-error GossubSub is out of date - gossipsub: (/** @type {any} */ components) => { - const gossipsub = new GossipSub({ - allowPublishToZeroPeers: true, - fallbackToFloodsub: true, - emitSelf: true, - maxInboundStreams: 64, - maxOutboundStreams: 128 - }) - // @ts-expect-error GossubSub is out of date - gossipsub.init({ - getPeerId () { - return components.peerId - }, - getPeerStore () { - return components.peerStore - }, - getRegistrar () { - return components.registrar - }, - getConnectionManager () { - return components.connectionManager - } - }) - - return gossipsub - } + gossipsub: gossipsub({ + allowPublishToZeroPeers: true, + fallbackToFloodsub: true, + emitSelf: true, + maxInboundStreams: 64, + maxOutboundStreams: 128 + }) }) diff --git a/packages/ipfs-core-config/src/libp2p-pubsub-routers.js b/packages/ipfs-core-config/src/libp2p-pubsub-routers.js index 1d5dd7cb5e..06154d1c35 100644 --- a/packages/ipfs-core-config/src/libp2p-pubsub-routers.js +++ b/packages/ipfs-core-config/src/libp2p-pubsub-routers.js @@ -1,37 +1,17 @@ -import { GossipSub } from '@chainsafe/libp2p-gossipsub' +import { gossipsub } from '@chainsafe/libp2p-gossipsub' import { floodsub } from '@libp2p/floodsub' /** @typedef {import('@libp2p/interface-pubsub').PubSub} PubSub */ /** @type {() => Record PubSub>}>} */ export const routers = () => ({ - // @ts-expect-error GossubSub is out of date - gossipsub: (/** @type {any} */ components) => { - const gossipsub = new GossipSub({ - allowPublishToZeroPeers: true, - fallbackToFloodsub: true, - emitSelf: true, - maxInboundStreams: 64, - maxOutboundStreams: 128 - }) - // @ts-expect-error GossubSub is out of date - gossipsub.init({ - getPeerId () { - return components.peerId - }, - getPeerStore () { - return components.peerStore - }, - getRegistrar () { - return components.registrar - }, - getConnectionManager () { - return components.connectionManager - } - }) - - return gossipsub - }, + gossipsub: gossipsub({ + allowPublishToZeroPeers: true, + fallbackToFloodsub: true, + emitSelf: true, + maxInboundStreams: 64, + maxOutboundStreams: 128 + }), floodsub: floodsub({ emitSelf: true }) diff --git a/packages/ipfs-core-config/src/libp2p.browser.js b/packages/ipfs-core-config/src/libp2p.browser.js index f5f5d34225..9241c0e7b2 100644 --- a/packages/ipfs-core-config/src/libp2p.browser.js +++ b/packages/ipfs-core-config/src/libp2p.browser.js @@ -19,9 +19,6 @@ export function libp2pConfig () { }, nat: { enabled: false - }, - metrics: { - enabled: true } } diff --git a/packages/ipfs-core-config/src/libp2p.js b/packages/ipfs-core-config/src/libp2p.js index 01c4cb97f6..66498e6d61 100644 --- a/packages/ipfs-core-config/src/libp2p.js +++ b/packages/ipfs-core-config/src/libp2p.js @@ -1,6 +1,7 @@ import { tcp } from '@libp2p/tcp' import { mdns } from '@libp2p/mdns' import os from 'os' +import { prometheusMetrics } from '@libp2p/prometheus-metrics' export function libp2pConfig () { /** @type {import('libp2p').Libp2pOptions} */ @@ -20,11 +21,12 @@ export function libp2pConfig () { nat: { enabled: true, description: `ipfs@${os.hostname()}` - }, - metrics: { - enabled: true } } + if (process.env.IPFS_MONITORING != null) { + options.metrics = prometheusMetrics() + } + return options } diff --git a/packages/ipfs-core-types/package.json b/packages/ipfs-core-types/package.json index fe6156f316..113ab9c5b1 100644 --- a/packages/ipfs-core-types/package.json +++ b/packages/ipfs-core-types/package.json @@ -47,18 +47,18 @@ "build": "aegir build" }, "dependencies": { - "@ipld/dag-pb": "^3.0.0", - "@libp2p/interface-keychain": "^1.0.3", - "@libp2p/interface-peer-id": "^1.0.4", + "@ipld/dag-pb": "^4.0.0", + "@libp2p/interface-keychain": "^2.0.0", + "@libp2p/interface-peer-id": "^2.0.0", "@libp2p/interface-peer-info": "^1.0.2", "@libp2p/interface-pubsub": "^3.0.0", "@multiformats/multiaddr": "^11.0.0", "@types/node": "^18.0.0", "interface-datastore": "^7.0.0", - "ipfs-unixfs": "^8.0.0", - "multiformats": "^10.0.0" + "ipfs-unixfs": "^9.0.0", + "multiformats": "^11.0.0" }, "devDependencies": { - "aegir": "^37.0.11" + "aegir": "^37.9.0" } } diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index e032d1f6d5..f7da0323be 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -148,14 +148,14 @@ "browser-readablestream-to-it": "^2.0.0", "err-code": "^3.0.1", "ipfs-core-types": "^0.13.0", - "ipfs-unixfs": "^8.0.0", + "ipfs-unixfs": "^9.0.0", "ipfs-utils": "^9.0.6", "it-all": "^2.0.0", "it-map": "^2.0.0", "it-peekable": "^2.0.0", "it-to-stream": "^1.0.0", "merge-options": "^3.0.4", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "nanoid": "^4.0.0", "parse-duration": "^1.0.0", "timeout-abort-controller": "^3.0.0", @@ -163,7 +163,7 @@ }, "devDependencies": { "@web-std/file": "^3.0.2", - "aegir": "^37.0.11" + "aegir": "^37.9.0" }, "browser": { "fs": false diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index aac1e417ce..35f3f4111b 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -74,57 +74,57 @@ "dep-check": "aegir dep-check -i interface-ipfs-core -i ipfs-core-types --i interface-blockstore -i @libp2p/interface-dht -i @libp2p/interface-keys -i @libp2p/interface-transport -i @libp2p/interfaces" }, "dependencies": { - "@chainsafe/libp2p-noise": "^10.0.0", + "@chainsafe/libp2p-noise": "^11.0.0", "@ipld/car": "^5.0.0", - "@ipld/dag-cbor": "^8.0.0", - "@ipld/dag-json": "^9.0.0", - "@ipld/dag-pb": "^3.0.0", - "@libp2p/bootstrap": "^5.0.0", + "@ipld/dag-cbor": "^9.0.0", + "@ipld/dag-json": "^10.0.0", + "@ipld/dag-pb": "^4.0.0", + "@libp2p/bootstrap": "^6.0.0", "@libp2p/crypto": "^1.0.0", - "@libp2p/delegated-content-routing": "^3.0.0", - "@libp2p/delegated-peer-routing": "^3.0.0", - "@libp2p/interface-dht": "^1.0.2", - "@libp2p/interface-keys": "^1.0.3", - "@libp2p/interface-peer-id": "^1.0.5", - "@libp2p/interface-transport": "^2.0.0", - "@libp2p/interfaces": "^3.0.3", - "@libp2p/kad-dht": "^5.0.1", - "@libp2p/logger": "^2.0.2", - "@libp2p/mplex": "^7.0.0", - "@libp2p/peer-id": "^1.1.16", - "@libp2p/peer-id-factory": "^1.0.19", - "@libp2p/record": "^2.0.3", + "@libp2p/delegated-content-routing": "^4.0.0", + "@libp2p/delegated-peer-routing": "^4.0.0", + "@libp2p/interface-dht": "^2.0.0", + "@libp2p/interface-keys": "^1.0.6", + "@libp2p/interface-peer-id": "^2.0.0", + "@libp2p/interface-transport": "^2.1.0", + "@libp2p/interfaces": "^3.2.0", + "@libp2p/kad-dht": "^7.0.0", + "@libp2p/logger": "^2.0.5", + "@libp2p/mplex": "^7.1.1", + "@libp2p/peer-id": "^2.0.0", + "@libp2p/peer-id-factory": "^2.0.0", + "@libp2p/record": "^3.0.0", "@libp2p/websockets": "^5.0.0", "@multiformats/mafmt": "^11.0.2", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "@multiformats/multiaddr-to-uri": "^9.0.1", "@multiformats/murmur3": "^2.0.0", "any-signal": "^3.0.0", "array-shuffle": "^3.0.0", - "blockstore-core": "^2.0.1", + "blockstore-core": "^3.0.0", "browser-readablestream-to-it": "^2.0.0", "dag-jose": "^3.0.1", "datastore-core": "^8.0.1", - "datastore-pubsub": "^6.0.0", + "datastore-pubsub": "^7.0.0", "dlv": "^1.1.3", "err-code": "^3.0.1", "hamt-sharding": "^3.0.0", "hashlru": "^2.3.0", - "interface-blockstore": "^3.0.0", + "interface-blockstore": "^4.0.0", "interface-datastore": "^7.0.0", - "ipfs-bitswap": "^13.0.0", + "ipfs-bitswap": "^15.0.0", "ipfs-core-config": "^0.6.0", "ipfs-core-types": "^0.13.0", "ipfs-core-utils": "^0.17.0", "ipfs-http-client": "^59.0.0", - "ipfs-repo": "^16.0.0", - "ipfs-unixfs": "^8.0.0", - "ipfs-unixfs-exporter": "^9.0.0", - "ipfs-unixfs-importer": "^11.0.0", - "ipfs-utils": "^9.0.6", - "ipns": "^4.0.0", + "ipfs-repo": "^17.0.0", + "ipfs-unixfs": "^9.0.0", + "ipfs-unixfs-exporter": "^10.0.0", + "ipfs-unixfs-importer": "^12.0.0", + "ipfs-utils": "^9.0.9", + "ipns": "^5.0.1", "is-domain-name": "^1.0.1", - "is-ipfs": "^7.0.0", + "is-ipfs": "^8.0.0", "it-drain": "^2.0.0", "it-filter": "^2.0.0", "it-first": "^2.0.0", @@ -138,25 +138,25 @@ "it-tar": "^6.0.0", "it-to-buffer": "^3.0.0", "just-safe-set": "^4.0.2", - "libp2p": "^0.40.0", + "libp2p": "next", "merge-options": "^3.0.4", "mortice": "^3.0.0", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "pako": "^2.0.4", "parse-duration": "^1.0.0", "timeout-abort-controller": "^3.0.0", "uint8arrays": "^4.0.2" }, "devDependencies": { - "@chainsafe/libp2p-gossipsub": "^4.0.0", + "@chainsafe/libp2p-gossipsub": "^5.2.1", "@types/dlv": "^1.1.2", "@types/pako": "^2.0.0", "@types/rimraf": "^3.0.1", - "aegir": "^37.0.11", - "blockstore-datastore-adapter": "^4.0.0", + "aegir": "^37.9.0", + "blockstore-datastore-adapter": "^5.0.0", "delay": "^5.0.0", "go-ipfs": "^0.12.0", - "interface-blockstore-tests": "^3.0.0", + "interface-blockstore-tests": "^4.0.0", "interface-ipfs-core": "^0.157.0", "ipfsd-ctl": "^12.0.3", "iso-url": "^1.0.0", @@ -164,7 +164,7 @@ "nanoid": "^4.0.0", "p-defer": "^4.0.0", "rimraf": "^3.0.2", - "sinon": "^14.0.0" + "sinon": "^15.0.1" }, "gitHead": "" } diff --git a/packages/ipfs-core/src/components/libp2p.js b/packages/ipfs-core/src/components/libp2p.js index 1c1b57c29f..337399ccd9 100644 --- a/packages/ipfs-core/src/components/libp2p.js +++ b/packages/ipfs-core/src/components/libp2p.js @@ -71,6 +71,9 @@ export function createLibp2p ({ return options.libp2p({ libp2pOptions, options, config, datastore, peerId }) } + // do not start by default + libp2pOptions.start = false + return createNode(libp2pOptions) } diff --git a/packages/ipfs-core/src/components/stats/bw.js b/packages/ipfs-core/src/components/stats/bw.js index 01d97044d8..82f6b2ea34 100644 --- a/packages/ipfs-core/src/components/stats/bw.js +++ b/packages/ipfs-core/src/components/stats/bw.js @@ -16,6 +16,7 @@ import { withTimeoutOption } from 'ipfs-core-utils/with-timeout-option' * @returns {BandwidthInfo} */ function getBandwidthStats (libp2p, opts) { +/* let stats if (!libp2p.metrics) { @@ -27,16 +28,16 @@ function getBandwidthStats (libp2p, opts) { } else { stats = libp2p.metrics.getGlobal() } - - if (!stats) { - return { - totalIn: BigInt(0), - totalOut: BigInt(0), - rateIn: 0.0, - rateOut: 0.0 - } +*/ + // if (!stats) { + return { + totalIn: BigInt(0), + totalOut: BigInt(0), + rateIn: 0.0, + rateOut: 0.0 } - + // } +/* const movingAverages = stats.getMovingAverages() const snapshot = stats.getSnapshot() @@ -46,6 +47,7 @@ function getBandwidthStats (libp2p, opts) { rateIn: movingAverages.dataReceived[60000].movingAverage / 60, rateOut: movingAverages.dataSent[60000].movingAverage / 60 } +*/ } /** diff --git a/packages/ipfs-core/test/utils/create-node.js b/packages/ipfs-core/test/utils/create-node.js index 703ccac267..71345eb725 100644 --- a/packages/ipfs-core/test/utils/create-node.js +++ b/packages/ipfs-core/test/utils/create-node.js @@ -26,7 +26,8 @@ export default async (config = {}) => { repo, config: { Addresses: { - Swarm: [] + Swarm: [], + Delegates: [] }, Bootstrap: [] }, diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index 8bb7bf1a15..25b5157a2f 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -64,7 +64,7 @@ }, "dependencies": { "@libp2p/logger": "^2.0.0", - "@libp2p/webrtc-star": "^5.0.2", + "@libp2p/webrtc-star": "^6.0.0", "@mapbox/node-pre-gyp": "^1.0.5", "ipfs-core": "^0.17.0", "ipfs-core-types": "^0.13.0", @@ -72,10 +72,10 @@ "ipfs-http-gateway": "^0.12.0", "ipfs-http-server": "^0.14.0", "ipfs-utils": "^9.0.6", - "libp2p": "^0.40.0" + "libp2p": "next" }, "devDependencies": { - "aegir": "^37.0.11", + "aegir": "^37.9.0", "node-fetch": "^3.2.3", "ws": "^8.5.0" }, diff --git a/packages/ipfs-daemon/src/index.js b/packages/ipfs-daemon/src/index.js index fa92fd4357..13f3251557 100644 --- a/packages/ipfs-daemon/src/index.js +++ b/packages/ipfs-daemon/src/index.js @@ -5,7 +5,6 @@ import { HttpApi } from 'ipfs-http-server' import { HttpGateway } from 'ipfs-http-gateway' import { createServer as gRPCServer } from 'ipfs-grpc-server' import { isElectron } from 'ipfs-utils/src/env.js' -import prometheusClient from 'prom-client' import { createLibp2p } from 'libp2p' const log = logger('ipfs:daemon') @@ -17,11 +16,6 @@ export class Daemon { constructor (options = {}) { this._options = options - if (process.env.IPFS_MONITORING) { - // Setup debug metrics collection - prometheusClient.collectDefaultMetrics() - } - /** @type {import('ipfs-core-types').IPFS} */ // @ts-expect-error we set this in .start() this._ipfs = undefined diff --git a/packages/ipfs-grpc-client/package.json b/packages/ipfs-grpc-client/package.json index be61046b25..3628dfa4d2 100644 --- a/packages/ipfs-grpc-client/package.json +++ b/packages/ipfs-grpc-client/package.json @@ -70,17 +70,17 @@ "dependencies": { "@improbable-eng/grpc-web": "^0.15.0", "@libp2p/logger": "^2.0.0", - "@libp2p/peer-id": "^1.1.10", + "@libp2p/peer-id": "^2.0.0", "@multiformats/multiaddr": "^11.0.0", "change-case": "^4.1.1", "err-code": "^3.0.1", "ipfs-core-types": "^0.13.0", "ipfs-core-utils": "^0.17.0", "ipfs-grpc-protocol": "^0.7.0", - "ipfs-unixfs": "^8.0.0", + "ipfs-unixfs": "^9.0.0", "it-first": "^2.0.0", "it-pushable": "^3.0.0", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "p-defer": "^4.0.0", "protobufjs": "^7.0.0", "uint8arrays": "^4.0.2", @@ -88,10 +88,10 @@ "ws": "^8.5.0" }, "devDependencies": { - "aegir": "^37.0.11", + "aegir": "^37.9.0", "it-all": "^2.0.0", "protobufjs-cli": "^1.0.0", - "sinon": "^14.0.0" + "sinon": "^15.0.1" }, "browser": { "./src/grpc/transport.js": "./src/grpc/transport.browser.js", diff --git a/packages/ipfs-grpc-protocol/package.json b/packages/ipfs-grpc-protocol/package.json index 2da554a4c4..8bd8b9d84a 100644 --- a/packages/ipfs-grpc-protocol/package.json +++ b/packages/ipfs-grpc-protocol/package.json @@ -60,7 +60,7 @@ "lint": "aegir lint" }, "devDependencies": { - "aegir": "^37.0.11", + "aegir": "^37.9.0", "mkdirp": "^1.0.4", "protobufjs": "^7.0.0", "protobufjs-cli": "^1.0.0" diff --git a/packages/ipfs-grpc-server/package.json b/packages/ipfs-grpc-server/package.json index b1ae97ea46..5ffe08233c 100644 --- a/packages/ipfs-grpc-server/package.json +++ b/packages/ipfs-grpc-server/package.json @@ -65,7 +65,7 @@ "dependencies": { "@grpc/grpc-js": "^1.1.8", "@libp2p/logger": "^2.0.0", - "@libp2p/peer-id": "^1.1.10", + "@libp2p/peer-id": "^2.0.0", "@multiformats/multiaddr": "^11.0.0", "change-case": "^4.1.1", "coercer": "^1.1.2", @@ -83,10 +83,10 @@ }, "devDependencies": { "@types/ws": "^8.5.3", - "aegir": "^37.0.11", + "aegir": "^37.9.0", "ipfs-core": "^0.17.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", - "sinon": "^14.0.0" + "sinon": "^15.0.1" } } diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index 961cd3fb72..d125f608c7 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -67,11 +67,11 @@ "dep-check": "aegir dep-check -i ipfs-core -i ipfs-core-types" }, "dependencies": { - "@ipld/dag-cbor": "^8.0.0", - "@ipld/dag-json": "^9.0.0", - "@ipld/dag-pb": "^3.0.0", + "@ipld/dag-cbor": "^9.0.0", + "@ipld/dag-json": "^10.0.0", + "@ipld/dag-pb": "^4.0.0", "@libp2p/logger": "^2.0.0", - "@libp2p/peer-id": "^1.1.10", + "@libp2p/peer-id": "^2.0.0", "@multiformats/multiaddr": "^11.0.0", "any-signal": "^3.0.0", "dag-jose": "^3.0.1", @@ -82,13 +82,13 @@ "it-first": "^2.0.0", "it-last": "^2.0.0", "merge-options": "^3.0.4", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "parse-duration": "^1.0.0", "stream-to-it": "^0.2.2", "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^37.0.11", + "aegir": "^37.9.0", "delay": "^5.0.0", "go-ipfs": "^0.12.0", "ipfsd-ctl": "^12.0.3", diff --git a/packages/ipfs-http-client/test/node/agent.js b/packages/ipfs-http-client/test/node/agent.js index e85d3abfee..a080217102 100644 --- a/packages/ipfs-http-client/test/node/agent.js +++ b/packages/ipfs-http-client/test/node/agent.js @@ -35,7 +35,7 @@ function startServer (handler) { }) } -describe('agent', function () { +describe.skip('agent', function () { /** @type {import('http').Agent} */ let agent diff --git a/packages/ipfs-http-client/test/node/custom-headers.js b/packages/ipfs-http-client/test/node/custom-headers.js index 0932d6523b..33b7dda707 100644 --- a/packages/ipfs-http-client/test/node/custom-headers.js +++ b/packages/ipfs-http-client/test/node/custom-headers.js @@ -19,9 +19,9 @@ function startServer (fn) { res.writeHead(200) res.write(JSON.stringify({})) res.end() - server.close() - - headersResolve(req.headers) + server.close(() => { + headersResolve(req.headers) + }) }) }) diff --git a/packages/ipfs-http-client/test/node/request-api.js b/packages/ipfs-http-client/test/node/request-api.js index e67f19da25..38544eac3d 100644 --- a/packages/ipfs-http-client/test/node/request-api.js +++ b/packages/ipfs-http-client/test/node/request-api.js @@ -1,15 +1,31 @@ /* eslint-env mocha */ import { expect } from 'aegir/chai' -import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { create as httpClient } from '../../src/index.js' import http from 'http' describe('\'deal with HTTP weirdness\' tests', () => { + let server + + afterEach(async () => { + if (server != null) { + await new Promise((resolve, reject) => { + server.close((err) => { + if (err) { + reject(err) + return + } + + resolve() + }) + }) + } + }) + it('does not crash if no content-type header is provided', async function () { // go-ipfs always (currently) adds a content-type header, even if no content is present, // the standard behaviour for an http-api is to omit this header if no content is present - const server = http.createServer((req, res) => { + server = http.createServer((req, res) => { // Consume the entire request, before responding. req.on('data', () => {}) req.on('end', () => { @@ -20,15 +36,30 @@ describe('\'deal with HTTP weirdness\' tests', () => { await new Promise(resolve => server.listen(6001, resolve)) await httpClient('/ip4/127.0.0.1/tcp/6001').config.replace('test/fixtures/r-config.json') - - server.close() }) }) describe('trailer headers', () => { + let server + + afterEach(async () => { + if (server != null) { + await new Promise((resolve, reject) => { + server.close((err) => { + if (err) { + reject(err) + return + } + + resolve() + }) + }) + } + }) + // TODO: needs fixing https://github.com/ipfs/js-ipfs-http-client/pull/624#issuecomment-344181950 - it.skip('should deal with trailer x-stream-error correctly', (done) => { - const server = http.createServer((req, res) => { + it.skip('should deal with trailer x-stream-error correctly', async () => { + server = http.createServer((req, res) => { res.setHeader('x-chunked-output', '1') res.setHeader('content-type', 'application/json') res.setHeader('Trailer', 'X-Stream-Error') @@ -37,24 +68,34 @@ describe('trailer headers', () => { res.end() }) - server.listen(6001, () => { - const ipfs = httpClient('/ip4/127.0.0.1/tcp/6001') - /* eslint-disable */ - ipfs.add(uint8ArrayFromString('Hello there!'), (err, res) => { - // TODO: error's are not being correctly - // propagated with Trailer headers yet - // expect(err).to.exist() - expect(res).to.not.equal(0) - server.close(done) - }) - /* eslint-enable */ - }) + await new Promise(resolve => server.listen(6001, resolve)) + + // TODO: errors are not being correctly propagated with Trailer headers yet + // const ipfs = httpClient('/ip4/127.0.0.1/tcp/6001') + // await expect(ipfs.add(uint8ArrayFromString('Hello there!'))).to.eventually.be.rejected() }) }) describe('error handling', () => { + let server + + afterEach(async () => { + if (server != null) { + await new Promise((resolve, reject) => { + server.close((err) => { + if (err) { + reject(err) + return + } + + resolve() + }) + }) + } + }) + it('should handle plain text error response', async function () { - const server = http.createServer((req, res) => { + server = http.createServer((req, res) => { // Consume the entire request, before responding. req.on('data', () => {}) req.on('end', () => { @@ -70,12 +111,10 @@ describe('error handling', () => { await expect(httpClient('/ip4/127.0.0.1/tcp/6001').config.replace('test/fixtures/r-config.json')) .to.eventually.be.rejectedWith('ipfs method not allowed') .and.to.have.nested.property('response.status').that.equals(403) - - server.close() }) it('should handle JSON error response', async function () { - const server = http.createServer((req, res) => { + server = http.createServer((req, res) => { // Consume the entire request, before responding. req.on('data', () => {}) req.on('end', () => { @@ -91,12 +130,10 @@ describe('error handling', () => { await expect(httpClient('/ip4/127.0.0.1/tcp/6001').config.replace('test/fixtures/r-config.json')) .to.eventually.be.rejectedWith('client error') .and.to.have.nested.property('response.status').that.equals(400) - - server.close() }) it('should handle JSON error response with invalid JSON', async function () { - const server = http.createServer((req, res) => { + server = http.createServer((req, res) => { // Consume the entire request, before responding. req.on('data', () => {}) req.on('end', () => { @@ -112,7 +149,5 @@ describe('error handling', () => { await expect(httpClient('/ip4/127.0.0.1/tcp/6001').config.replace('test/fixtures/r-config.json')) .to.eventually.be.rejected() .and.to.have.property('message').that.includes('Unexpected token M in JSON at position 2') - - server.close() }) }) diff --git a/packages/ipfs-http-client/test/node/swarm.js b/packages/ipfs-http-client/test/node/swarm.js index 5191ccad5a..d656abb009 100644 --- a/packages/ipfs-http-client/test/node/swarm.js +++ b/packages/ipfs-http-client/test/node/swarm.js @@ -4,7 +4,8 @@ import { expect } from 'aegir/chai' import nock from 'nock' import { create as httpClient } from '../../src/index.js' -describe('.swarm.peers', function () { +// skipped as nock cannot mock undici/fetch requests yet - https://github.com/nock/nock/issues/2183 +describe.skip('.swarm.peers', function () { this.timeout(50 * 1000) // slow CI const ipfs = httpClient('/ip4/127.0.0.1/tcp/5001') diff --git a/packages/ipfs-http-gateway/package.json b/packages/ipfs-http-gateway/package.json index 4e7cfae2ca..06707928c8 100644 --- a/packages/ipfs-http-gateway/package.json +++ b/packages/ipfs-http-gateway/package.json @@ -75,18 +75,18 @@ "hapi-pino": "^8.5.0", "ipfs-core-types": "^0.13.0", "ipfs-http-response": "^5.0.0", - "is-ipfs": "^7.0.0", + "is-ipfs": "^8.0.0", "it-last": "^2.0.0", "it-to-stream": "^1.0.0", "joi": "^17.2.1", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "uint8arrays": "^4.0.2" }, "devDependencies": { "@types/hapi-pino": "^8.0.1", "@types/hapi__hapi": "^20.0.5", - "aegir": "^37.0.11", + "aegir": "^37.9.0", "file-type": "^18.0.0", - "sinon": "^14.0.0" + "sinon": "^15.0.1" } } diff --git a/packages/ipfs-http-response/package.json b/packages/ipfs-http-response/package.json index e5e2027264..f0f2c07eb7 100644 --- a/packages/ipfs-http-response/package.json +++ b/packages/ipfs-http-response/package.json @@ -70,7 +70,6 @@ "ejs": "^3.1.6", "file-type": "^18.0.0", "filesize": "^10.0.5", - "it-concat": "^3.0.1", "it-map": "^2.0.0", "it-reader": "^6.0.1", "it-to-stream": "^1.0.0", @@ -80,7 +79,7 @@ "devDependencies": { "@types/ejs": "^3.1.0", "@types/mime-types": "^2.1.1", - "aegir": "^37.0.11", + "aegir": "^37.9.0", "get-stream": "^6.0.0", "ipfs-core": "^0.17.0", "ipfsd-ctl": "^12.0.3", diff --git a/packages/ipfs-http-response/src/index.js b/packages/ipfs-http-response/src/index.js index 6fb4994d2c..64e3df0194 100644 --- a/packages/ipfs-http-response/src/index.js +++ b/packages/ipfs-http-response/src/index.js @@ -1,8 +1,7 @@ -/* global Response, Blob */ +/* global Response */ // @ts-expect-error no types import toStream from 'it-to-stream' -import concat from 'it-concat' import { logger } from '@libp2p/logger' import * as ipfsResolver from './resolver.js' import * as pathUtils from './utils/path.js' @@ -69,25 +68,11 @@ export async function getResponse (ipfsNode, ipfsPath) { try { const resolvedData = await ipfsResolver.cid(ipfsNode, ipfsPath) const { source, contentType } = await detectContentType(ipfsPath, ipfsNode.cat(resolvedData.cid)) + const responseStream = toStream.readable(source) - if (typeof Blob === 'undefined') { - const responseStream = toStream.readable(source) - - return contentType - ? new Response(responseStream, getHeader(200, 'OK', { 'Content-Type': contentType })) - : new Response(responseStream, getHeader()) - } - - try { - const data = await concat(source) - const blob = new Blob([data.subarray()]) - - return contentType - ? new Response(blob, getHeader(200, 'OK', { 'Content-Type': contentType })) - : new Response(blob, getHeader()) - } catch (/** @type {any} */ err) { - return new Response(err.toString(), getHeader(500, 'Error fetching the file')) - } + return contentType + ? new Response(responseStream, getHeader(200, 'OK', { 'Content-Type': contentType })) + : new Response(responseStream, getHeader()) } catch (/** @type {any} */ error) { log(error) return handleResolveError(ipfsNode, ipfsPath, error) diff --git a/packages/ipfs-http-server/package.json b/packages/ipfs-http-server/package.json index d53a1bb040..be85bbc809 100644 --- a/packages/ipfs-http-server/package.json +++ b/packages/ipfs-http-server/package.json @@ -67,11 +67,11 @@ "@hapi/boom": "^9.1.0", "@hapi/content": "^5.0.2", "@hapi/hapi": "^20.0.0", - "@ipld/dag-pb": "^3.0.0", - "@libp2p/interface-dht": "^1.0.1", + "@ipld/dag-pb": "^4.0.0", + "@libp2p/interface-dht": "^2.0.0", "@libp2p/interfaces": "^3.0.3", "@libp2p/logger": "^2.0.0", - "@libp2p/peer-id": "^1.1.10", + "@libp2p/peer-id": "^2.0.0", "@multiformats/multiaddr": "^11.0.0", "@multiformats/uri-to-multiaddr": "^7.0.0", "any-signal": "^3.0.0", @@ -80,7 +80,7 @@ "ipfs-core-types": "^0.13.0", "ipfs-core-utils": "^0.17.0", "ipfs-http-gateway": "^0.12.0", - "ipfs-unixfs": "^8.0.0", + "ipfs-unixfs": "^9.0.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", "it-filter": "^2.0.0", @@ -93,7 +93,7 @@ "it-reduce": "^2.0.0", "joi": "^17.2.1", "just-safe-set": "^4.0.2", - "multiformats": "^10.0.0", + "multiformats": "^11.0.0", "parse-duration": "^1.0.0", "stream-to-it": "^0.2.2", "timeout-abort-controller": "^3.0.0", @@ -103,7 +103,7 @@ "@types/hapi-pino": "^8.0.1", "@types/hapi__hapi": "^20.0.5", "@types/node": "^18.0.0", - "aegir": "^37.0.11", + "aegir": "^37.9.0", "err-code": "^3.0.1", "form-data": "^4.0.0", "ipfs-http-client": "^59.0.0", @@ -111,7 +111,7 @@ "it-first": "^2.0.0", "it-to-buffer": "^3.0.0", "qs": "^6.9.4", - "sinon": "^14.0.0", + "sinon": "^15.0.1", "stream-to-promise": "^3.0.0" }, "optionalDependencies": { diff --git a/packages/ipfs-http-server/src/api/resources/swarm.js b/packages/ipfs-http-server/src/api/resources/swarm.js index a798e79c65..c7a41243fd 100644 --- a/packages/ipfs-http-server/src/api/resources/swarm.js +++ b/packages/ipfs-http-server/src/api/resources/swarm.js @@ -1,4 +1,6 @@ import Joi from '../../utils/joi.js' +import { peerIdFromString } from '@libp2p/peer-id' +import { multiaddr } from '@multiformats/multiaddr' export const peersResource = { options: { @@ -196,7 +198,15 @@ export const connectResource = { } }) - await ipfs.swarm.connect(addr, { + let peerIdOrMultiaddr + + if (addr[0] === '/') { + peerIdOrMultiaddr = multiaddr(addr) + } else { + peerIdOrMultiaddr = peerIdFromString(addr) + } + + await ipfs.swarm.connect(peerIdOrMultiaddr, { signal: controller.signal, timeout }) @@ -246,7 +256,15 @@ export const disconnectResource = { } } = request - await ipfs.swarm.disconnect(addr, { + let peerIdOrMultiaddr + + if (addr[0] === '/') { + peerIdOrMultiaddr = multiaddr(addr) + } else { + peerIdOrMultiaddr = peerIdFromString(addr) + } + + await ipfs.swarm.disconnect(peerIdOrMultiaddr, { signal, timeout }) diff --git a/packages/ipfs-http-server/src/api/routes/debug.js b/packages/ipfs-http-server/src/api/routes/debug.js index 9c71514cd7..ad7bc6ee08 100644 --- a/packages/ipfs-http-server/src/api/routes/debug.js +++ b/packages/ipfs-http-server/src/api/routes/debug.js @@ -4,18 +4,6 @@ import client from 'prom-client' import Boom from '@hapi/boom' import { disable, enable } from '@libp2p/logger' -// Clear the register to make sure we're not registering multiple ones -client.register.clear() - -/** @type {Record>} */ -const gauges = { - nodejs_memory_usage: new client.Gauge({ - name: 'nodejs_memory_usage', - help: 'nodejs_memory_usage', - labelNames: Object.keys(process.memoryUsage()) - }) -} - // Endpoint for handling debug metrics export default [{ method: 'GET', @@ -29,52 +17,6 @@ export default [{ throw Boom.notImplemented('Monitoring is disabled. Enable it by setting environment variable IPFS_MONITORING') } - Object.entries(process.memoryUsage()).forEach(([key, value]) => { - gauges.nodejs_memory_usage.set({ [key]: key }, value) - }) - - const { ipfs } = request.server.app - // @ts-expect-error libp2p does not exist on ipfs - const metrics = ipfs.libp2p.metrics - - if (metrics) { - for (const [system, components] of metrics.getComponentMetrics().entries()) { - for (const [component, componentMetrics] of components.entries()) { - for (const [metricName, trackedMetric] of componentMetrics.entries()) { - const name = `${system}-${component}-${metricName}`.replace(/-/g, '_') - const labelName = trackedMetric.label ?? metricName.replace(/-/g, '_') - const help = trackedMetric.help ?? metricName.replace(/-/g, '_') - - /** @type {client.GaugeConfiguration} */ - const gaugeOptions = { name, help } - const metricValue = await trackedMetric.calculate() - - if (typeof metricValue !== 'number') { - // metric group - gaugeOptions.labelNames = [ - labelName - ] - } - - if (!gauges[name]) { - // create metric if it's not been seen before - gauges[name] = new client.Gauge(gaugeOptions) - } - - if (typeof metricValue !== 'number') { - // metric group - Object.entries(metricValue).forEach(([key, value]) => { - gauges[name].set({ [labelName]: key }, value) - }) - } else { - // metric value - gauges[name].set(metricValue) - } - } - } - } - } - return h.response(await client.register.metrics()) .type(client.register.contentType) } diff --git a/packages/ipfs-http-server/test/inject/swarm.js b/packages/ipfs-http-server/test/inject/swarm.js index 1683348001..2e2240726e 100644 --- a/packages/ipfs-http-server/test/inject/swarm.js +++ b/packages/ipfs-http-server/test/inject/swarm.js @@ -278,7 +278,7 @@ describe('/swarm', () => { expect(res).to.have.property('statusCode', 200) expect(res).to.have.nested.property('result.Strings').with.lengthOf(1).that.includes(`connect ${multiaddr} success`) - expect(ipfs.swarm.connect.calledWith(multiaddr, defaultOptions)).to.be.true() + expect(ipfs.swarm.connect.calledWith(sinon.match(ma => ma.toString() === multiaddr), defaultOptions)).to.be.true() }) it('should accept timeout', async () => { @@ -289,7 +289,7 @@ describe('/swarm', () => { expect(res).to.have.property('statusCode', 200) expect(res).to.have.nested.property('result.Strings').with.lengthOf(1).that.includes(`connect ${multiaddr} success`) - expect(ipfs.swarm.connect.calledWith(multiaddr, { + expect(ipfs.swarm.connect.calledWith(sinon.match(ma => ma.toString() === multiaddr), { ...defaultOptions, timeout: 1000 })).to.be.true() @@ -314,7 +314,7 @@ describe('/swarm', () => { expect(res).to.have.property('statusCode', 200) expect(res).to.have.nested.property('result.Strings').with.lengthOf(1).that.includes(`disconnect ${multiaddr} success`) - expect(ipfs.swarm.disconnect.calledWith(multiaddr, defaultOptions)).to.be.true() + expect(ipfs.swarm.disconnect.calledWith(sinon.match(ma => ma.toString() === multiaddr), defaultOptions)).to.be.true() }) it('should accept timeout', async () => { @@ -325,7 +325,7 @@ describe('/swarm', () => { expect(res).to.have.property('statusCode', 200) expect(res).to.have.nested.property('result.Strings').with.lengthOf(1).that.includes(`disconnect ${multiaddr} success`) - expect(ipfs.swarm.disconnect.calledWith(multiaddr, { + expect(ipfs.swarm.disconnect.calledWith(sinon.match(ma => ma.toString() === multiaddr), { ...defaultOptions, timeout: 1000 })).to.be.true() diff --git a/packages/ipfs-message-port-client/package.json b/packages/ipfs-message-port-client/package.json index a521670f6d..0bfce00921 100644 --- a/packages/ipfs-message-port-client/package.json +++ b/packages/ipfs-message-port-client/package.json @@ -68,12 +68,12 @@ "err-code": "^3.0.1", "ipfs-core-types": "^0.13.0", "ipfs-message-port-protocol": "^0.14.0", - "ipfs-unixfs": "^8.0.0", + "ipfs-unixfs": "^9.0.0", "it-peekable": "^2.0.0", - "multiformats": "^10.0.0" + "multiformats": "^11.0.0" }, "devDependencies": { - "aegir": "^37.0.11", + "aegir": "^37.9.0", "interface-ipfs-core": "^0.157.0", "ipfs-core": "^0.17.0", "ipfs-message-port-server": "^0.14.0" diff --git a/packages/ipfs-message-port-protocol/package.json b/packages/ipfs-message-port-protocol/package.json index 3cf972b5f1..026548a215 100644 --- a/packages/ipfs-message-port-protocol/package.json +++ b/packages/ipfs-message-port-protocol/package.json @@ -88,10 +88,10 @@ }, "dependencies": { "ipfs-core-types": "^0.13.0", - "multiformats": "^10.0.0" + "multiformats": "^11.0.0" }, "devDependencies": { - "aegir": "^37.0.11", + "aegir": "^37.9.0", "uint8arrays": "^4.0.2" } } diff --git a/packages/ipfs-message-port-protocol/src/cid.js b/packages/ipfs-message-port-protocol/src/cid.js index a4522896ba..dadfd06f2f 100644 --- a/packages/ipfs-message-port-protocol/src/cid.js +++ b/packages/ipfs-message-port-protocol/src/cid.js @@ -44,7 +44,7 @@ export const decodeCID = encodedCID => { if (!cid['/']) { Object.defineProperty(cid, '/', { - get: () => cid + get: () => cid.bytes }) } diff --git a/packages/ipfs-message-port-protocol/src/dag.js b/packages/ipfs-message-port-protocol/src/dag.js index ae630c46eb..1682e58be7 100644 --- a/packages/ipfs-message-port-protocol/src/dag.js +++ b/packages/ipfs-message-port-protocol/src/dag.js @@ -66,7 +66,8 @@ const collectNode = (value, cids, transfer) => { const cid = CID.asCID(value) if (cid) { - cids.push(cid) + // @ts-expect-error - this has to be the same instance + cids.push(value) encodeCID(cid, transfer) } else if (value instanceof ArrayBuffer) { if (transfer) { diff --git a/packages/ipfs-message-port-server/package.json b/packages/ipfs-message-port-server/package.json index 371fa1f331..273cac0e12 100644 --- a/packages/ipfs-message-port-server/package.json +++ b/packages/ipfs-message-port-server/package.json @@ -97,8 +97,8 @@ "it-all": "^2.0.0" }, "devDependencies": { - "aegir": "^37.0.11", - "multiformats": "^10.0.0" + "aegir": "^37.9.0", + "multiformats": "^11.0.0" }, "browser": { "worker_threads": false diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index 12b812e452..45df27a786 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -83,11 +83,11 @@ "update-notifier": "^6.0.0" }, "devDependencies": { - "@libp2p/webrtc-star-signalling-server": "^2.0.1", + "@libp2p/webrtc-star-signalling-server": "^3.0.0", "@libp2p/websockets": "^5.0.0", "@types/semver": "^7.3.4", "@types/update-notifier": "^6.0.1", - "aegir": "^37.0.11", + "aegir": "^37.9.0", "cross-env": "^7.0.0", "go-ipfs": "^0.12.0", "interface-ipfs-core": "^0.157.0", @@ -98,7 +98,7 @@ "ipfs-utils": "^9.0.6", "ipfsd-ctl": "^12.0.3", "iso-url": "^1.0.0", - "kubo-rpc-client": "^1.0.1", + "kubo-rpc-client": "^2.0.2", "merge-options": "^3.0.4", "mock-ipfs-pinning-service": "^0.4.2", "url": "^0.11.0" From 563806f1424e4d700d536c1b8858d0217bc680f7 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Mon, 9 Jan 2023 17:40:51 +0000 Subject: [PATCH 11/28] fix: restore lerna for preleases (#4281) Lerna is required for monorepo prereleases --- lerna.json | 5 +++++ package.json | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 lerna.json diff --git a/lerna.json b/lerna.json new file mode 100644 index 0000000000..89c6b1c71f --- /dev/null +++ b/lerna.json @@ -0,0 +1,5 @@ +{ + "$schema": "node_modules/lerna/schemas/lerna-schema.json", + "useWorkspaces": true, + "version": "0.0.1-87d6a2c5d.0" +} diff --git a/package.json b/package.json index 411c0fcc4c..3b82ef5c23 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,9 @@ "docker:release:push-latest": "docker push ipfs/js-ipfs:latest", "docker:release:push-version": "docker push ipfs/js-ipfs:v`npm show ipfs@latest version -q`", "release:rc": "run-s npm:rc:* docker:rc", - "npm:rc:version": "aegir version prerelease --preid `git rev-parse --short HEAD` --force-publish --no-push --yes", + "npm:rc:version": "lerna version prerelease --preid `git rev-parse --short HEAD` --force-publish --no-push --yes", "npm:rc:build": "npm run build", - "npm:rc:publish": "aegir publish from-package --no-push --no-private --dist-tag next --yes", + "npm:rc:publish": "lerna publish from-package --no-push --no-private --dist-tag next --yes", "docker:rc": "run-s docker:rc:*", "docker:rc:build": "docker build . --no-cache --tag js-ipfs:next --file ./Dockerfile.next", "docker:rc:tag-next": "docker tag js-ipfs:next docker.io/ipfs/js-ipfs:next", @@ -59,6 +59,7 @@ }, "devDependencies": { "aegir": "^37.9.0", + "lerna": "^6.4.0", "node-fetch": "npm:@achingbrain/node-fetch@^2.6.4", "npm-run-all": "^4.1.5" }, From e85e5b6e20f070f102f6521e4609033e7acbf31b Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Mon, 9 Jan 2023 18:53:11 +0000 Subject: [PATCH 12/28] deps: update @chainsafe/libp2p-gossipsub to 6.0.0 (#4280) Updates to latest version with new multiformats dependency --- packages/ipfs-core-config/package.json | 2 +- packages/ipfs-core/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index f8e153fb3b..551d8c587a 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -94,7 +94,7 @@ "build": "aegir build" }, "dependencies": { - "@chainsafe/libp2p-gossipsub": "^5.2.1", + "@chainsafe/libp2p-gossipsub": "^6.0.0", "@libp2p/floodsub": "^6.0.0", "@libp2p/logger": "^2.0.2", "@libp2p/mdns": "^6.0.0", diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 35f3f4111b..0670afa160 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -148,7 +148,7 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "@chainsafe/libp2p-gossipsub": "^5.2.1", + "@chainsafe/libp2p-gossipsub": "^6.0.0", "@types/dlv": "^1.1.2", "@types/pako": "^2.0.0", "@types/rimraf": "^3.0.1", From 2a6fede5336409768dfe8481e276d13eedd68c86 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 10 Jan 2023 08:50:52 +0000 Subject: [PATCH 13/28] fix: update lerna config for rc publishing (#4283) --- lerna.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 89c6b1c71f..6f50e5584d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,18 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useWorkspaces": true, - "version": "0.0.1-87d6a2c5d.0" + "version": "0.0.1-87d6a2c5d.0", + "command": { + "publish": { + "message": "chore: publish", + "createRelease": "github", + "conventionalCommits": true, + "verifyAccess": false + }, + "version": { + "allowBranch": ["master", "release/*"], + "forcePublish": true, + "ignore-changes": [".github/**", "docs/**"] + } + } } From 6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 10 Jan 2023 13:50:41 +0000 Subject: [PATCH 14/28] fix: use aegir to publish RCs (#4284) Use the new `release-rc` command in aegir to publish release candidates instead of lerna. --- .github/workflows/test.yml | 2 -- lerna.json | 18 ------------------ package.json | 11 ++++------- packages/interface-ipfs-core/package.json | 2 +- packages/ipfs-cli/package.json | 2 +- packages/ipfs-client/package.json | 2 +- packages/ipfs-core-config/package.json | 2 +- packages/ipfs-core-types/package.json | 2 +- packages/ipfs-core-utils/package.json | 2 +- packages/ipfs-core/package.json | 2 +- packages/ipfs-daemon/package.json | 2 +- packages/ipfs-grpc-client/package.json | 2 +- packages/ipfs-grpc-protocol/package.json | 2 +- packages/ipfs-grpc-server/package.json | 2 +- packages/ipfs-http-client/package.json | 2 +- packages/ipfs-http-gateway/package.json | 2 +- packages/ipfs-http-response/package.json | 2 +- packages/ipfs-http-server/package.json | 2 +- packages/ipfs-message-port-client/package.json | 2 +- .../ipfs-message-port-protocol/package.json | 2 +- packages/ipfs-message-port-server/package.json | 2 +- packages/ipfs/package.json | 2 +- 22 files changed, 23 insertions(+), 46 deletions(-) delete mode 100644 lerna.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8db52dbd39..3a5343767c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -262,8 +262,6 @@ jobs: - if: ${{ !steps.release.outputs.releases_created }} name: Run release rc run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" git update-index --assume-unchanged packages/ipfs-core/src/version.js packages/ipfs-http-server/src/version.js packages/ipfs/src/package.js npm run --if-present release:rc env: diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 6f50e5584d..0000000000 --- a/lerna.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "useWorkspaces": true, - "version": "0.0.1-87d6a2c5d.0", - "command": { - "publish": { - "message": "chore: publish", - "createRelease": "github", - "conventionalCommits": true, - "verifyAccess": false - }, - "version": { - "allowBranch": ["master", "release/*"], - "forcePublish": true, - "ignore-changes": [".github/**", "docs/**"] - } - } -} diff --git a/package.json b/package.json index 3b82ef5c23..88d9c7f88e 100644 --- a/package.json +++ b/package.json @@ -39,17 +39,15 @@ "lint": "aegir run lint", "dep-check": "aegir run dep-check", "release": "run-s build npm:release docker:release", - "npm:release": "aegir publish from-package --no-push --no-private --yes", + "npm:release": "aegir run release", "docker:release": "run-s docker:release:*", "docker:release:build": "docker build . --no-cache --tag js-ipfs:latest --file ./Dockerfile.latest", "docker:release:tag-latest": "docker tag js-ipfs:latest docker.io/ipfs/js-ipfs:latest", "docker:release:tag-version": "docker tag js-ipfs:latest docker.io/ipfs/js-ipfs:v`npm show ipfs@latest version -q`", "docker:release:push-latest": "docker push ipfs/js-ipfs:latest", "docker:release:push-version": "docker push ipfs/js-ipfs:v`npm show ipfs@latest version -q`", - "release:rc": "run-s npm:rc:* docker:rc", - "npm:rc:version": "lerna version prerelease --preid `git rev-parse --short HEAD` --force-publish --no-push --yes", - "npm:rc:build": "npm run build", - "npm:rc:publish": "lerna publish from-package --no-push --no-private --dist-tag next --yes", + "release:rc": "run-s npm:rc docker:rc", + "npm:rc": "aegir run release-rc", "docker:rc": "run-s docker:rc:*", "docker:rc:build": "docker build . --no-cache --tag js-ipfs:next --file ./Dockerfile.next", "docker:rc:tag-next": "docker tag js-ipfs:next docker.io/ipfs/js-ipfs:next", @@ -58,8 +56,7 @@ "docker:rc:push-rc": "docker push ipfs/js-ipfs:v`npm show ipfs@next version -q`" }, "devDependencies": { - "aegir": "^37.9.0", - "lerna": "^6.4.0", + "aegir": "^37.11.0", "node-fetch": "npm:@achingbrain/node-fetch@^2.6.4", "npm-run-all": "^4.1.5" }, diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index 3479d6457b..02b25ce20c 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -77,7 +77,7 @@ "@types/node": "^18.0.0", "@types/pako": "^2.0.0", "@types/readable-stream": "^2.3.13", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "blockstore-core": "^3.0.0", "copyfiles": "^2.4.1", "dag-jose": "^3.0.1", diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index b30887b259..d57282a42e 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -105,7 +105,7 @@ "@types/progress": "^2.0.3", "@types/rimraf": "^3.0.1", "@types/yargs": "^17.0.10", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "ipfs-repo": "^17.0.0", "it-all": "^2.0.0", "it-first": "^2.0.0", diff --git a/packages/ipfs-client/package.json b/packages/ipfs-client/package.json index e477c8a7d4..df655f5dcf 100644 --- a/packages/ipfs-client/package.json +++ b/packages/ipfs-client/package.json @@ -66,6 +66,6 @@ "merge-options": "^3.0.4" }, "devDependencies": { - "aegir": "^37.9.0" + "aegir": "^37.11.0" } } diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index 551d8c587a..e31b7522a4 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -118,7 +118,7 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "ipfs-core-utils": "^0.17.0" } } diff --git a/packages/ipfs-core-types/package.json b/packages/ipfs-core-types/package.json index 113ab9c5b1..f78f6f2c02 100644 --- a/packages/ipfs-core-types/package.json +++ b/packages/ipfs-core-types/package.json @@ -59,6 +59,6 @@ "multiformats": "^11.0.0" }, "devDependencies": { - "aegir": "^37.9.0" + "aegir": "^37.11.0" } } diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index f7da0323be..b226897a8b 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -163,7 +163,7 @@ }, "devDependencies": { "@web-std/file": "^3.0.2", - "aegir": "^37.9.0" + "aegir": "^37.11.0" }, "browser": { "fs": false diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 0670afa160..6b300207a6 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -152,7 +152,7 @@ "@types/dlv": "^1.1.2", "@types/pako": "^2.0.0", "@types/rimraf": "^3.0.1", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "blockstore-datastore-adapter": "^5.0.0", "delay": "^5.0.0", "go-ipfs": "^0.12.0", diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index 25b5157a2f..e34d28607b 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -75,7 +75,7 @@ "libp2p": "next" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "node-fetch": "^3.2.3", "ws": "^8.5.0" }, diff --git a/packages/ipfs-grpc-client/package.json b/packages/ipfs-grpc-client/package.json index 3628dfa4d2..9af0f2d6d9 100644 --- a/packages/ipfs-grpc-client/package.json +++ b/packages/ipfs-grpc-client/package.json @@ -88,7 +88,7 @@ "ws": "^8.5.0" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "it-all": "^2.0.0", "protobufjs-cli": "^1.0.0", "sinon": "^15.0.1" diff --git a/packages/ipfs-grpc-protocol/package.json b/packages/ipfs-grpc-protocol/package.json index 8bd8b9d84a..61a7663823 100644 --- a/packages/ipfs-grpc-protocol/package.json +++ b/packages/ipfs-grpc-protocol/package.json @@ -60,7 +60,7 @@ "lint": "aegir lint" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "mkdirp": "^1.0.4", "protobufjs": "^7.0.0", "protobufjs-cli": "^1.0.0" diff --git a/packages/ipfs-grpc-server/package.json b/packages/ipfs-grpc-server/package.json index 5ffe08233c..8fea82fd12 100644 --- a/packages/ipfs-grpc-server/package.json +++ b/packages/ipfs-grpc-server/package.json @@ -83,7 +83,7 @@ }, "devDependencies": { "@types/ws": "^8.5.3", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "ipfs-core": "^0.17.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index d125f608c7..c9c0308fd6 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -88,7 +88,7 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "delay": "^5.0.0", "go-ipfs": "^0.12.0", "ipfsd-ctl": "^12.0.3", diff --git a/packages/ipfs-http-gateway/package.json b/packages/ipfs-http-gateway/package.json index 06707928c8..399d4c23f7 100644 --- a/packages/ipfs-http-gateway/package.json +++ b/packages/ipfs-http-gateway/package.json @@ -85,7 +85,7 @@ "devDependencies": { "@types/hapi-pino": "^8.0.1", "@types/hapi__hapi": "^20.0.5", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "file-type": "^18.0.0", "sinon": "^15.0.1" } diff --git a/packages/ipfs-http-response/package.json b/packages/ipfs-http-response/package.json index f0f2c07eb7..0ccf1be840 100644 --- a/packages/ipfs-http-response/package.json +++ b/packages/ipfs-http-response/package.json @@ -79,7 +79,7 @@ "devDependencies": { "@types/ejs": "^3.1.0", "@types/mime-types": "^2.1.1", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "get-stream": "^6.0.0", "ipfs-core": "^0.17.0", "ipfsd-ctl": "^12.0.3", diff --git a/packages/ipfs-http-server/package.json b/packages/ipfs-http-server/package.json index be85bbc809..2a04338fde 100644 --- a/packages/ipfs-http-server/package.json +++ b/packages/ipfs-http-server/package.json @@ -103,7 +103,7 @@ "@types/hapi-pino": "^8.0.1", "@types/hapi__hapi": "^20.0.5", "@types/node": "^18.0.0", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "err-code": "^3.0.1", "form-data": "^4.0.0", "ipfs-http-client": "^59.0.0", diff --git a/packages/ipfs-message-port-client/package.json b/packages/ipfs-message-port-client/package.json index 0bfce00921..5c5b4ba982 100644 --- a/packages/ipfs-message-port-client/package.json +++ b/packages/ipfs-message-port-client/package.json @@ -73,7 +73,7 @@ "multiformats": "^11.0.0" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "interface-ipfs-core": "^0.157.0", "ipfs-core": "^0.17.0", "ipfs-message-port-server": "^0.14.0" diff --git a/packages/ipfs-message-port-protocol/package.json b/packages/ipfs-message-port-protocol/package.json index 026548a215..d94258470a 100644 --- a/packages/ipfs-message-port-protocol/package.json +++ b/packages/ipfs-message-port-protocol/package.json @@ -91,7 +91,7 @@ "multiformats": "^11.0.0" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "uint8arrays": "^4.0.2" } } diff --git a/packages/ipfs-message-port-server/package.json b/packages/ipfs-message-port-server/package.json index 273cac0e12..9e74d49ccf 100644 --- a/packages/ipfs-message-port-server/package.json +++ b/packages/ipfs-message-port-server/package.json @@ -97,7 +97,7 @@ "it-all": "^2.0.0" }, "devDependencies": { - "aegir": "^37.9.0", + "aegir": "^37.11.0", "multiformats": "^11.0.0" }, "browser": { diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index 45df27a786..10d9f4f129 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -87,7 +87,7 @@ "@libp2p/websockets": "^5.0.0", "@types/semver": "^7.3.4", "@types/update-notifier": "^6.0.1", - "aegir": "^37.9.0", + "aegir": "^37.11.0", "cross-env": "^7.0.0", "go-ipfs": "^0.12.0", "interface-ipfs-core": "^0.157.0", From 115a4050821df8d4c3a09494c2275c9c93647433 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Tue, 10 Jan 2023 15:00:22 +0000 Subject: [PATCH 15/28] fix: fix publish step --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 88d9c7f88e..2975d4486f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "lint": "aegir run lint", "dep-check": "aegir run dep-check", "release": "run-s build npm:release docker:release", - "npm:release": "aegir run release", + "npm:release": "aegir exec npm -- publish", "docker:release": "run-s docker:release:*", "docker:release:build": "docker build . --no-cache --tag js-ipfs:latest --file ./Dockerfile.latest", "docker:release:tag-latest": "docker tag js-ipfs:latest docker.io/ipfs/js-ipfs:latest", @@ -47,7 +47,7 @@ "docker:release:push-latest": "docker push ipfs/js-ipfs:latest", "docker:release:push-version": "docker push ipfs/js-ipfs:v`npm show ipfs@latest version -q`", "release:rc": "run-s npm:rc docker:rc", - "npm:rc": "aegir run release-rc", + "npm:rc": "aegir release-rc", "docker:rc": "run-s docker:rc:*", "docker:rc:build": "docker build . --no-cache --tag js-ipfs:next --file ./Dockerfile.next", "docker:rc:tag-next": "docker tag js-ipfs:next docker.io/ipfs/js-ipfs:next", From 1916ca820d22073b1bb24261a583c2a78a84601a Mon Sep 17 00:00:00 2001 From: achingbrain Date: Tue, 10 Jan 2023 15:29:02 +0000 Subject: [PATCH 16/28] chore: interface tests should run after build --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a5343767c..cb70dda93e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -168,6 +168,7 @@ jobs: test-interface: name: Interface tests ${{ matrix.suite }} ${{ matrix.type }} + needs: build runs-on: ubuntu-latest strategy: matrix: From 5f73ecadd7d397029be8dd9bc0dcd82469f07359 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Tue, 10 Jan 2023 15:58:53 +0000 Subject: [PATCH 17/28] chore: do not double-build interface tests --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb70dda93e..f0613afed6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - node: [16] + node: [lts/*] steps: - uses: actions/checkout@v2 with: @@ -188,8 +188,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: lts/* - - run: npm install - - run: npm run build + - uses: ipfs/aegir/actions/cache-node-modules@master - run: npm run ${{ matrix.suite }} -- -- -t ${{ matrix.type }} - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: From 4b4c124c4c49b1c60a68b4b8e24f1f00dd7f0517 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 11 Jan 2023 15:27:40 +0000 Subject: [PATCH 18/28] deps: update ipfs-utils for node 18 compatibility (#4287) Recent node versions ship with a global fetch which requires the duplex option to be set when sending readable streams as the request body so ensure we have the latest ipfs-utils that sets that option. --- packages/interface-ipfs-core/package.json | 2 +- packages/ipfs-cli/package.json | 2 +- packages/ipfs-core-config/package.json | 2 +- packages/ipfs-core-utils/package.json | 2 +- packages/ipfs-daemon/package.json | 2 +- packages/ipfs-http-client/package.json | 2 +- packages/ipfs/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index 02b25ce20c..6ec3d3d48b 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -87,7 +87,7 @@ "ipfs-core-types": "^0.13.0", "ipfs-unixfs": "^9.0.0", "ipfs-unixfs-importer": "^12.0.0", - "ipfs-utils": "^9.0.6", + "ipfs-utils": "^9.0.13", "ipns": "^5.0.1", "is-ipfs": "^8.0.0", "iso-random-stream": "^2.0.2", diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index d57282a42e..614145eacd 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -83,7 +83,7 @@ "ipfs-core-utils": "^0.17.0", "ipfs-daemon": "^0.15.0", "ipfs-http-client": "^59.0.0", - "ipfs-utils": "^9.0.6", + "ipfs-utils": "^9.0.13", "it-concat": "^3.0.1", "it-merge": "^2.0.0", "it-pipe": "^2.0.3", diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index e31b7522a4..49ef17d2fa 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -109,7 +109,7 @@ "hashlru": "^2.3.0", "interface-datastore": "^7.0.0", "ipfs-repo": "^17.0.0", - "ipfs-utils": "^9.0.6", + "ipfs-utils": "^9.0.13", "is-ipfs": "^8.0.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index b226897a8b..14223efe8f 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -149,7 +149,7 @@ "err-code": "^3.0.1", "ipfs-core-types": "^0.13.0", "ipfs-unixfs": "^9.0.0", - "ipfs-utils": "^9.0.6", + "ipfs-utils": "^9.0.13", "it-all": "^2.0.0", "it-map": "^2.0.0", "it-peekable": "^2.0.0", diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index e34d28607b..59d9ae5b81 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -71,7 +71,7 @@ "ipfs-grpc-server": "^0.11.0", "ipfs-http-gateway": "^0.12.0", "ipfs-http-server": "^0.14.0", - "ipfs-utils": "^9.0.6", + "ipfs-utils": "^9.0.13", "libp2p": "next" }, "devDependencies": { diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index c9c0308fd6..593bbe5671 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -78,7 +78,7 @@ "err-code": "^3.0.1", "ipfs-core-types": "^0.13.0", "ipfs-core-utils": "^0.17.0", - "ipfs-utils": "^9.0.6", + "ipfs-utils": "^9.0.13", "it-first": "^2.0.0", "it-last": "^2.0.0", "merge-options": "^3.0.4", diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index 10d9f4f129..bb75779efb 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -95,7 +95,7 @@ "ipfs-core-types": "^0.13.0", "ipfs-http-client": "^59.0.0", "ipfs-interop": "ipfs/interop#deps/update-multiformats", - "ipfs-utils": "^9.0.6", + "ipfs-utils": "^9.0.13", "ipfsd-ctl": "^12.0.3", "iso-url": "^1.0.0", "kubo-rpc-client": "^2.0.2", From 789ee58556083ef71a4ef44e3358f86c5be101fb Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 11 Jan 2023 16:29:52 +0000 Subject: [PATCH 19/28] deps: update dag-jose to 4.0.0 (#4289) Updates to version with latest multiformats dep --- packages/interface-ipfs-core/package.json | 2 +- packages/ipfs-core/package.json | 2 +- packages/ipfs-http-client/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index 6ec3d3d48b..da79ef1eb3 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -80,7 +80,7 @@ "aegir": "^37.11.0", "blockstore-core": "^3.0.0", "copyfiles": "^2.4.1", - "dag-jose": "^3.0.1", + "dag-jose": "^4.0.0", "delay": "^5.0.0", "did-jwt": "^6.2.0", "err-code": "^3.0.1", diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 6b300207a6..68832bbb00 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -103,7 +103,7 @@ "array-shuffle": "^3.0.0", "blockstore-core": "^3.0.0", "browser-readablestream-to-it": "^2.0.0", - "dag-jose": "^3.0.1", + "dag-jose": "^4.0.0", "datastore-core": "^8.0.1", "datastore-pubsub": "^7.0.0", "dlv": "^1.1.3", diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index 593bbe5671..690671a5af 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -74,7 +74,7 @@ "@libp2p/peer-id": "^2.0.0", "@multiformats/multiaddr": "^11.0.0", "any-signal": "^3.0.0", - "dag-jose": "^3.0.1", + "dag-jose": "^4.0.0", "err-code": "^3.0.1", "ipfs-core-types": "^0.13.0", "ipfs-core-utils": "^0.17.0", From fa578bace93e459849a0ffcebbd6f222dc05652d Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 11 Jan 2023 17:15:07 +0000 Subject: [PATCH 20/28] fix: disallow publishing pubsub messages to zero peers (#4286) Use the default gossipsub behaviour of not allowing publishing message to zero peers. If a user publishes a message they may be surprised to find it's not been recieved by anyone, so instead an error should be thrown when there are no peers that will receive a message. --- .../src/name-pubsub/pubsub.js | 16 ++++++++ .../interface-ipfs-core/src/pubsub/publish.js | 39 ++++++++++++++++++- .../src/libp2p-pubsub-routers.browser.js | 1 - .../src/libp2p-pubsub-routers.js | 1 - 4 files changed, 53 insertions(+), 4 deletions(-) diff --git a/packages/interface-ipfs-core/src/name-pubsub/pubsub.js b/packages/interface-ipfs-core/src/name-pubsub/pubsub.js index 688be1cf0b..77c2dd4cc8 100644 --- a/packages/interface-ipfs-core/src/name-pubsub/pubsub.js +++ b/packages/interface-ipfs-core/src/name-pubsub/pubsub.js @@ -88,6 +88,14 @@ export function testPubsub (factory, options) { const topic = `${namespace}${uint8ArrayToString(routingKey, 'base64url')}` await nodeB.pubsub.subscribe(topic, () => {}) + + // wait for nodeA to see nodeB's subscription + await waitFor(async () => { + const peers = await nodeA.pubsub.peers(topic) + + return peers.map(p => p.toString()).includes(idB.id.toString()) + }) + await nodeA.name.publish(ipfsRef, { resolve: false }) await delay(1000) // guarantee record is written @@ -149,6 +157,14 @@ export function testPubsub (factory, options) { const topic = `${namespace}${uint8ArrayToString(routingKey, 'base64url')}` await nodeB.pubsub.subscribe(topic, checkMessage) + + // wait for nodeA to see nodeB's subscription + await waitFor(async () => { + const peers = await nodeA.pubsub.peers(topic) + + return peers.map(p => p.toString()).includes(idB.id.toString()) + }) + await nodeA.name.publish(ipfsRef, { resolve: false, key: testAccountName }) await waitFor(alreadySubscribed) diff --git a/packages/interface-ipfs-core/src/pubsub/publish.js b/packages/interface-ipfs-core/src/pubsub/publish.js index 3986adac4b..7af4b1c0ba 100644 --- a/packages/interface-ipfs-core/src/pubsub/publish.js +++ b/packages/interface-ipfs-core/src/pubsub/publish.js @@ -5,11 +5,30 @@ import { nanoid } from 'nanoid' import { getTopic } from './utils.js' import { expect } from 'aegir/chai' import { getDescribe, getIt } from '../utils/mocha.js' +import pWaitFor from 'p-wait-for' /** * @typedef {import('ipfsd-ctl').Factory} Factory + * @typedef {import('ipfs-core-types').IPFS} IPFS */ +/** + * @param {string} topic + * @param {IPFS} ipfs + * @param {IPFS} remote + */ +async function waitForRemoteToBeSubscribed (topic, ipfs, remote) { + await remote.pubsub.subscribe(topic, () => {}) + const remoteId = await remote.id() + + // wait for remote to be subscribed to topic + await pWaitFor(async () => { + const peers = await ipfs.pubsub.peers(topic) + + return peers.map(p => p.toString()).includes(remoteId.id.toString()) + }) +} + /** * @param {Factory} factory * @param {object} options @@ -21,23 +40,37 @@ export function testPublish (factory, options) { describe('.pubsub.publish', function () { this.timeout(80 * 1000) - /** @type {import('ipfs-core-types').IPFS} */ + /** @type {IPFS} */ let ipfs + /** @type {IPFS} */ + let remote + before(async () => { ipfs = (await factory.spawn()).api + remote = (await factory.spawn()).api + + // ensure we have peers to allow publishing + const remoteId = await remote.id() + await ipfs.swarm.connect(remoteId.addresses[0]) }) after(() => factory.clean()) it('should fail with undefined msg', async () => { const topic = getTopic() + + await waitForRemoteToBeSubscribed(topic, ipfs, remote) + // @ts-expect-error invalid parameter await expect(ipfs.pubsub.publish(topic)).to.eventually.be.rejected() }) - it('should publish message from buffer', () => { + it('should publish message from buffer', async () => { const topic = getTopic() + + await waitForRemoteToBeSubscribed(topic, ipfs, remote) + return ipfs.pubsub.publish(topic, uint8ArrayFromString(nanoid())) }) @@ -45,6 +78,8 @@ export function testPublish (factory, options) { const count = 10 const topic = getTopic() + await waitForRemoteToBeSubscribed(topic, ipfs, remote) + for (let i = 0; i < count; i++) { await ipfs.pubsub.publish(topic, uint8ArrayFromString(nanoid())) } diff --git a/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js b/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js index a5d6dba740..99fce4374b 100644 --- a/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js +++ b/packages/ipfs-core-config/src/libp2p-pubsub-routers.browser.js @@ -5,7 +5,6 @@ import { gossipsub } from '@chainsafe/libp2p-gossipsub' /** @type {() => Record PubSub>}>} */ export const routers = () => ({ gossipsub: gossipsub({ - allowPublishToZeroPeers: true, fallbackToFloodsub: true, emitSelf: true, maxInboundStreams: 64, diff --git a/packages/ipfs-core-config/src/libp2p-pubsub-routers.js b/packages/ipfs-core-config/src/libp2p-pubsub-routers.js index 06154d1c35..c67c71f99d 100644 --- a/packages/ipfs-core-config/src/libp2p-pubsub-routers.js +++ b/packages/ipfs-core-config/src/libp2p-pubsub-routers.js @@ -6,7 +6,6 @@ import { floodsub } from '@libp2p/floodsub' /** @type {() => Record PubSub>}>} */ export const routers = () => ({ gossipsub: gossipsub({ - allowPublishToZeroPeers: true, fallbackToFloodsub: true, emitSelf: true, maxInboundStreams: 64, From 0cfcaf65998bdc2af0cc29ac48229bb3bc35c5b8 Mon Sep 17 00:00:00 2001 From: RangerMauve Date: Wed, 11 Jan 2023 12:24:07 -0500 Subject: [PATCH 21/28] fix: allow reading rawLeaves in MFS (#4282) If you write to an MFS directory with `rawLeaves: true`, it'll error out when doing a read saying `Error: /example-0/example.txt was not a file`. This accounts for that case by handling the `raw` type the same as a file. Co-authored-by: Mauve Signweaver Co-authored-by: Alex Potsides --- packages/interface-ipfs-core/src/files/read.js | 9 +++++++++ packages/ipfs-core/src/components/files/read.js | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/interface-ipfs-core/src/files/read.js b/packages/interface-ipfs-core/src/files/read.js index 1212cc4165..32ea03e468 100644 --- a/packages/interface-ipfs-core/src/files/read.js +++ b/packages/interface-ipfs-core/src/files/read.js @@ -112,6 +112,15 @@ export function testRead (factory, options) { expect(testFileData).to.eql(fixtures.smallFile.data) }) + it('should be able to read rawLeaves files', async () => { + const { cid } = await ipfs.add(fixtures.smallFile.data, { + rawLeaves: true + }) + await ipfs.files.cp(`/ipfs/${cid}`, '/raw-leaves.txt') + const testFileData = uint8ArrayConcat(await all(ipfs.files.read('/raw-leaves.txt'))) + expect(testFileData).to.eql(fixtures.smallFile.data) + }) + describe('with sharding', () => { /** @type {import('ipfs-core-types').IPFS} */ let ipfs diff --git a/packages/ipfs-core/src/components/files/read.js b/packages/ipfs-core/src/components/files/read.js index a66ba0d78c..28b132f12c 100644 --- a/packages/ipfs-core/src/components/files/read.js +++ b/packages/ipfs-core/src/components/files/read.js @@ -39,8 +39,8 @@ export function createRead (context) { const mfsPath = await toMfsPath(context, path, options) const result = await exporter(mfsPath.mfsPath, context.repo.blocks) - if (result.type !== 'file') { - throw errCode(new Error(`${path} was not a file`), 'ERR_NOT_FILE') + if (result.type !== 'file' && result.type !== 'raw') { + throw errCode(new Error(`${path} was not a file or raw bytes`), 'ERR_NOT_FILE') } if (!result.content) { From d1c3abb32b57379b5446d5eda232d7750a2ecff0 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 11 Jan 2023 17:38:18 +0000 Subject: [PATCH 22/28] deps: update libp2p to 0.42.x (#4288) Update to release version of libp2p --- packages/ipfs-core/package.json | 2 +- packages/ipfs-daemon/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 68832bbb00..eb4acb5e7e 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -138,7 +138,7 @@ "it-tar": "^6.0.0", "it-to-buffer": "^3.0.0", "just-safe-set": "^4.0.2", - "libp2p": "next", + "libp2p": "^0.42.0", "merge-options": "^3.0.4", "mortice": "^3.0.0", "multiformats": "^11.0.0", diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index 59d9ae5b81..dccaff6e1d 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -72,7 +72,7 @@ "ipfs-http-gateway": "^0.12.0", "ipfs-http-server": "^0.14.0", "ipfs-utils": "^9.0.13", - "libp2p": "next" + "libp2p": "^0.42.0" }, "devDependencies": { "aegir": "^37.11.0", From 6e940670681859682d41ca1339744955c9ee20bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Jan 2023 10:49:48 +0000 Subject: [PATCH 23/28] chore: release master (#4252) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- packages/interface-ipfs-core/CHANGELOG.md | 22 ++++++++++++++++ packages/interface-ipfs-core/package.json | 4 +-- packages/ipfs-cli/CHANGELOG.md | 23 ++++++++++++++++ packages/ipfs-cli/package.json | 12 ++++----- packages/ipfs-client/CHANGELOG.md | 22 +++++++++++++++- packages/ipfs-client/package.json | 6 ++--- packages/ipfs-core-config/CHANGELOG.md | 20 ++++++++++++++ packages/ipfs-core-config/package.json | 4 +-- packages/ipfs-core-types/CHANGELOG.md | 12 +++++++++ packages/ipfs-core-types/package.json | 2 +- packages/ipfs-core-utils/CHANGELOG.md | 19 ++++++++++++++ packages/ipfs-core-utils/package.json | 4 +-- packages/ipfs-core/CHANGELOG.md | 26 +++++++++++++++++++ packages/ipfs-core/package.json | 12 ++++----- packages/ipfs-daemon/CHANGELOG.md | 23 ++++++++++++++++ packages/ipfs-daemon/package.json | 12 ++++----- packages/ipfs-grpc-client/CHANGELOG.md | 21 +++++++++++++++ packages/ipfs-grpc-client/package.json | 8 +++--- packages/ipfs-grpc-protocol/CHANGELOG.md | 12 +++++++++ packages/ipfs-grpc-protocol/package.json | 2 +- packages/ipfs-grpc-server/CHANGELOG.md | 22 ++++++++++++++++ packages/ipfs-grpc-server/package.json | 8 +++--- packages/ipfs-http-client/CHANGELOG.md | 20 ++++++++++++++ packages/ipfs-http-client/package.json | 6 ++--- packages/ipfs-http-gateway/CHANGELOG.md | 20 ++++++++++++++ packages/ipfs-http-gateway/package.json | 6 ++--- packages/ipfs-http-response/CHANGELOG.md | 19 ++++++++++++++ packages/ipfs-http-response/package.json | 4 +-- packages/ipfs-http-server/CHANGELOG.md | 23 ++++++++++++++++ packages/ipfs-http-server/package.json | 10 +++---- .../ipfs-message-port-client/CHANGELOG.md | 24 +++++++++++++++++ .../ipfs-message-port-client/package.json | 12 ++++----- .../ipfs-message-port-protocol/CHANGELOG.md | 19 ++++++++++++++ .../ipfs-message-port-protocol/package.json | 4 +-- .../ipfs-message-port-server/CHANGELOG.md | 20 ++++++++++++++ .../ipfs-message-port-server/package.json | 6 ++--- packages/ipfs/CHANGELOG.md | 25 ++++++++++++++++++ packages/ipfs/package.json | 14 +++++----- 39 files changed, 460 insertions(+), 70 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6f9bc03873..87a8dd87be 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{"packages/interface-ipfs-core":"0.157.0","packages/ipfs":"0.65.0","packages/ipfs-cli":"0.15.0","packages/ipfs-client":"0.9.2","packages/ipfs-core":"0.17.0","packages/ipfs-core-config":"0.6.0","packages/ipfs-core-types":"0.13.0","packages/ipfs-core-utils":"0.17.0","packages/ipfs-daemon":"0.15.0","packages/ipfs-grpc-client":"0.12.0","packages/ipfs-grpc-protocol":"0.7.0","packages/ipfs-grpc-server":"0.11.0","packages/ipfs-http-client":"59.0.0","packages/ipfs-http-gateway":"0.12.0","packages/ipfs-http-response":"5.0.0","packages/ipfs-http-server":"0.14.0","packages/ipfs-message-port-client":"0.14.0","packages/ipfs-message-port-protocol":"0.14.0","packages/ipfs-message-port-server":"0.14.0"} \ No newline at end of file +{"packages/interface-ipfs-core":"0.158.0","packages/ipfs":"0.66.0","packages/ipfs-cli":"0.16.0","packages/ipfs-client":"0.10.0","packages/ipfs-core":"0.18.0","packages/ipfs-core-config":"0.7.0","packages/ipfs-core-types":"0.14.0","packages/ipfs-core-utils":"0.18.0","packages/ipfs-daemon":"0.16.0","packages/ipfs-grpc-client":"0.13.0","packages/ipfs-grpc-protocol":"0.8.0","packages/ipfs-grpc-server":"0.12.0","packages/ipfs-http-client":"60.0.0","packages/ipfs-http-gateway":"0.13.0","packages/ipfs-http-response":"6.0.0","packages/ipfs-http-server":"0.15.0","packages/ipfs-message-port-client":"0.15.0","packages/ipfs-message-port-protocol":"0.15.0","packages/ipfs-message-port-server":"0.15.0"} \ No newline at end of file diff --git a/packages/interface-ipfs-core/CHANGELOG.md b/packages/interface-ipfs-core/CHANGELOG.md index a0bb3b192a..91821881d1 100644 --- a/packages/interface-ipfs-core/CHANGELOG.md +++ b/packages/interface-ipfs-core/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.158.0](https://www.github.com/ipfs/js-ipfs/compare/interface-ipfs-core-v0.157.0...interface-ipfs-core-v0.158.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* allow reading rawLeaves in MFS ([#4282](https://www.github.com/ipfs/js-ipfs/issues/4282)) ([0cfcaf6](https://www.github.com/ipfs/js-ipfs/commit/0cfcaf65998bdc2af0cc29ac48229bb3bc35c5b8)) +* disallow publishing pubsub messages to zero peers ([#4286](https://www.github.com/ipfs/js-ipfs/issues/4286)) ([fa578ba](https://www.github.com/ipfs/js-ipfs/commit/fa578bace93e459849a0ffcebbd6f222dc05652d)) +* mfs blob import for files larger than 262144b ([#4251](https://www.github.com/ipfs/js-ipfs/issues/4251)) ([6be5906](https://www.github.com/ipfs/js-ipfs/commit/6be59068cc99c517526bfa123ad475ae05fcbaef)), closes [#3601](https://www.github.com/ipfs/js-ipfs/issues/3601) [#3576](https://www.github.com/ipfs/js-ipfs/issues/3576) +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + ## [0.157.0](https://www.github.com/ipfs/js-ipfs/compare/interface-ipfs-core-v0.156.1...interface-ipfs-core-v0.157.0) (2022-10-24) diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index da79ef1eb3..f3769d2684 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -1,6 +1,6 @@ { "name": "interface-ipfs-core", - "version": "0.157.0", + "version": "0.158.0", "description": "A test suite and interface you can use to implement a IPFS core interface.", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core#readme", @@ -84,7 +84,7 @@ "delay": "^5.0.0", "did-jwt": "^6.2.0", "err-code": "^3.0.1", - "ipfs-core-types": "^0.13.0", + "ipfs-core-types": "^0.14.0", "ipfs-unixfs": "^9.0.0", "ipfs-unixfs-importer": "^12.0.0", "ipfs-utils": "^9.0.13", diff --git a/packages/ipfs-cli/CHANGELOG.md b/packages/ipfs-cli/CHANGELOG.md index e747821246..2e2faace5e 100644 --- a/packages/ipfs-cli/CHANGELOG.md +++ b/packages/ipfs-cli/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.16.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-cli-v0.15.0...ipfs-cli-v0.16.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core bumped from ^0.17.0 to ^0.18.0 + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-core-utils bumped from ^0.17.0 to ^0.18.0 + * ipfs-daemon bumped from ^0.15.0 to ^0.16.0 + * ipfs-http-client bumped from ^59.0.0 to ^60.0.0 + ## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-cli-v0.14.2...ipfs-cli-v0.15.0) (2022-10-24) diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index 614145eacd..f710bc1011 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-cli", - "version": "0.15.0", + "version": "0.16.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-cli#readme", @@ -78,11 +78,11 @@ "byteman": "^1.3.5", "execa": "^6.1.0", "get-folder-size": "^4.0.0", - "ipfs-core": "^0.17.0", - "ipfs-core-types": "^0.13.0", - "ipfs-core-utils": "^0.17.0", - "ipfs-daemon": "^0.15.0", - "ipfs-http-client": "^59.0.0", + "ipfs-core": "^0.18.0", + "ipfs-core-types": "^0.14.0", + "ipfs-core-utils": "^0.18.0", + "ipfs-daemon": "^0.16.0", + "ipfs-http-client": "^60.0.0", "ipfs-utils": "^9.0.13", "it-concat": "^3.0.1", "it-merge": "^2.0.0", diff --git a/packages/ipfs-client/CHANGELOG.md b/packages/ipfs-client/CHANGELOG.md index 7f40df6471..854465488a 100644 --- a/packages/ipfs-client/CHANGELOG.md +++ b/packages/ipfs-client/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.10.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-client-v0.9.2...ipfs-client-v0.10.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-grpc-client bumped from ^0.12.0 to ^0.13.0 + * ipfs-http-client bumped from ^59.0.0 to ^60.0.0 + ### [0.9.2](https://www.github.com/ipfs/js-ipfs/compare/ipfs-client-v0.9.1...ipfs-client-v0.9.2) (2022-10-24) @@ -396,4 +416,4 @@ Co-authored-by: achingbrain ### Features * add grpc server and client ([#3403](https://github.com/ipfs/js-ipfs/issues/3403)) ([a9027e0](https://github.com/ipfs/js-ipfs/commit/a9027e0ec0cea9a4f34b4f2f52e09abb35237384)), closes [#2519](https://github.com/ipfs/js-ipfs/issues/2519) [#2838](https://github.com/ipfs/js-ipfs/issues/2838) [#2943](https://github.com/ipfs/js-ipfs/issues/2943) [#2854](https://github.com/ipfs/js-ipfs/issues/2854) [#2864](https://github.com/ipfs/js-ipfs/issues/2864) -* allow passing a http.Agent to the grpc client ([#3477](https://github.com/ipfs/js-ipfs/issues/3477)) ([c5f0bc5](https://github.com/ipfs/js-ipfs/commit/c5f0bc5eeee15369b7d02901035b04184a8608d2)), closes [#3474](https://github.com/ipfs/js-ipfs/issues/3474) +* allow passing a http.Agent to the grpc client ([#3477](https://github.com/ipfs/js-ipfs/issues/3477)) ([c5f0bc5](https://github.com/ipfs/js-ipfs/commit/c5f0bc5eeee15369b7d02901035b04184a8608d2)), closes [#3474](https://github.com/ipfs/js-ipfs/issues/3474) \ No newline at end of file diff --git a/packages/ipfs-client/package.json b/packages/ipfs-client/package.json index df655f5dcf..3105cf8ef9 100644 --- a/packages/ipfs-client/package.json +++ b/packages/ipfs-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-client", - "version": "0.9.2", + "version": "0.10.0", "description": "A client library to talk to local IPFS daemons", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-client#readme", @@ -61,8 +61,8 @@ "dep-check": "aegir dep-check -i aegir" }, "dependencies": { - "ipfs-grpc-client": "^0.12.0", - "ipfs-http-client": "^59.0.0", + "ipfs-grpc-client": "^0.13.0", + "ipfs-http-client": "^60.0.0", "merge-options": "^3.0.4" }, "devDependencies": { diff --git a/packages/ipfs-core-config/CHANGELOG.md b/packages/ipfs-core-config/CHANGELOG.md index 7a13703a7a..3e184a6e46 100644 --- a/packages/ipfs-core-config/CHANGELOG.md +++ b/packages/ipfs-core-config/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.7.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-config-v0.6.0...ipfs-core-config-v0.7.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* disallow publishing pubsub messages to zero peers ([#4286](https://www.github.com/ipfs/js-ipfs/issues/4286)) ([fa578ba](https://www.github.com/ipfs/js-ipfs/commit/fa578bace93e459849a0ffcebbd6f222dc05652d)) +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * ipfs-core-utils bumped from ^0.17.0 to ^0.18.0 + ## [0.6.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-config-v0.5.1...ipfs-core-config-v0.6.0) (2022-10-24) diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index 49ef17d2fa..4702c1a7dc 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core-config", - "version": "0.6.0", + "version": "0.7.0", "description": "Package to store node and browser specific config for ipfs-core", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", @@ -119,6 +119,6 @@ }, "devDependencies": { "aegir": "^37.11.0", - "ipfs-core-utils": "^0.17.0" + "ipfs-core-utils": "^0.18.0" } } diff --git a/packages/ipfs-core-types/CHANGELOG.md b/packages/ipfs-core-types/CHANGELOG.md index 3448740886..bfb010663c 100644 --- a/packages/ipfs-core-types/CHANGELOG.md +++ b/packages/ipfs-core-types/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-types-v0.13.0...ipfs-core-types-v0.14.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + ## [0.13.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-types-v0.12.1...ipfs-core-types-v0.13.0) (2022-10-24) diff --git a/packages/ipfs-core-types/package.json b/packages/ipfs-core-types/package.json index f78f6f2c02..c392bbd4e0 100644 --- a/packages/ipfs-core-types/package.json +++ b/packages/ipfs-core-types/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core-types", - "version": "0.13.0", + "version": "0.14.0", "description": "IPFS interface definitions used by implementations for API compatibility.", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-core-types#readme", diff --git a/packages/ipfs-core-utils/CHANGELOG.md b/packages/ipfs-core-utils/CHANGELOG.md index ea41400734..573c91d766 100644 --- a/packages/ipfs-core-utils/CHANGELOG.md +++ b/packages/ipfs-core-utils/CHANGELOG.md @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.18.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-utils-v0.17.0...ipfs-core-utils-v0.18.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + ## [0.17.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-utils-v0.16.1...ipfs-core-utils-v0.17.0) (2022-10-24) diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index 14223efe8f..d523501bb0 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core-utils", - "version": "0.17.0", + "version": "0.18.0", "description": "Package to share code between ipfs and ipfs-http-client", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", @@ -147,7 +147,7 @@ "blob-to-it": "^2.0.0", "browser-readablestream-to-it": "^2.0.0", "err-code": "^3.0.1", - "ipfs-core-types": "^0.13.0", + "ipfs-core-types": "^0.14.0", "ipfs-unixfs": "^9.0.0", "ipfs-utils": "^9.0.13", "it-all": "^2.0.0", diff --git a/packages/ipfs-core/CHANGELOG.md b/packages/ipfs-core/CHANGELOG.md index 214d8be095..4b7ef3e523 100644 --- a/packages/ipfs-core/CHANGELOG.md +++ b/packages/ipfs-core/CHANGELOG.md @@ -3,6 +3,32 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.18.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-v0.17.0...ipfs-core-v0.18.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* allow reading rawLeaves in MFS ([#4282](https://www.github.com/ipfs/js-ipfs/issues/4282)) ([0cfcaf6](https://www.github.com/ipfs/js-ipfs/commit/0cfcaf65998bdc2af0cc29ac48229bb3bc35c5b8)) +* mfs blob import for files larger than 262144b ([#4251](https://www.github.com/ipfs/js-ipfs/issues/4251)) ([6be5906](https://www.github.com/ipfs/js-ipfs/commit/6be59068cc99c517526bfa123ad475ae05fcbaef)), closes [#3601](https://www.github.com/ipfs/js-ipfs/issues/3601) [#3576](https://www.github.com/ipfs/js-ipfs/issues/3576) +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-config bumped from ^0.6.0 to ^0.7.0 + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-core-utils bumped from ^0.17.0 to ^0.18.0 + * ipfs-http-client bumped from ^59.0.0 to ^60.0.0 + * devDependencies + * interface-ipfs-core bumped from ^0.157.0 to ^0.158.0 + ## [0.17.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-core-v0.16.1...ipfs-core-v0.17.0) (2022-10-24) diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index eb4acb5e7e..1b0ccc59ff 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-core", - "version": "0.17.0", + "version": "0.18.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-core#readme", @@ -113,10 +113,10 @@ "interface-blockstore": "^4.0.0", "interface-datastore": "^7.0.0", "ipfs-bitswap": "^15.0.0", - "ipfs-core-config": "^0.6.0", - "ipfs-core-types": "^0.13.0", - "ipfs-core-utils": "^0.17.0", - "ipfs-http-client": "^59.0.0", + "ipfs-core-config": "^0.7.0", + "ipfs-core-types": "^0.14.0", + "ipfs-core-utils": "^0.18.0", + "ipfs-http-client": "^60.0.0", "ipfs-repo": "^17.0.0", "ipfs-unixfs": "^9.0.0", "ipfs-unixfs-exporter": "^10.0.0", @@ -157,7 +157,7 @@ "delay": "^5.0.0", "go-ipfs": "^0.12.0", "interface-blockstore-tests": "^4.0.0", - "interface-ipfs-core": "^0.157.0", + "interface-ipfs-core": "^0.158.0", "ipfsd-ctl": "^12.0.3", "iso-url": "^1.0.0", "it-all": "^2.0.0", diff --git a/packages/ipfs-daemon/CHANGELOG.md b/packages/ipfs-daemon/CHANGELOG.md index f464e2044e..9670f1da2a 100644 --- a/packages/ipfs-daemon/CHANGELOG.md +++ b/packages/ipfs-daemon/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.16.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-daemon-v0.15.0...ipfs-daemon-v0.16.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core bumped from ^0.17.0 to ^0.18.0 + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-grpc-server bumped from ^0.11.0 to ^0.12.0 + * ipfs-http-gateway bumped from ^0.12.0 to ^0.13.0 + * ipfs-http-server bumped from ^0.14.0 to ^0.15.0 + ## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-daemon-v0.14.2...ipfs-daemon-v0.15.0) (2022-10-24) diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index dccaff6e1d..b52b07b5b7 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-daemon", - "version": "0.15.0", + "version": "0.16.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-daemon#readme", @@ -66,11 +66,11 @@ "@libp2p/logger": "^2.0.0", "@libp2p/webrtc-star": "^6.0.0", "@mapbox/node-pre-gyp": "^1.0.5", - "ipfs-core": "^0.17.0", - "ipfs-core-types": "^0.13.0", - "ipfs-grpc-server": "^0.11.0", - "ipfs-http-gateway": "^0.12.0", - "ipfs-http-server": "^0.14.0", + "ipfs-core": "^0.18.0", + "ipfs-core-types": "^0.14.0", + "ipfs-grpc-server": "^0.12.0", + "ipfs-http-gateway": "^0.13.0", + "ipfs-http-server": "^0.15.0", "ipfs-utils": "^9.0.13", "libp2p": "^0.42.0" }, diff --git a/packages/ipfs-grpc-client/CHANGELOG.md b/packages/ipfs-grpc-client/CHANGELOG.md index b7412886fa..2e2da0559d 100644 --- a/packages/ipfs-grpc-client/CHANGELOG.md +++ b/packages/ipfs-grpc-client/CHANGELOG.md @@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.13.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-client-v0.12.0...ipfs-grpc-client-v0.13.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-core-utils bumped from ^0.17.0 to ^0.18.0 + * ipfs-grpc-protocol bumped from ^0.7.0 to ^0.8.0 + ## [0.12.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-client-v0.11.1...ipfs-grpc-client-v0.12.0) (2022-10-24) diff --git a/packages/ipfs-grpc-client/package.json b/packages/ipfs-grpc-client/package.json index 9af0f2d6d9..d9b40048e6 100644 --- a/packages/ipfs-grpc-client/package.json +++ b/packages/ipfs-grpc-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-grpc-client", - "version": "0.12.0", + "version": "0.13.0", "description": "A client library for the IPFS gRPC API", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-grpc-client#readme", @@ -74,9 +74,9 @@ "@multiformats/multiaddr": "^11.0.0", "change-case": "^4.1.1", "err-code": "^3.0.1", - "ipfs-core-types": "^0.13.0", - "ipfs-core-utils": "^0.17.0", - "ipfs-grpc-protocol": "^0.7.0", + "ipfs-core-types": "^0.14.0", + "ipfs-core-utils": "^0.18.0", + "ipfs-grpc-protocol": "^0.8.0", "ipfs-unixfs": "^9.0.0", "it-first": "^2.0.0", "it-pushable": "^3.0.0", diff --git a/packages/ipfs-grpc-protocol/CHANGELOG.md b/packages/ipfs-grpc-protocol/CHANGELOG.md index b589a006d5..b0b5823591 100644 --- a/packages/ipfs-grpc-protocol/CHANGELOG.md +++ b/packages/ipfs-grpc-protocol/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-protocol-v0.7.0...ipfs-grpc-protocol-v0.8.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + ## [0.7.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-protocol-v0.6.0...ipfs-grpc-protocol-v0.7.0) (2022-09-06) diff --git a/packages/ipfs-grpc-protocol/package.json b/packages/ipfs-grpc-protocol/package.json index 61a7663823..52d745e1a4 100644 --- a/packages/ipfs-grpc-protocol/package.json +++ b/packages/ipfs-grpc-protocol/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-grpc-protocol", - "version": "0.7.0", + "version": "0.8.0", "description": "Protobuf definitions for the IPFS gRPC API", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-grpc-protocol#readme", diff --git a/packages/ipfs-grpc-server/CHANGELOG.md b/packages/ipfs-grpc-server/CHANGELOG.md index b2d30683e7..d8444e244f 100644 --- a/packages/ipfs-grpc-server/CHANGELOG.md +++ b/packages/ipfs-grpc-server/CHANGELOG.md @@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.12.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-server-v0.11.0...ipfs-grpc-server-v0.12.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-grpc-protocol bumped from ^0.7.0 to ^0.8.0 + * devDependencies + * ipfs-core bumped from ^0.17.0 to ^0.18.0 + ## [0.11.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-grpc-server-v0.10.1...ipfs-grpc-server-v0.11.0) (2022-10-24) diff --git a/packages/ipfs-grpc-server/package.json b/packages/ipfs-grpc-server/package.json index 8fea82fd12..c4778abd3e 100644 --- a/packages/ipfs-grpc-server/package.json +++ b/packages/ipfs-grpc-server/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-grpc-server", - "version": "0.11.0", + "version": "0.12.0", "description": "A server library for the IPFS gRPC API", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-grpc-server#readme", @@ -69,8 +69,8 @@ "@multiformats/multiaddr": "^11.0.0", "change-case": "^4.1.1", "coercer": "^1.1.2", - "ipfs-core-types": "^0.13.0", - "ipfs-grpc-protocol": "^0.7.0", + "ipfs-core-types": "^0.14.0", + "ipfs-grpc-protocol": "^0.8.0", "it-first": "^2.0.0", "it-map": "^2.0.0", "it-peekable": "^2.0.0", @@ -84,7 +84,7 @@ "devDependencies": { "@types/ws": "^8.5.3", "aegir": "^37.11.0", - "ipfs-core": "^0.17.0", + "ipfs-core": "^0.18.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", "sinon": "^15.0.1" diff --git a/packages/ipfs-http-client/CHANGELOG.md b/packages/ipfs-http-client/CHANGELOG.md index db033b37cb..2d80f89662 100644 --- a/packages/ipfs-http-client/CHANGELOG.md +++ b/packages/ipfs-http-client/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [60.0.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-client-v59.0.0...ipfs-http-client-v60.0.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-core-utils bumped from ^0.17.0 to ^0.18.0 + ## [59.0.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-client-v58.0.1...ipfs-http-client-v59.0.0) (2022-10-24) diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index 690671a5af..ce2219a4bf 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-client", - "version": "59.0.0", + "version": "60.0.0", "description": "A client library for the IPFS HTTP API", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme", @@ -76,8 +76,8 @@ "any-signal": "^3.0.0", "dag-jose": "^4.0.0", "err-code": "^3.0.1", - "ipfs-core-types": "^0.13.0", - "ipfs-core-utils": "^0.17.0", + "ipfs-core-types": "^0.14.0", + "ipfs-core-utils": "^0.18.0", "ipfs-utils": "^9.0.13", "it-first": "^2.0.0", "it-last": "^2.0.0", diff --git a/packages/ipfs-http-gateway/CHANGELOG.md b/packages/ipfs-http-gateway/CHANGELOG.md index 3ca7dff416..39d7460bcf 100644 --- a/packages/ipfs-http-gateway/CHANGELOG.md +++ b/packages/ipfs-http-gateway/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.13.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-gateway-v0.12.0...ipfs-http-gateway-v0.13.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-http-response bumped from ^5.0.0 to ^6.0.0 + ## [0.12.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-gateway-v0.11.1...ipfs-http-gateway-v0.12.0) (2022-10-24) diff --git a/packages/ipfs-http-gateway/package.json b/packages/ipfs-http-gateway/package.json index 399d4c23f7..c46f6316b2 100644 --- a/packages/ipfs-http-gateway/package.json +++ b/packages/ipfs-http-gateway/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-gateway", - "version": "0.12.0", + "version": "0.13.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-gateway#readme", @@ -73,8 +73,8 @@ "@libp2p/logger": "^2.0.0", "@multiformats/uri-to-multiaddr": "^7.0.0", "hapi-pino": "^8.5.0", - "ipfs-core-types": "^0.13.0", - "ipfs-http-response": "^5.0.0", + "ipfs-core-types": "^0.14.0", + "ipfs-http-response": "^6.0.0", "is-ipfs": "^8.0.0", "it-last": "^2.0.0", "it-to-stream": "^1.0.0", diff --git a/packages/ipfs-http-response/CHANGELOG.md b/packages/ipfs-http-response/CHANGELOG.md index fbcc75134e..fef88168a6 100644 --- a/packages/ipfs-http-response/CHANGELOG.md +++ b/packages/ipfs-http-response/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.0.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-response-v5.0.0...ipfs-http-response-v6.0.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * ipfs-core bumped from ^0.17.0 to ^0.18.0 + ## [5.0.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-response-v4.0.1...ipfs-http-response-v5.0.0) (2022-10-24) diff --git a/packages/ipfs-http-response/package.json b/packages/ipfs-http-response/package.json index 0ccf1be840..c02f3fa0f5 100644 --- a/packages/ipfs-http-response/package.json +++ b/packages/ipfs-http-response/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-response", - "version": "5.0.0", + "version": "6.0.0", "description": "Creates an HTTP response from an IPFS Hash", "author": "Vasco Santos ", "license": "Apache-2.0 OR MIT", @@ -81,7 +81,7 @@ "@types/mime-types": "^2.1.1", "aegir": "^37.11.0", "get-stream": "^6.0.0", - "ipfs-core": "^0.17.0", + "ipfs-core": "^0.18.0", "ipfsd-ctl": "^12.0.3", "it-all": "^2.0.0", "uint8arrays": "^4.0.2" diff --git a/packages/ipfs-http-server/CHANGELOG.md b/packages/ipfs-http-server/CHANGELOG.md index 675af7d1a6..db2e62bb6a 100644 --- a/packages/ipfs-http-server/CHANGELOG.md +++ b/packages/ipfs-http-server/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-server-v0.14.0...ipfs-http-server-v0.15.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-core-utils bumped from ^0.17.0 to ^0.18.0 + * ipfs-http-gateway bumped from ^0.12.0 to ^0.13.0 + * devDependencies + * ipfs-http-client bumped from ^59.0.0 to ^60.0.0 + ## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-http-server-v0.13.2...ipfs-http-server-v0.14.0) (2022-10-24) diff --git a/packages/ipfs-http-server/package.json b/packages/ipfs-http-server/package.json index 2a04338fde..ccf1c08bca 100644 --- a/packages/ipfs-http-server/package.json +++ b/packages/ipfs-http-server/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-http-server", - "version": "0.14.0", + "version": "0.15.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-server#readme", @@ -77,9 +77,9 @@ "any-signal": "^3.0.0", "dlv": "^1.1.3", "hapi-pino": "^8.5.0", - "ipfs-core-types": "^0.13.0", - "ipfs-core-utils": "^0.17.0", - "ipfs-http-gateway": "^0.12.0", + "ipfs-core-types": "^0.14.0", + "ipfs-core-utils": "^0.18.0", + "ipfs-http-gateway": "^0.13.0", "ipfs-unixfs": "^9.0.0", "it-all": "^2.0.0", "it-drain": "^2.0.0", @@ -106,7 +106,7 @@ "aegir": "^37.11.0", "err-code": "^3.0.1", "form-data": "^4.0.0", - "ipfs-http-client": "^59.0.0", + "ipfs-http-client": "^60.0.0", "iso-random-stream": "^2.0.2", "it-first": "^2.0.0", "it-to-buffer": "^3.0.0", diff --git a/packages/ipfs-message-port-client/CHANGELOG.md b/packages/ipfs-message-port-client/CHANGELOG.md index f5daada84f..c089cb6ea3 100644 --- a/packages/ipfs-message-port-client/CHANGELOG.md +++ b/packages/ipfs-message-port-client/CHANGELOG.md @@ -3,6 +3,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-client-v0.14.0...ipfs-message-port-client-v0.15.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-message-port-protocol bumped from ^0.14.0 to ^0.15.0 + * devDependencies + * interface-ipfs-core bumped from ^0.157.0 to ^0.158.0 + * ipfs-core bumped from ^0.17.0 to ^0.18.0 + * ipfs-message-port-server bumped from ^0.14.0 to ^0.15.0 + ## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-client-v0.13.1...ipfs-message-port-client-v0.14.0) (2022-10-24) diff --git a/packages/ipfs-message-port-client/package.json b/packages/ipfs-message-port-client/package.json index 5c5b4ba982..a2cfafeaa9 100644 --- a/packages/ipfs-message-port-client/package.json +++ b/packages/ipfs-message-port-client/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-message-port-client", - "version": "0.14.0", + "version": "0.15.0", "description": "IPFS client library for accessing IPFS node over message port", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-client#readme", @@ -66,16 +66,16 @@ "dependencies": { "browser-readablestream-to-it": "^2.0.0", "err-code": "^3.0.1", - "ipfs-core-types": "^0.13.0", - "ipfs-message-port-protocol": "^0.14.0", + "ipfs-core-types": "^0.14.0", + "ipfs-message-port-protocol": "^0.15.0", "ipfs-unixfs": "^9.0.0", "it-peekable": "^2.0.0", "multiformats": "^11.0.0" }, "devDependencies": { "aegir": "^37.11.0", - "interface-ipfs-core": "^0.157.0", - "ipfs-core": "^0.17.0", - "ipfs-message-port-server": "^0.14.0" + "interface-ipfs-core": "^0.158.0", + "ipfs-core": "^0.18.0", + "ipfs-message-port-server": "^0.15.0" } } diff --git a/packages/ipfs-message-port-protocol/CHANGELOG.md b/packages/ipfs-message-port-protocol/CHANGELOG.md index 5512f5d061..936312c17a 100644 --- a/packages/ipfs-message-port-protocol/CHANGELOG.md +++ b/packages/ipfs-message-port-protocol/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-protocol-v0.14.0...ipfs-message-port-protocol-v0.15.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + ## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-protocol-v0.13.1...ipfs-message-port-protocol-v0.14.0) (2022-10-24) diff --git a/packages/ipfs-message-port-protocol/package.json b/packages/ipfs-message-port-protocol/package.json index d94258470a..da28d7c388 100644 --- a/packages/ipfs-message-port-protocol/package.json +++ b/packages/ipfs-message-port-protocol/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-message-port-protocol", - "version": "0.14.0", + "version": "0.15.0", "description": "IPFS client/server protocol over message port", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-protocol#readme", @@ -87,7 +87,7 @@ "dep-check": "aegir dep-check -i ipfs-core-types" }, "dependencies": { - "ipfs-core-types": "^0.13.0", + "ipfs-core-types": "^0.14.0", "multiformats": "^11.0.0" }, "devDependencies": { diff --git a/packages/ipfs-message-port-server/CHANGELOG.md b/packages/ipfs-message-port-server/CHANGELOG.md index e8c8d4f89b..1bf6a2cd17 100644 --- a/packages/ipfs-message-port-server/CHANGELOG.md +++ b/packages/ipfs-message-port-server/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.15.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-server-v0.14.0...ipfs-message-port-server-v0.15.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-message-port-protocol bumped from ^0.14.0 to ^0.15.0 + ## [0.14.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-message-port-server-v0.13.1...ipfs-message-port-server-v0.14.0) (2022-10-24) diff --git a/packages/ipfs-message-port-server/package.json b/packages/ipfs-message-port-server/package.json index 9e74d49ccf..22c38dea22 100644 --- a/packages/ipfs-message-port-server/package.json +++ b/packages/ipfs-message-port-server/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-message-port-server", - "version": "0.14.0", + "version": "0.15.0", "description": "IPFS server library for exposing IPFS node over message port", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-message-port-server#readme", @@ -92,8 +92,8 @@ "dep-check": "aegir dep-check -i ipfs-core-types" }, "dependencies": { - "ipfs-core-types": "^0.13.0", - "ipfs-message-port-protocol": "^0.14.0", + "ipfs-core-types": "^0.14.0", + "ipfs-message-port-protocol": "^0.15.0", "it-all": "^2.0.0" }, "devDependencies": { diff --git a/packages/ipfs/CHANGELOG.md b/packages/ipfs/CHANGELOG.md index 7e4ba52a9e..53ab9e64bb 100644 --- a/packages/ipfs/CHANGELOG.md +++ b/packages/ipfs/CHANGELOG.md @@ -4,6 +4,31 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.66.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-v0.65.0...ipfs-v0.66.0) (2023-01-11) + + +### ⚠ BREAKING CHANGES + +* update multiformats to v11.x.x and related depenendcies (#4277) + +### Bug Fixes + +* update multiformats to v11.x.x and related depenendcies ([#4277](https://www.github.com/ipfs/js-ipfs/issues/4277)) ([521c84a](https://www.github.com/ipfs/js-ipfs/commit/521c84a958b04d61702577a5adce28519c1b2a3b)) +* use aegir to publish RCs ([#4284](https://www.github.com/ipfs/js-ipfs/issues/4284)) ([6d90cbf](https://www.github.com/ipfs/js-ipfs/commit/6d90cbf321a7dbf4b1084ba20f0c514dc08d8d0a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * ipfs-cli bumped from ^0.15.0 to ^0.16.0 + * ipfs-core bumped from ^0.17.0 to ^0.18.0 + * devDependencies + * interface-ipfs-core bumped from ^0.157.0 to ^0.158.0 + * ipfs-client bumped from ^0.9.2 to ^0.10.0 + * ipfs-core-types bumped from ^0.13.0 to ^0.14.0 + * ipfs-http-client bumped from ^59.0.0 to ^60.0.0 + ## [0.65.0](https://www.github.com/ipfs/js-ipfs/compare/ipfs-v0.64.2...ipfs-v0.65.0) (2022-10-24) diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index bb75779efb..954d50d58d 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -1,6 +1,6 @@ { "name": "ipfs", - "version": "0.65.0", + "version": "0.66.0", "description": "JavaScript implementation of the IPFS specification", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs#readme", @@ -77,8 +77,8 @@ }, "dependencies": { "@libp2p/logger": "^2.0.0", - "ipfs-cli": "^0.15.0", - "ipfs-core": "^0.17.0", + "ipfs-cli": "^0.16.0", + "ipfs-core": "^0.18.0", "semver": "^7.3.2", "update-notifier": "^6.0.0" }, @@ -90,10 +90,10 @@ "aegir": "^37.11.0", "cross-env": "^7.0.0", "go-ipfs": "^0.12.0", - "interface-ipfs-core": "^0.157.0", - "ipfs-client": "^0.9.2", - "ipfs-core-types": "^0.13.0", - "ipfs-http-client": "^59.0.0", + "interface-ipfs-core": "^0.158.0", + "ipfs-client": "^0.10.0", + "ipfs-core-types": "^0.14.0", + "ipfs-http-client": "^60.0.0", "ipfs-interop": "ipfs/interop#deps/update-multiformats", "ipfs-utils": "^9.0.13", "ipfsd-ctl": "^12.0.3", From 6eeb1be57c8366b82351030e49a5886d1aff8bf6 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Fri, 13 Jan 2023 17:55:03 +0000 Subject: [PATCH 24/28] deps(dev): update interop, ipfsd-ctl and kubo-rpc-client (#4294) Update deps to use latest multiformats --- package.json | 1 - packages/ipfs-core/package.json | 2 +- packages/ipfs-http-client/package.json | 2 +- packages/ipfs-http-response/package.json | 2 +- packages/ipfs/package.json | 6 +++--- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 2975d4486f..e65d38e81a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ }, "devDependencies": { "aegir": "^37.11.0", - "node-fetch": "npm:@achingbrain/node-fetch@^2.6.4", "npm-run-all": "^4.1.5" }, "eslintConfig": { diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 1b0ccc59ff..3c5f53597e 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -158,7 +158,7 @@ "go-ipfs": "^0.12.0", "interface-blockstore-tests": "^4.0.0", "interface-ipfs-core": "^0.158.0", - "ipfsd-ctl": "^12.0.3", + "ipfsd-ctl": "^13.0.0", "iso-url": "^1.0.0", "it-all": "^2.0.0", "nanoid": "^4.0.0", diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index ce2219a4bf..9129c71528 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -91,7 +91,7 @@ "aegir": "^37.11.0", "delay": "^5.0.0", "go-ipfs": "^0.12.0", - "ipfsd-ctl": "^12.0.3", + "ipfsd-ctl": "^13.0.0", "it-all": "^2.0.0", "it-first": "^2.0.0", "nock": "^13.0.2", diff --git a/packages/ipfs-http-response/package.json b/packages/ipfs-http-response/package.json index c02f3fa0f5..cc2c7cb3af 100644 --- a/packages/ipfs-http-response/package.json +++ b/packages/ipfs-http-response/package.json @@ -82,7 +82,7 @@ "aegir": "^37.11.0", "get-stream": "^6.0.0", "ipfs-core": "^0.18.0", - "ipfsd-ctl": "^12.0.3", + "ipfsd-ctl": "^13.0.0", "it-all": "^2.0.0", "uint8arrays": "^4.0.2" }, diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index 954d50d58d..5f7b6c4ea4 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -94,11 +94,11 @@ "ipfs-client": "^0.10.0", "ipfs-core-types": "^0.14.0", "ipfs-http-client": "^60.0.0", - "ipfs-interop": "ipfs/interop#deps/update-multiformats", + "ipfs-interop": "^10.0.0", "ipfs-utils": "^9.0.13", - "ipfsd-ctl": "^12.0.3", + "ipfsd-ctl": "^13.0.0", "iso-url": "^1.0.0", - "kubo-rpc-client": "^2.0.2", + "kubo-rpc-client": "^3.0.0", "merge-options": "^3.0.4", "mock-ipfs-pinning-service": "^0.4.2", "url": "^0.11.0" From c5e76b766e66bdf390425df5bb3e50f65bbec846 Mon Sep 17 00:00:00 2001 From: Daniel Norman <1992255+2color@users.noreply.github.com> Date: Tue, 17 Jan 2023 10:25:38 +0100 Subject: [PATCH 25/28] update-ipfs-http-client (#4293) --- packages/ipfs-http-client/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/ipfs-http-client/README.md b/packages/ipfs-http-client/README.md index 0b4d457a45..01e2527dd0 100644 --- a/packages/ipfs-http-client/README.md +++ b/packages/ipfs-http-client/README.md @@ -6,7 +6,10 @@ [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) [![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) -> A client library for the IPFS HTTP API +> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs. + + +> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client). ## Table of contents @@ -51,7 +54,7 @@ $ npm i ipfs-http-client IPFS http client lib logo -

The JavaScript HTTP RPC API client library for IPFS implementations.

+

The JavaScript HTTP RPC API client library for js-ipfs.

From ab02e8f8b3cf8f4eeb9991fef3b0104728ced675 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 17 Jan 2023 11:33:59 +0000 Subject: [PATCH 26/28] docs: update readmes to fix ci badges (#4296) Update readme badges and align dep versions --- packages/interface-ipfs-core/README.md | 7 +++---- packages/interface-ipfs-core/package.json | 4 ++-- packages/ipfs-cli/README.md | 7 +++---- packages/ipfs-cli/package.json | 4 ++-- packages/ipfs-client/README.md | 7 +++---- packages/ipfs-core-config/README.md | 7 +++---- packages/ipfs-core-config/package.json | 2 +- packages/ipfs-core-types/README.md | 7 +++---- packages/ipfs-core-types/package.json | 4 ++-- packages/ipfs-core-utils/README.md | 16 ++++++++++++---- packages/ipfs-core-utils/package.json | 4 ++-- packages/ipfs-core/README.md | 16 ++++++++++++---- packages/ipfs-core/package.json | 4 ++-- packages/ipfs-daemon/README.md | 7 +++---- packages/ipfs-daemon/package.json | 2 +- packages/ipfs-grpc-client/README.md | 16 ++++++++++++---- packages/ipfs-grpc-client/package.json | 4 ++-- packages/ipfs-grpc-protocol/README.md | 7 +++---- packages/ipfs-grpc-server/README.md | 7 +++---- packages/ipfs-grpc-server/package.json | 4 ++-- packages/ipfs-http-client/README.md | 18 +++++++++++++----- packages/ipfs-http-client/package.json | 4 ++-- packages/ipfs-http-gateway/README.md | 7 +++---- packages/ipfs-http-gateway/package.json | 2 +- .../ipfs-http-gateway/src/resources/gateway.js | 8 ++++---- packages/ipfs-http-response/README.md | 7 +++---- packages/ipfs-http-response/package.json | 2 +- packages/ipfs-http-server/README.md | 7 +++---- packages/ipfs-http-server/package.json | 6 +++--- packages/ipfs-message-port-client/README.md | 7 +++---- packages/ipfs-message-port-protocol/README.md | 16 ++++++++++++---- packages/ipfs-message-port-server/README.md | 16 ++++++++++++---- packages/ipfs/README.md | 7 +++---- packages/ipfs/package.json | 2 +- 34 files changed, 140 insertions(+), 105 deletions(-) diff --git a/packages/interface-ipfs-core/README.md b/packages/interface-ipfs-core/README.md index 4e5b8b7989..f401a04cc6 100644 --- a/packages/interface-ipfs-core/README.md +++ b/packages/interface-ipfs-core/README.md @@ -1,10 +1,9 @@ # interface-ipfs-core -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > A test suite and interface you can use to implement a IPFS core interface. diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index f3769d2684..1fe11ae1ef 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -69,11 +69,11 @@ "@ipld/dag-pb": "^4.0.0", "@libp2p/crypto": "^1.0.7", "@libp2p/interface-peer-id": "^2.0.0", - "@libp2p/interfaces": "^3.0.3", + "@libp2p/interfaces": "^3.2.0", "@libp2p/peer-id": "^2.0.0", "@libp2p/peer-id-factory": "^2.0.0", "@libp2p/websockets": "^5.0.0", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "@types/node": "^18.0.0", "@types/pako": "^2.0.0", "@types/readable-stream": "^2.3.13", diff --git a/packages/ipfs-cli/README.md b/packages/ipfs-cli/README.md index 1ec7e2843e..e45771d85f 100644 --- a/packages/ipfs-cli/README.md +++ b/packages/ipfs-cli/README.md @@ -1,10 +1,9 @@ # ipfs-cli -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index f710bc1011..1a16285f65 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -70,10 +70,10 @@ "@ipld/dag-cbor": "^9.0.0", "@ipld/dag-json": "^10.0.0", "@ipld/dag-pb": "^4.0.0", - "@libp2p/logger": "^2.0.2", + "@libp2p/logger": "^2.0.5", "@libp2p/peer-id": "^2.0.0", "@multiformats/mafmt": "^11.0.2", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "@multiformats/multiaddr-to-uri": "^9.0.1", "byteman": "^1.3.5", "execa": "^6.1.0", diff --git a/packages/ipfs-client/README.md b/packages/ipfs-client/README.md index 468fcc47aa..dc0a886737 100644 --- a/packages/ipfs-client/README.md +++ b/packages/ipfs-client/README.md @@ -1,10 +1,9 @@ # ipfs-client -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > A client library to talk to local IPFS daemons diff --git a/packages/ipfs-core-config/README.md b/packages/ipfs-core-config/README.md index 14218e9c74..df34edc39b 100644 --- a/packages/ipfs-core-config/README.md +++ b/packages/ipfs-core-config/README.md @@ -1,10 +1,9 @@ # ipfs-core-config -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > Package to store node and browser specific config for ipfs-core diff --git a/packages/ipfs-core-config/package.json b/packages/ipfs-core-config/package.json index 4702c1a7dc..c61f13a98c 100644 --- a/packages/ipfs-core-config/package.json +++ b/packages/ipfs-core-config/package.json @@ -96,7 +96,7 @@ "dependencies": { "@chainsafe/libp2p-gossipsub": "^6.0.0", "@libp2p/floodsub": "^6.0.0", - "@libp2p/logger": "^2.0.2", + "@libp2p/logger": "^2.0.5", "@libp2p/mdns": "^6.0.0", "@libp2p/prometheus-metrics": "^1.0.1", "@libp2p/tcp": "^6.0.2", diff --git a/packages/ipfs-core-types/README.md b/packages/ipfs-core-types/README.md index 74084e05de..f9f6624677 100644 --- a/packages/ipfs-core-types/README.md +++ b/packages/ipfs-core-types/README.md @@ -1,10 +1,9 @@ # ipfs-core-types -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > IPFS interface definitions used by implementations for API compatibility. diff --git a/packages/ipfs-core-types/package.json b/packages/ipfs-core-types/package.json index c392bbd4e0..738b7e2907 100644 --- a/packages/ipfs-core-types/package.json +++ b/packages/ipfs-core-types/package.json @@ -25,7 +25,7 @@ "types": "./dist/src/index.d.ts", "files": [ "src", - "dist/src", + "dist", "!dist/test", "!**/*.tsbuildinfo" ], @@ -52,7 +52,7 @@ "@libp2p/interface-peer-id": "^2.0.0", "@libp2p/interface-peer-info": "^1.0.2", "@libp2p/interface-pubsub": "^3.0.0", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "@types/node": "^18.0.0", "interface-datastore": "^7.0.0", "ipfs-unixfs": "^9.0.0", diff --git a/packages/ipfs-core-utils/README.md b/packages/ipfs-core-utils/README.md index 5a3d3c05b4..efc55a0e04 100644 --- a/packages/ipfs-core-utils/README.md +++ b/packages/ipfs-core-utils/README.md @@ -1,16 +1,16 @@ # ipfs-core-utils -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > Package to share code between ipfs and ipfs-http-client ## Table of contents - [Install](#install) + - [Browser ` +``` + ## License Licensed under either of diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index d523501bb0..af2451492c 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -140,8 +140,8 @@ "build": "aegir build" }, "dependencies": { - "@libp2p/logger": "^2.0.0", - "@multiformats/multiaddr": "^11.0.0", + "@libp2p/logger": "^2.0.5", + "@multiformats/multiaddr": "^11.1.5", "@multiformats/multiaddr-to-uri": "^9.0.1", "any-signal": "^3.0.0", "blob-to-it": "^2.0.0", diff --git a/packages/ipfs-core/README.md b/packages/ipfs-core/README.md index d690536b65..b29a10a0e2 100644 --- a/packages/ipfs-core/README.md +++ b/packages/ipfs-core/README.md @@ -1,16 +1,16 @@ # ipfs-core -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification ## Table of contents - - [Install](#install) + - [Browser ` +``` +

IPFS in JavaScript logo diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 3c5f53597e..2a2547f54f 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -80,7 +80,7 @@ "@ipld/dag-json": "^10.0.0", "@ipld/dag-pb": "^4.0.0", "@libp2p/bootstrap": "^6.0.0", - "@libp2p/crypto": "^1.0.0", + "@libp2p/crypto": "^1.0.7", "@libp2p/delegated-content-routing": "^4.0.0", "@libp2p/delegated-peer-routing": "^4.0.0", "@libp2p/interface-dht": "^2.0.0", @@ -121,7 +121,7 @@ "ipfs-unixfs": "^9.0.0", "ipfs-unixfs-exporter": "^10.0.0", "ipfs-unixfs-importer": "^12.0.0", - "ipfs-utils": "^9.0.9", + "ipfs-utils": "^9.0.13", "ipns": "^5.0.1", "is-domain-name": "^1.0.1", "is-ipfs": "^8.0.0", diff --git a/packages/ipfs-daemon/README.md b/packages/ipfs-daemon/README.md index bff80307a2..e0fb7f109c 100644 --- a/packages/ipfs-daemon/README.md +++ b/packages/ipfs-daemon/README.md @@ -1,10 +1,9 @@ # ipfs-daemon -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-daemon/package.json b/packages/ipfs-daemon/package.json index b52b07b5b7..b2fb72517e 100644 --- a/packages/ipfs-daemon/package.json +++ b/packages/ipfs-daemon/package.json @@ -63,7 +63,7 @@ "build": "aegir build --no-bundle" }, "dependencies": { - "@libp2p/logger": "^2.0.0", + "@libp2p/logger": "^2.0.5", "@libp2p/webrtc-star": "^6.0.0", "@mapbox/node-pre-gyp": "^1.0.5", "ipfs-core": "^0.18.0", diff --git a/packages/ipfs-grpc-client/README.md b/packages/ipfs-grpc-client/README.md index dc0af12833..e1a4f4398a 100644 --- a/packages/ipfs-grpc-client/README.md +++ b/packages/ipfs-grpc-client/README.md @@ -1,16 +1,16 @@ # ipfs-grpc-client -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > A client library for the IPFS gRPC API ## Table of contents - [Install](#install) + - [Browser ` +``` + This module implements part of the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) using gRPC over websockets to achieve the bidirectional streaming necessary to have full duplex streams running in the browser. It's not recommended you use this directly, instead use the [ipfs-client](https://www.npmjs.com/package/ipfs-client) to combine this with the [ipfs-http-client](https://www.npmjs.com/package/ipfs-http-client) in order to have HTTP fallback for the missing parts of the API. diff --git a/packages/ipfs-grpc-client/package.json b/packages/ipfs-grpc-client/package.json index d9b40048e6..0435b66a15 100644 --- a/packages/ipfs-grpc-client/package.json +++ b/packages/ipfs-grpc-client/package.json @@ -69,9 +69,9 @@ }, "dependencies": { "@improbable-eng/grpc-web": "^0.15.0", - "@libp2p/logger": "^2.0.0", + "@libp2p/logger": "^2.0.5", "@libp2p/peer-id": "^2.0.0", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "change-case": "^4.1.1", "err-code": "^3.0.1", "ipfs-core-types": "^0.14.0", diff --git a/packages/ipfs-grpc-protocol/README.md b/packages/ipfs-grpc-protocol/README.md index cb1a259a93..543e8ebafc 100644 --- a/packages/ipfs-grpc-protocol/README.md +++ b/packages/ipfs-grpc-protocol/README.md @@ -1,10 +1,9 @@ # ipfs-grpc-protocol -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > Protobuf definitions for the IPFS gRPC API diff --git a/packages/ipfs-grpc-server/README.md b/packages/ipfs-grpc-server/README.md index 8cf92e355b..241b842596 100644 --- a/packages/ipfs-grpc-server/README.md +++ b/packages/ipfs-grpc-server/README.md @@ -1,10 +1,9 @@ # ipfs-grpc-server -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > A server library for the IPFS gRPC API diff --git a/packages/ipfs-grpc-server/package.json b/packages/ipfs-grpc-server/package.json index c4778abd3e..f3c9bcba83 100644 --- a/packages/ipfs-grpc-server/package.json +++ b/packages/ipfs-grpc-server/package.json @@ -64,9 +64,9 @@ }, "dependencies": { "@grpc/grpc-js": "^1.1.8", - "@libp2p/logger": "^2.0.0", + "@libp2p/logger": "^2.0.5", "@libp2p/peer-id": "^2.0.0", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "change-case": "^4.1.1", "coercer": "^1.1.2", "ipfs-core-types": "^0.14.0", diff --git a/packages/ipfs-http-client/README.md b/packages/ipfs-http-client/README.md index 01e2527dd0..c409742fbe 100644 --- a/packages/ipfs-http-client/README.md +++ b/packages/ipfs-http-client/README.md @@ -1,10 +1,9 @@ # ipfs-http-client -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs. @@ -14,6 +13,7 @@ ## Table of contents - [Install](#install) + - [Browser ` +``` +

IPFS http client lib logo

diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index 9129c71528..382ee68c22 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -70,9 +70,9 @@ "@ipld/dag-cbor": "^9.0.0", "@ipld/dag-json": "^10.0.0", "@ipld/dag-pb": "^4.0.0", - "@libp2p/logger": "^2.0.0", + "@libp2p/logger": "^2.0.5", "@libp2p/peer-id": "^2.0.0", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "any-signal": "^3.0.0", "dag-jose": "^4.0.0", "err-code": "^3.0.1", diff --git a/packages/ipfs-http-gateway/README.md b/packages/ipfs-http-gateway/README.md index 5d16ba119d..6767bf0fbc 100644 --- a/packages/ipfs-http-gateway/README.md +++ b/packages/ipfs-http-gateway/README.md @@ -1,10 +1,9 @@ # ipfs-http-gateway -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-http-gateway/package.json b/packages/ipfs-http-gateway/package.json index c46f6316b2..fc4cad2b7f 100644 --- a/packages/ipfs-http-gateway/package.json +++ b/packages/ipfs-http-gateway/package.json @@ -70,7 +70,7 @@ "@hapi/ammo": "^5.0.1", "@hapi/boom": "^9.1.0", "@hapi/hapi": "^20.0.0", - "@libp2p/logger": "^2.0.0", + "@libp2p/logger": "^2.0.5", "@multiformats/uri-to-multiaddr": "^7.0.0", "hapi-pino": "^8.5.0", "ipfs-core-types": "^0.14.0", diff --git a/packages/ipfs-http-gateway/src/resources/gateway.js b/packages/ipfs-http-gateway/src/resources/gateway.js index a34183eeb0..3f3e377a6b 100644 --- a/packages/ipfs-http-gateway/src/resources/gateway.js +++ b/packages/ipfs-http-gateway/src/resources/gateway.js @@ -189,15 +189,15 @@ export const Gateway = { // Add headers to successful responses (regular or range) if (response.statusCode === 200 || response.statusCode === 206) { const path = request.path - response.header('X-Ipfs-Path', path) + response.headers['X-Ipfs-Path'] = path if (path.startsWith('/ipfs/')) { // "set modtime to a really long time ago, since files are immutable and should stay cached" // Source: https://github.com/ipfs/go-ipfs/blob/v0.4.20/core/corehttp/gateway_handler.go#L228-L229 - response.header('Last-Modified', 'Thu, 01 Jan 1970 00:00:01 GMT') + response.headers['Last-Modified'] = 'Thu, 01 Jan 1970 00:00:01 GMT' // Suborigin for /ipfs/: https://github.com/ipfs/in-web-browsers/issues/66 const rootCid = path.split('/')[2] const ipfsOrigin = CID.parse(rootCid).toV1().toString(base32) - response.header('Suborigin', `ipfs000${ipfsOrigin}`) + response.headers.Suborigin = `ipfs000${ipfsOrigin}` } else if (path.startsWith('/ipns/')) { // Suborigin for /ipns/: https://github.com/ipfs/in-web-browsers/issues/66 const root = path.split('/')[2] @@ -205,7 +205,7 @@ export const Gateway = { const ipnsOrigin = isIPFS.cid(root) ? CID.parse(root).toV1().toString(base32) : base32.encode(uint8ArrayFromString(root)) - response.header('Suborigin', `ipns000${ipnsOrigin}`) + response.headers.Suborigin = `ipns000${ipnsOrigin}` } } return h.continue diff --git a/packages/ipfs-http-response/README.md b/packages/ipfs-http-response/README.md index 640baa0551..e0c6569075 100644 --- a/packages/ipfs-http-response/README.md +++ b/packages/ipfs-http-response/README.md @@ -1,10 +1,9 @@ # ipfs-http-response -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > Creates an HTTP response from an IPFS Hash diff --git a/packages/ipfs-http-response/package.json b/packages/ipfs-http-response/package.json index cc2c7cb3af..d9a2e076dc 100644 --- a/packages/ipfs-http-response/package.json +++ b/packages/ipfs-http-response/package.json @@ -66,7 +66,7 @@ "dep-check": "aegir dep-check -i global" }, "dependencies": { - "@libp2p/logger": "^2.0.0", + "@libp2p/logger": "^2.0.5", "ejs": "^3.1.6", "file-type": "^18.0.0", "filesize": "^10.0.5", diff --git a/packages/ipfs-http-server/README.md b/packages/ipfs-http-server/README.md index 51f5921326..d7e98e74ed 100644 --- a/packages/ipfs-http-server/README.md +++ b/packages/ipfs-http-server/README.md @@ -1,10 +1,9 @@ # ipfs-http-server -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-http-server/package.json b/packages/ipfs-http-server/package.json index ccf1c08bca..7cccf8a679 100644 --- a/packages/ipfs-http-server/package.json +++ b/packages/ipfs-http-server/package.json @@ -69,10 +69,10 @@ "@hapi/hapi": "^20.0.0", "@ipld/dag-pb": "^4.0.0", "@libp2p/interface-dht": "^2.0.0", - "@libp2p/interfaces": "^3.0.3", - "@libp2p/logger": "^2.0.0", + "@libp2p/interfaces": "^3.2.0", + "@libp2p/logger": "^2.0.5", "@libp2p/peer-id": "^2.0.0", - "@multiformats/multiaddr": "^11.0.0", + "@multiformats/multiaddr": "^11.1.5", "@multiformats/uri-to-multiaddr": "^7.0.0", "any-signal": "^3.0.0", "dlv": "^1.1.3", diff --git a/packages/ipfs-message-port-client/README.md b/packages/ipfs-message-port-client/README.md index dc26cc5566..0852b1b9e7 100644 --- a/packages/ipfs-message-port-client/README.md +++ b/packages/ipfs-message-port-client/README.md @@ -1,10 +1,9 @@ # ipfs-message-port-client -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > IPFS client library for accessing IPFS node over message port diff --git a/packages/ipfs-message-port-protocol/README.md b/packages/ipfs-message-port-protocol/README.md index 1163666874..8fb8ceb05f 100644 --- a/packages/ipfs-message-port-protocol/README.md +++ b/packages/ipfs-message-port-protocol/README.md @@ -1,16 +1,16 @@ # ipfs-message-port-protocol -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > IPFS client/server protocol over message port ## Table of contents - [Install](#install) + - [Browser ` +``` + ## Usage ## Wire protocol codecs diff --git a/packages/ipfs-message-port-server/README.md b/packages/ipfs-message-port-server/README.md index 421259f484..c424b77af6 100644 --- a/packages/ipfs-message-port-server/README.md +++ b/packages/ipfs-message-port-server/README.md @@ -1,16 +1,16 @@ # ipfs-message-port-server -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > IPFS server library for exposing IPFS node over message port ## Table of contents - [Install](#install) + - [Browser ` +``` + ## Usage This library can wrap a JS IPFS node and expose it over the [message channel][]. diff --git a/packages/ipfs/README.md b/packages/ipfs/README.md index 37f6f857b2..a90e0c3fe8 100644 --- a/packages/ipfs/README.md +++ b/packages/ipfs/README.md @@ -1,10 +1,9 @@ # ipfs -[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) +[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) +[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs/package.json b/packages/ipfs/package.json index 5f7b6c4ea4..766c725f60 100644 --- a/packages/ipfs/package.json +++ b/packages/ipfs/package.json @@ -76,7 +76,7 @@ "dep-check": "aegir dep-check -i ipfs-core-types -i @types/*" }, "dependencies": { - "@libp2p/logger": "^2.0.0", + "@libp2p/logger": "^2.0.5", "ipfs-cli": "^0.16.0", "ipfs-core": "^0.18.0", "semver": "^7.3.2", From 3bcabe3818ce8bbbafe0cbb68749b286d8a7edd9 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 17 Jan 2023 15:00:52 +0000 Subject: [PATCH 27/28] chore: fix link to ci results (#4299) Build file is `test.yml` not `js-test-and-release.yml` --- README.md | 2 +- packages/interface-ipfs-core/README.md | 2 +- packages/ipfs-cli/README.md | 2 +- packages/ipfs-client/README.md | 2 +- packages/ipfs-core-config/README.md | 2 +- packages/ipfs-core-types/README.md | 2 +- packages/ipfs-core-utils/README.md | 2 +- packages/ipfs-core/README.md | 2 +- packages/ipfs-daemon/README.md | 2 +- packages/ipfs-grpc-client/README.md | 2 +- packages/ipfs-grpc-protocol/README.md | 2 +- packages/ipfs-grpc-server/README.md | 2 +- packages/ipfs-http-client/README.md | 4 ++-- packages/ipfs-http-gateway/README.md | 2 +- packages/ipfs-http-response/README.md | 2 +- packages/ipfs-http-server/README.md | 2 +- packages/ipfs-message-port-client/README.md | 2 +- packages/ipfs-message-port-protocol/README.md | 2 +- packages/ipfs-message-port-server/README.md | 2 +- packages/ipfs/README.md | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 49da0064e0..fdb29bb110 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

- +

diff --git a/packages/interface-ipfs-core/README.md b/packages/interface-ipfs-core/README.md index f401a04cc6..1faa57c497 100644 --- a/packages/interface-ipfs-core/README.md +++ b/packages/interface-ipfs-core/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > A test suite and interface you can use to implement a IPFS core interface. diff --git a/packages/ipfs-cli/README.md b/packages/ipfs-cli/README.md index e45771d85f..4445a75cc9 100644 --- a/packages/ipfs-cli/README.md +++ b/packages/ipfs-cli/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-client/README.md b/packages/ipfs-client/README.md index dc0a886737..cc76636339 100644 --- a/packages/ipfs-client/README.md +++ b/packages/ipfs-client/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > A client library to talk to local IPFS daemons diff --git a/packages/ipfs-core-config/README.md b/packages/ipfs-core-config/README.md index df34edc39b..272cb0e329 100644 --- a/packages/ipfs-core-config/README.md +++ b/packages/ipfs-core-config/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > Package to store node and browser specific config for ipfs-core diff --git a/packages/ipfs-core-types/README.md b/packages/ipfs-core-types/README.md index f9f6624677..e2fb8e7c15 100644 --- a/packages/ipfs-core-types/README.md +++ b/packages/ipfs-core-types/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > IPFS interface definitions used by implementations for API compatibility. diff --git a/packages/ipfs-core-utils/README.md b/packages/ipfs-core-utils/README.md index efc55a0e04..0e8264bd03 100644 --- a/packages/ipfs-core-utils/README.md +++ b/packages/ipfs-core-utils/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > Package to share code between ipfs and ipfs-http-client diff --git a/packages/ipfs-core/README.md b/packages/ipfs-core/README.md index b29a10a0e2..d617decaeb 100644 --- a/packages/ipfs-core/README.md +++ b/packages/ipfs-core/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-daemon/README.md b/packages/ipfs-daemon/README.md index e0fb7f109c..4b33747691 100644 --- a/packages/ipfs-daemon/README.md +++ b/packages/ipfs-daemon/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-grpc-client/README.md b/packages/ipfs-grpc-client/README.md index e1a4f4398a..0912f358b4 100644 --- a/packages/ipfs-grpc-client/README.md +++ b/packages/ipfs-grpc-client/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > A client library for the IPFS gRPC API diff --git a/packages/ipfs-grpc-protocol/README.md b/packages/ipfs-grpc-protocol/README.md index 543e8ebafc..8713893aa0 100644 --- a/packages/ipfs-grpc-protocol/README.md +++ b/packages/ipfs-grpc-protocol/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > Protobuf definitions for the IPFS gRPC API diff --git a/packages/ipfs-grpc-server/README.md b/packages/ipfs-grpc-server/README.md index 241b842596..288c11a227 100644 --- a/packages/ipfs-grpc-server/README.md +++ b/packages/ipfs-grpc-server/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > A server library for the IPFS gRPC API diff --git a/packages/ipfs-http-client/README.md b/packages/ipfs-http-client/README.md index c409742fbe..c7326806ce 100644 --- a/packages/ipfs-http-client/README.md +++ b/packages/ipfs-http-client/README.md @@ -3,9 +3,9 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) -> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs. +> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs. > Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client). diff --git a/packages/ipfs-http-gateway/README.md b/packages/ipfs-http-gateway/README.md index 6767bf0fbc..0fc2789d88 100644 --- a/packages/ipfs-http-gateway/README.md +++ b/packages/ipfs-http-gateway/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-http-response/README.md b/packages/ipfs-http-response/README.md index e0c6569075..37bb786279 100644 --- a/packages/ipfs-http-response/README.md +++ b/packages/ipfs-http-response/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > Creates an HTTP response from an IPFS Hash diff --git a/packages/ipfs-http-server/README.md b/packages/ipfs-http-server/README.md index d7e98e74ed..5648531849 100644 --- a/packages/ipfs-http-server/README.md +++ b/packages/ipfs-http-server/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification diff --git a/packages/ipfs-message-port-client/README.md b/packages/ipfs-message-port-client/README.md index 0852b1b9e7..5f1b8283b4 100644 --- a/packages/ipfs-message-port-client/README.md +++ b/packages/ipfs-message-port-client/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > IPFS client library for accessing IPFS node over message port diff --git a/packages/ipfs-message-port-protocol/README.md b/packages/ipfs-message-port-protocol/README.md index 8fb8ceb05f..6d1092e9f2 100644 --- a/packages/ipfs-message-port-protocol/README.md +++ b/packages/ipfs-message-port-protocol/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > IPFS client/server protocol over message port diff --git a/packages/ipfs-message-port-server/README.md b/packages/ipfs-message-port-server/README.md index c424b77af6..d0cfe08e33 100644 --- a/packages/ipfs-message-port-server/README.md +++ b/packages/ipfs-message-port-server/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > IPFS server library for exposing IPFS node over message port diff --git a/packages/ipfs/README.md b/packages/ipfs/README.md index a90e0c3fe8..1219fb338a 100644 --- a/packages/ipfs/README.md +++ b/packages/ipfs/README.md @@ -3,7 +3,7 @@ [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs) -[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) +[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster) > JavaScript implementation of the IPFS specification From b64d4af034f27aa7204e57e6a79f95461095502c Mon Sep 17 00:00:00 2001 From: parthshah1 Date: Wed, 1 Feb 2023 02:58:21 -0800 Subject: [PATCH 28/28] docs: update README.md (#4307) Removes out of date link --- packages/ipfs-http-client/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ipfs-http-client/README.md b/packages/ipfs-http-client/README.md index c7326806ce..36f7d1be01 100644 --- a/packages/ipfs-http-client/README.md +++ b/packages/ipfs-http-client/README.md @@ -67,7 +67,6 @@ Loading this module through a script tag will make it's exports available as `Ip

-