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

Commit 521c84a

Browse files
authored
fix!: update multiformats to v11.x.x and related depenendcies (#4277)
`[email protected]` shipped with a [breaking change](multiformats/js-multiformats#230) so update all deps using multiformats to the latest version.
1 parent 6be5906 commit 521c84a

File tree

42 files changed

+298
-382
lines changed

Some content is hidden

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

42 files changed

+298
-382
lines changed

.github/workflows/test.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
with:
5151
node-version: ${{ matrix.node }}
5252
- uses: ipfs/aegir/actions/cache-node-modules@master
53-
- run: npx lerna run test:node --since ${{ github.event.pull_request.base.sha }} --concurrency 1
53+
- run: npm run test:node
5454
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
5555
with:
5656
flags: node
@@ -67,7 +67,7 @@ jobs:
6767
with:
6868
node-version: lts/*
6969
- uses: ipfs/aegir/actions/cache-node-modules@master
70-
- run: npx lerna run test:chrome --since ${{ github.event.pull_request.base.sha }} --concurrency 1
70+
- run: npm run test:chrome
7171
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
7272
with:
7373
flags: chrome
@@ -84,7 +84,7 @@ jobs:
8484
with:
8585
node-version: lts/*
8686
- uses: ipfs/aegir/actions/cache-node-modules@master
87-
- run: npx lerna run test:chrome-webworker --since ${{ github.event.pull_request.base.sha }} --concurrency 1
87+
- run: npm run test:chrome-webworker
8888
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
8989
with:
9090
flags: chrome-webworker
@@ -101,7 +101,7 @@ jobs:
101101
with:
102102
node-version: lts/*
103103
- uses: ipfs/aegir/actions/cache-node-modules@master
104-
- run: npx lerna run test:firefox --since ${{ github.event.pull_request.base.sha }} --concurrency 1
104+
- run: npm run test:firefox
105105
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
106106
with:
107107
flags: firefox
@@ -119,7 +119,7 @@ jobs:
119119
node-version: lts/*
120120
- uses: ipfs/aegir/actions/cache-node-modules@master
121121
- run: npx playwright install --with-deps
122-
- run: npx lerna run test:firefox-webworker --since ${{ github.event.pull_request.base.sha }} --concurrency 1
122+
- run: npm run test:firefox-webworker
123123
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
124124
with:
125125
flags: firefox-webworker
@@ -138,13 +138,14 @@ jobs:
138138
- uses: ipfs/aegir/actions/cache-node-modules@master
139139
- uses: GabrielBB/xvfb-action@v1
140140
with:
141-
run: npx lerna run test:electron-main --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail
141+
run: npm run test:electron-main
142142
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
143143
with:
144144
flags: electron-main
145145

146146
test-interop:
147147
name: Interop tests ${{ matrix.project }} ${{ matrix.type }}
148+
needs: build
148149
runs-on: ubuntu-latest
149150
strategy:
150151
matrix:
@@ -160,9 +161,7 @@ jobs:
160161
with:
161162
node-version: lts/*
162163
- uses: ipfs/aegir/actions/cache-node-modules@master
163-
- run: npm install
164-
- run: npm run build
165-
- run: npx lerna run test:interop --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- -t ${{ matrix.type }} --bail
164+
- run: npm run test:interop -- -- -- -t ${{ matrix.type }}
166165
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
167166
with:
168167
flags: interop-${{ matrix.type }}
@@ -190,7 +189,7 @@ jobs:
190189
node-version: lts/*
191190
- run: npm install
192191
- run: npm run build
193-
- run: npx lerna run ${{ matrix.suite }} --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -t ${{ matrix.type }} --bail
192+
- run: npm run ${{ matrix.suite }} -- -- -t ${{ matrix.type }}
194193
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
195194
with:
196195
flags: interface-${{ matrix.type }}
@@ -208,7 +207,7 @@ jobs:
208207
node-version: lts/*
209208
- uses: ipfs/aegir/actions/cache-node-modules@master
210209
- run: npx playwright install --with-deps
211-
- run: npx lerna run test:interface:message-port-client --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail
210+
- run: npm run test:interface:message-port-client
212211

213212
release:
214213
runs-on: ubuntu-latest

docs/DEVELOPMENT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $ npm install -g npm@latest
3131
> npm install
3232
```
3333

34-
This will install [lerna](https://www.npmjs.com/package/lerna) and bootstrap the various packages, deduping and hoisting dependencies into the root folder.
34+
This will install the dependencies of the various packages, deduping and hoisting dependencies into the root folder.
3535

3636
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.
3737

lerna.json

-23
This file was deleted.

package.json

+27-29
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,39 @@
1717
},
1818
"private": true,
1919
"scripts": {
20-
"link": "lerna link",
21-
"reset": "lerna run clean && rimraf packages/*/node_modules node_modules package-lock.json packages/*/package-lock.json",
22-
"test": "lerna run test",
23-
"test:node": "lerna run test:node",
24-
"test:chrome": "lerna run test:chrome",
25-
"test:chrome-webworker": "lerna run test:chrome-webworker",
26-
"test:firefox": "lerna run test:firefox",
27-
"test:firefox-webworker": "lerna run test:firefox-webworker",
28-
"test:electron-main": "lerna run test:electron-main",
29-
"test:external": "lerna run test:external",
30-
"test:cli": "lerna run test:cli",
31-
"test:interop": "lerna run test:interop",
32-
"test:interface:client": "lerna run test:interface:client",
33-
"test:interface:core": "lerna run test:interface:core",
34-
"test:interface:http-go": "lerna run test:interface:http-go",
35-
"test:interface:http-js": "lerna run test:interface:http-js",
36-
"test:interface:message-port-client": "lerna run test:interface:message-port-client",
37-
"coverage": "lerna run coverage",
38-
"build": "lerna run build",
39-
"clean": "lerna run clean",
40-
"lint": "lerna run lint",
41-
"dep-check": "lerna run dep-check",
20+
"reset": "aegir run clean && aegir clean packages/*/node_modules node_modules package-lock.json packages/*/package-lock.json",
21+
"test": "aegir run test",
22+
"test:node": "aegir run test:node",
23+
"test:chrome": "aegir run test:chrome",
24+
"test:chrome-webworker": "aegir run test:chrome-webworker",
25+
"test:firefox": "aegir run test:firefox",
26+
"test:firefox-webworker": "aegir run test:firefox-webworker",
27+
"test:electron-main": "aegir run test:electron-main",
28+
"test:external": "aegir run test:external",
29+
"test:cli": "aegir run test:cli",
30+
"test:interop": "aegir run test:interop",
31+
"test:interface:client": "aegir run test:interface:client",
32+
"test:interface:core": "aegir run test:interface:core",
33+
"test:interface:http-go": "aegir run test:interface:http-go",
34+
"test:interface:http-js": "aegir run test:interface:http-js",
35+
"test:interface:message-port-client": "aegir run test:interface:message-port-client",
36+
"coverage": "aegir run coverage",
37+
"build": "aegir run build",
38+
"clean": "aegir run clean",
39+
"lint": "aegir run lint",
40+
"dep-check": "aegir run dep-check",
4241
"release": "run-s build npm:release docker:release",
43-
"npm:release": "lerna publish from-package --no-push --no-private --yes",
42+
"npm:release": "aegir publish from-package --no-push --no-private --yes",
4443
"docker:release": "run-s docker:release:*",
4544
"docker:release:build": "docker build . --no-cache --tag js-ipfs:latest --file ./Dockerfile.latest",
4645
"docker:release:tag-latest": "docker tag js-ipfs:latest docker.io/ipfs/js-ipfs:latest",
4746
"docker:release:tag-version": "docker tag js-ipfs:latest docker.io/ipfs/js-ipfs:v`npm show ipfs@latest version -q`",
4847
"docker:release:push-latest": "docker push ipfs/js-ipfs:latest",
4948
"docker:release:push-version": "docker push ipfs/js-ipfs:v`npm show ipfs@latest version -q`",
5049
"release:rc": "run-s npm:rc:* docker:rc",
51-
"npm:rc:version": "lerna version prerelease --preid `git rev-parse --short HEAD` --force-publish --no-push --yes",
50+
"npm:rc:version": "aegir version prerelease --preid `git rev-parse --short HEAD` --force-publish --no-push --yes",
5251
"npm:rc:build": "npm run build",
53-
"npm:rc:publish": "lerna publish from-package --no-push --no-private --dist-tag next --yes",
52+
"npm:rc:publish": "aegir publish from-package --no-push --no-private --dist-tag next --yes",
5453
"docker:rc": "run-s docker:rc:*",
5554
"docker:rc:build": "docker build . --no-cache --tag js-ipfs:next --file ./Dockerfile.next",
5655
"docker:rc:tag-next": "docker tag js-ipfs:next docker.io/ipfs/js-ipfs:next",
@@ -59,10 +58,9 @@
5958
"docker:rc:push-rc": "docker push ipfs/js-ipfs:v`npm show ipfs@next version -q`"
6059
},
6160
"devDependencies": {
62-
"lerna": "^6.0.1",
61+
"aegir": "^37.9.0",
6362
"node-fetch": "npm:@achingbrain/node-fetch@^2.6.4",
64-
"npm-run-all": "^4.1.5",
65-
"rimraf": "^3.0.2"
63+
"npm-run-all": "^4.1.5"
6664
},
6765
"eslintConfig": {
6866
"extends": "ipfs",
@@ -73,4 +71,4 @@
7371
"workspaces": [
7472
"packages/*"
7573
]
76-
}
74+
}

packages/interface-ipfs-core/package.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,31 @@
6565
},
6666
"dependencies": {
6767
"@ipld/car": "^5.0.0",
68-
"@ipld/dag-cbor": "^8.0.0",
69-
"@ipld/dag-pb": "^3.0.0",
70-
"@libp2p/crypto": "^1.0.0",
71-
"@libp2p/interface-peer-id": "^1.0.4",
68+
"@ipld/dag-cbor": "^9.0.0",
69+
"@ipld/dag-pb": "^4.0.0",
70+
"@libp2p/crypto": "^1.0.7",
71+
"@libp2p/interface-peer-id": "^2.0.0",
7272
"@libp2p/interfaces": "^3.0.3",
73-
"@libp2p/peer-id": "^1.1.10",
74-
"@libp2p/peer-id-factory": "^1.0.10",
73+
"@libp2p/peer-id": "^2.0.0",
74+
"@libp2p/peer-id-factory": "^2.0.0",
7575
"@libp2p/websockets": "^5.0.0",
7676
"@multiformats/multiaddr": "^11.0.0",
7777
"@types/node": "^18.0.0",
7878
"@types/pako": "^2.0.0",
7979
"@types/readable-stream": "^2.3.13",
80-
"aegir": "^37.0.11",
81-
"blockstore-core": "^2.0.1",
80+
"aegir": "^37.9.0",
81+
"blockstore-core": "^3.0.0",
8282
"copyfiles": "^2.4.1",
8383
"dag-jose": "^3.0.1",
8484
"delay": "^5.0.0",
8585
"did-jwt": "^6.2.0",
8686
"err-code": "^3.0.1",
8787
"ipfs-core-types": "^0.13.0",
88-
"ipfs-unixfs": "^8.0.0",
89-
"ipfs-unixfs-importer": "^11.0.0",
88+
"ipfs-unixfs": "^9.0.0",
89+
"ipfs-unixfs-importer": "^12.0.0",
9090
"ipfs-utils": "^9.0.6",
91-
"ipns": "^4.0.0",
92-
"is-ipfs": "^7.0.0",
91+
"ipns": "^5.0.1",
92+
"is-ipfs": "^8.0.0",
9393
"iso-random-stream": "^2.0.2",
9494
"it-all": "^2.0.0",
9595
"it-buffer-stream": "^3.0.0",
@@ -103,15 +103,15 @@
103103
"it-tar": "^6.0.0",
104104
"it-to-buffer": "^3.0.0",
105105
"merge-options": "^3.0.4",
106-
"multiformats": "^10.0.0",
106+
"multiformats": "^11.0.0",
107107
"nanoid": "^4.0.0",
108108
"p-defer": "^4.0.0",
109109
"p-map": "^5.3.0",
110110
"p-retry": "^5.1.0",
111111
"p-wait-for": "^5.0.0",
112112
"pako": "^2.0.4",
113113
"readable-stream": "^4.0.0",
114-
"sinon": "^14.0.0",
114+
"sinon": "^15.0.1",
115115
"uint8arrays": "^4.0.2",
116116
"wherearewe": "^2.0.1"
117117
},

packages/ipfs-cli/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@
6767
"build": "aegir build --no-bundle"
6868
},
6969
"dependencies": {
70-
"@ipld/dag-cbor": "^8.0.0",
71-
"@ipld/dag-json": "^9.0.0",
72-
"@ipld/dag-pb": "^3.0.0",
73-
"@libp2p/logger": "^2.0.0",
74-
"@libp2p/peer-id": "^1.1.10",
70+
"@ipld/dag-cbor": "^9.0.0",
71+
"@ipld/dag-json": "^10.0.0",
72+
"@ipld/dag-pb": "^4.0.0",
73+
"@libp2p/logger": "^2.0.2",
74+
"@libp2p/peer-id": "^2.0.0",
7575
"@multiformats/mafmt": "^11.0.2",
7676
"@multiformats/multiaddr": "^11.0.0",
7777
"@multiformats/multiaddr-to-uri": "^9.0.1",
@@ -90,7 +90,7 @@
9090
"it-split": "^2.0.0",
9191
"it-tar": "^6.0.0",
9292
"jsondiffpatch": "^0.4.1",
93-
"multiformats": "^10.0.0",
93+
"multiformats": "^11.0.0",
9494
"parse-duration": "^1.0.0",
9595
"pretty-bytes": "^6.0.0",
9696
"progress": "^2.0.3",
@@ -99,14 +99,14 @@
9999
"yargs": "^17.4.0"
100100
},
101101
"devDependencies": {
102-
"@libp2p/crypto": "^1.0.0",
102+
"@libp2p/crypto": "^1.0.7",
103103
"@types/get-folder-size": "^3.0.1",
104104
"@types/ncp": "^2.0.5",
105105
"@types/progress": "^2.0.3",
106106
"@types/rimraf": "^3.0.1",
107107
"@types/yargs": "^17.0.10",
108-
"aegir": "^37.0.11",
109-
"ipfs-repo": "^16.0.0",
108+
"aegir": "^37.9.0",
109+
"ipfs-repo": "^17.0.0",
110110
"it-all": "^2.0.0",
111111
"it-first": "^2.0.0",
112112
"it-map": "^2.0.0",
@@ -115,7 +115,7 @@
115115
"ncp": "^2.0.0",
116116
"pako": "^2.0.4",
117117
"rimraf": "^3.0.2",
118-
"sinon": "^14.0.0",
118+
"sinon": "^15.0.1",
119119
"string-argv": "^0.3.1",
120120
"temp-write": "^5.0.0"
121121
}

packages/ipfs-cli/src/commands/cid/base32.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import split from 'it-split'
22
import { CID } from 'multiformats/cid'
33
import { base32 } from 'multiformats/bases/base32'
4+
import { toString as uint8arrayToString } from 'uint8arrays/to-string'
45

56
/**
67
* @typedef {object} Argv
@@ -24,7 +25,7 @@ const command = {
2425
}
2526

2627
for await (const data of input) {
27-
const input = data.toString().trim()
28+
const input = (data instanceof Uint8Array ? uint8arrayToString(data) : data).trim()
2829

2930
if (!input) {
3031
continue

packages/ipfs-client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
"merge-options": "^3.0.4"
6767
},
6868
"devDependencies": {
69-
"aegir": "^37.0.11"
69+
"aegir": "^37.9.0"
7070
}
7171
}

packages/ipfs-core-config/package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -94,30 +94,31 @@
9494
"build": "aegir build"
9595
},
9696
"dependencies": {
97-
"@chainsafe/libp2p-gossipsub": "^4.0.0",
98-
"@libp2p/floodsub": "^5.0.0",
97+
"@chainsafe/libp2p-gossipsub": "^5.2.1",
98+
"@libp2p/floodsub": "^6.0.0",
9999
"@libp2p/logger": "^2.0.2",
100-
"@libp2p/mdns": "^5.0.0",
101-
"@libp2p/tcp": "^5.0.0",
102-
"@libp2p/webrtc-star": "^5.0.2",
103-
"blockstore-datastore-adapter": "^4.0.0",
100+
"@libp2p/mdns": "^6.0.0",
101+
"@libp2p/prometheus-metrics": "^1.0.1",
102+
"@libp2p/tcp": "^6.0.2",
103+
"@libp2p/webrtc-star": "^6.0.0",
104+
"blockstore-datastore-adapter": "^5.0.0",
104105
"datastore-core": "^8.0.1",
105106
"datastore-fs": "^8.0.0",
106107
"datastore-level": "^9.0.0",
107108
"err-code": "^3.0.1",
108109
"hashlru": "^2.3.0",
109110
"interface-datastore": "^7.0.0",
110-
"ipfs-repo": "^16.0.0",
111+
"ipfs-repo": "^17.0.0",
111112
"ipfs-utils": "^9.0.6",
112-
"is-ipfs": "^7.0.0",
113+
"is-ipfs": "^8.0.0",
113114
"it-all": "^2.0.0",
114115
"it-drain": "^2.0.0",
115116
"it-foreach": "^1.0.0",
116117
"p-queue": "^7.2.0",
117118
"uint8arrays": "^4.0.2"
118119
},
119120
"devDependencies": {
120-
"aegir": "^37.0.11",
121+
"aegir": "^37.9.0",
121122
"ipfs-core-utils": "^0.17.0"
122123
}
123124
}

0 commit comments

Comments
 (0)