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

Commit

Permalink
fix!: update multiformats to v11.x.x and related depenendcies (#4277)
Browse files Browse the repository at this point in the history
`multiformats@11.x.x` shipped with a [breaking change](multiformats/js-multiformats#230) so update all deps using multiformats to the latest version.
  • Loading branch information
achingbrain committed Jan 9, 2023
1 parent 6be5906 commit 521c84a
Show file tree
Hide file tree
Showing 42 changed files with 298 additions and 382 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
23 changes: 0 additions & 23 deletions lerna.json

This file was deleted.

56 changes: 27 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,39 @@
},
"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",
"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: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",
Expand All @@ -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",
Expand All @@ -73,4 +71,4 @@
"workspaces": [
"packages/*"
]
}
}
28 changes: 14 additions & 14 deletions packages/interface-ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -103,15 +103,15 @@
"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",
"p-retry": "^5.1.0",
"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"
},
Expand Down
20 changes: 10 additions & 10 deletions packages/ipfs-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/ipfs-cli/src/commands/cid/base32.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"merge-options": "^3.0.4"
},
"devDependencies": {
"aegir": "^37.0.11"
"aegir": "^37.9.0"
}
}
19 changes: 10 additions & 9 deletions packages/ipfs-core-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,30 +94,31 @@
"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",
"p-queue": "^7.2.0",
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"aegir": "^37.0.11",
"aegir": "^37.9.0",
"ipfs-core-utils": "^0.17.0"
}
}

0 comments on commit 521c84a

Please sign in to comment.