diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c9436e3a6..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: @@ -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: 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: npm 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: npm 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: npm 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: npm 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: npm 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,15 +161,14 @@ jobs: with: node-version: lts/* - 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: npm run test:interop -- -- -- -t ${{ matrix.type }} - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: flags: interop-${{ matrix.type }} test-interface: name: Interface tests ${{ matrix.suite }} ${{ matrix.type }} + needs: build runs-on: ubuntu-latest strategy: matrix: @@ -188,9 +188,8 @@ jobs: - uses: actions/setup-node@v2 with: 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 }} + - 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: 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: npm run test:interface:message-port-client -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 + - run: npm run test:interface:message-port-client release: runs-on: ubuntu-latest @@ -263,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/.release-please-manifest.json b/.release-please-manifest.json index da605357c8..87a8dd87be 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.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/README.md b/README.md index 49da0064e0..fdb29bb110 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@
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 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/docs/upgrading/v0.62-v0.63.md b/docs/upgrading/v0.62-v0.63.md index e931a9aa49..ed3dcb1c8e 100644 --- a/docs/upgrading/v0.62-v0.63.md +++ b/docs/upgrading/v0.62-v0.63.md @@ -1,12 +1,13 @@ # 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) + - [TypeScript and ESM](#typescript-and-esm) +- [`libp2p@0.37.x`](#libp2p037x) - [PeerIds](#peerids) - [multiaddrs](#multiaddrs) @@ -34,11 +35,53 @@ 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. -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 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. 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 e9d95e8489..e65d38e81a 100644 --- a/package.json +++ b/package.json @@ -17,40 +17,37 @@ }, "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 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", "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 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", @@ -59,10 +56,8 @@ "docker:rc:push-rc": "docker push ipfs/js-ipfs:v`npm show ipfs@next version -q`" }, "devDependencies": { - "lerna": "^5.0.0", - "node-fetch": "npm:@achingbrain/node-fetch@^2.6.4", - "npm-run-all": "^4.1.5", - "rimraf": "^3.0.2" + "aegir": "^37.11.0", + "npm-run-all": "^4.1.5" }, "eslintConfig": { "extends": "ipfs", diff --git a/packages/interface-ipfs-core/CHANGELOG.md b/packages/interface-ipfs-core/CHANGELOG.md index 858c371c3d..91821881d1 100644 --- a/packages/interface-ipfs-core/CHANGELOG.md +++ b/packages/interface-ipfs-core/CHANGELOG.md @@ -3,6 +3,52 @@ 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) + + +### ⚠ 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/README.md b/packages/interface-ipfs-core/README.md index 4e5b8b7989..1faa57c497 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/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/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index b6fea6e411..1fe11ae1ef 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.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", @@ -64,46 +64,46 @@ "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", - "@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", - "@multiformats/multiaddr": "^11.0.0", + "@ipld/car": "^5.0.0", + "@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.2.0", + "@libp2p/peer-id": "^2.0.0", + "@libp2p/peer-id-factory": "^2.0.0", + "@libp2p/websockets": "^5.0.0", + "@multiformats/multiaddr": "^11.1.5", "@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.11.0", + "blockstore-core": "^3.0.0", "copyfiles": "^2.4.1", - "dag-jose": "^2.0.1", + "dag-jose": "^4.0.0", "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-utils": "^9.0.6", - "ipns": "^3.0.0", - "is-ipfs": "^7.0.0", + "ipfs-core-types": "^0.14.0", + "ipfs-unixfs": "^9.0.0", + "ipfs-unixfs-importer": "^12.0.0", + "ipfs-utils": "^9.0.13", + "ipns": "^5.0.1", + "is-ipfs": "^8.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": "^11.0.0", "nanoid": "^4.0.0", "p-defer": "^4.0.0", "p-map": "^5.3.0", @@ -111,8 +111,9 @@ "p-wait-for": "^5.0.0", "pako": "^2.0.4", "readable-stream": "^4.0.0", - "sinon": "^14.0.0", - "uint8arrays": "^3.0.0" + "sinon": "^15.0.1", + "uint8arrays": "^4.0.2", + "wherearewe": "^2.0.1" }, "browser": { "fs": false, 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/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/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/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 f3c7116ff2..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` @@ -204,8 +203,7 @@ export function testWrite (factory, options) { }) it('writes a small file using an HTML5 Blob (Browser only)', async function () { - if (!global.Blob) { - // @ts-expect-error this is mocha + if (!global.Blob || !global.FileReader) { 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 36270e5e1d..8d7837d250 100644 --- a/packages/interface-ipfs-core/src/miscellaneous/dns.js +++ b/packages/interface-ipfs-core/src/miscellaneous/dns.js @@ -29,14 +29,20 @@ 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/
diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json
index 0b889bb92f..2a2547f54f 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.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",
@@ -74,96 +74,97 @@
"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",
- "@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/interface-keys": "^1.0.3",
- "@libp2p/interface-peer-id": "^1.0.4",
- "@libp2p/interface-transport": "^1.0.2",
- "@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",
+ "@chainsafe/libp2p-noise": "^11.0.0",
+ "@ipld/car": "^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.7",
+ "@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": "^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",
+ "blockstore-core": "^3.0.0",
+ "browser-readablestream-to-it": "^2.0.0",
+ "dag-jose": "^4.0.0",
"datastore-core": "^8.0.1",
- "datastore-pubsub": "^4.0.2",
+ "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": "^12.0.3",
- "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-utils": "^9.0.6",
- "ipns": "^3.0.0",
+ "ipfs-bitswap": "^15.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",
+ "ipfs-unixfs-importer": "^12.0.0",
+ "ipfs-utils": "^9.0.13",
+ "ipns": "^5.0.1",
"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",
+ "is-ipfs": "^8.0.0",
+ "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.42.0",
"merge-options": "^3.0.4",
"mortice": "^3.0.0",
- "multiformats": "^9.5.1",
+ "multiformats": "^11.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",
+ "@chainsafe/libp2p-gossipsub": "^6.0.0",
"@types/dlv": "^1.1.2",
"@types/pako": "^2.0.0",
"@types/rimraf": "^3.0.1",
- "aegir": "^37.0.11",
- "blockstore-datastore-adapter": "^3.0.0",
+ "aegir": "^37.11.0",
+ "blockstore-datastore-adapter": "^5.0.0",
"delay": "^5.0.0",
- "go-ipfs": "^0.12.1",
- "interface-blockstore-tests": "^3.0.0",
- "interface-ipfs-core": "^0.156.1",
- "ipfsd-ctl": "^12.0.3",
+ "go-ipfs": "^0.12.0",
+ "interface-blockstore-tests": "^4.0.0",
+ "interface-ipfs-core": "^0.158.0",
+ "ipfsd-ctl": "^13.0.0",
"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",
- "sinon": "^14.0.0"
+ "sinon": "^15.0.1"
},
"gitHead": ""
}
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
-The JavaScript HTTP RPC API client library for IPFS implementations.
+The JavaScript HTTP RPC API client library for js-ipfs.
diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json
index 42ba926c9c..382ee68c22 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": "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",
@@ -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",
- "@libp2p/logger": "^2.0.0",
- "@libp2p/peer-id": "^1.1.10",
- "@multiformats/multiaddr": "^11.0.0",
+ "@ipld/dag-cbor": "^9.0.0",
+ "@ipld/dag-json": "^10.0.0",
+ "@ipld/dag-pb": "^4.0.0",
+ "@libp2p/logger": "^2.0.5",
+ "@libp2p/peer-id": "^2.0.0",
+ "@multiformats/multiaddr": "^11.1.5",
"any-signal": "^3.0.0",
- "dag-jose": "^2.0.1",
+ "dag-jose": "^4.0.0",
"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",
+ "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",
"merge-options": "^3.0.4",
- "multiformats": "^9.5.1",
+ "multiformats": "^11.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",
+ "aegir": "^37.11.0",
"delay": "^5.0.0",
- "go-ipfs": "^0.12.1",
- "ipfsd-ctl": "^12.0.3",
- "it-all": "^1.0.4",
- "it-first": "^1.0.4",
+ "go-ipfs": "^0.12.0",
+ "ipfsd-ctl": "^13.0.0",
+ "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-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-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/CHANGELOG.md b/packages/ipfs-http-gateway/CHANGELOG.md
index c1775c3dc4..39d7460bcf 100644
--- a/packages/ipfs-http-gateway/CHANGELOG.md
+++ b/packages/ipfs-http-gateway/CHANGELOG.md
@@ -4,6 +4,50 @@ 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)
+
+
+### ⚠ 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/README.md b/packages/ipfs-http-gateway/README.md
index 5d16ba119d..0fc2789d88 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/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-gateway/package.json b/packages/ipfs-http-gateway/package.json
index d3b1c0f41a..fc4cad2b7f 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.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",
@@ -70,23 +70,23 @@
"@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.12.1",
- "ipfs-http-response": "^4.0.1",
- "is-ipfs": "^7.0.0",
- "it-last": "^1.0.4",
+ "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",
"joi": "^17.2.1",
- "multiformats": "^9.5.1",
- "uint8arrays": "^3.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",
- "file-type": "^17.1.1",
- "sinon": "^14.0.0"
+ "aegir": "^37.11.0",
+ "file-type": "^18.0.0",
+ "sinon": "^15.0.1"
}
}
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/CHANGELOG.md b/packages/ipfs-http-response/CHANGELOG.md
index 5cc103b599..fef88168a6 100644
--- a/packages/ipfs-http-response/CHANGELOG.md
+++ b/packages/ipfs-http-response/CHANGELOG.md
@@ -3,6 +3,48 @@
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)
+
+
+### ⚠ 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/README.md b/packages/ipfs-http-response/README.md
index 640baa0551..37bb786279 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/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-response/package.json b/packages/ipfs-http-response/package.json
index 7fa2ca6d0e..d9a2e076dc 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": "6.0.0",
"description": "Creates an HTTP response from an IPFS Hash",
"author": "Vasco Santos