Skip to content

Commit

Permalink
deps: upgrade aegir to 40.x.x (#1900)
Browse files Browse the repository at this point in the history
Upgrades aegir and fixes linting errors and typedoc config.
  • Loading branch information
achingbrain authored Jul 27, 2023
1 parent a1ec46b commit c999d6a
Show file tree
Hide file tree
Showing 153 changed files with 495 additions and 308 deletions.
6 changes: 3 additions & 3 deletions doc/METRICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class MyClass {
A tracked metric can be created by calling either `registerMetric` on the metrics object:

```ts
import type { Metrics } from '@libp2p/interface-metrics'
import type { Metrics } from '@libp2p/interface/metrics'
import { prometheusMetrics } from '@libp2p/prometheus-metrics'

const metrics: Metrics = prometheusMetrics()()
Expand Down Expand Up @@ -119,7 +119,7 @@ stopTimer()
A metric that is expensive to calculate can be created by passing a `calculate` function that will only be invoked when metrics are being scraped:

```ts
import type { Metrics } from '@libp2p/interface-metrics'
import type { Metrics } from '@libp2p/interface/metrics'
import { prometheusMetrics } from '@libp2p/prometheus-metrics'

const metrics: Metrics = prometheusMetrics()()
Expand All @@ -134,7 +134,7 @@ metrics.registerMetric('my_metric', {
If several metrics should be grouped together (e.g. for graphing purposes) `registerMetricGroup` can be used instead:

```ts
import type { Metrics } from '@libp2p/interface-metrics'
import type { Metrics } from '@libp2p/interface/metrics'
import { prometheusMetrics } from '@libp2p/prometheus-metrics'

const metrics: Metrics = prometheusMetrics()()
Expand Down
7 changes: 2 additions & 5 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,15 @@
}
},
"scripts": {
"clean": "aegir clean",
"lint": "aegir lint",
"build": "aegir build",
"doc-check": "aegir doc-check"
},
"dependencies": {
"@chainsafe/libp2p-yamux": "^4.0.2",
"@libp2p/interface-metrics": "^4.0.8",
"@libp2p/interface": "~0.0.1",
"@libp2p/mplex": "^8.0.4",
"@libp2p/prometheus-metrics": "^1.1.5",
"@libp2p/tcp": "^7.0.3",
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"libp2p": "^0.45.9",
"prom-client": "^14.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/auto-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/websockets": "^6.0.0",
"@multiformats/multiaddr": "^12.1.3",
"libp2p": "^0.45.0"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"execa": "^7.1.1",
"p-defer": "^4.0.0",
"uint8arrays": "^4.0.4"
Expand Down
4 changes: 2 additions & 2 deletions examples/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/peer-id-factory": "^2.0.0",
Expand All @@ -44,7 +44,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"execa": "^7.1.1",
"p-defer": "^4.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/connection-encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/tcp": "^7.0.0",
Expand All @@ -38,7 +38,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
4 changes: 2 additions & 2 deletions examples/delegated-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"start": "react-scripts start"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@libp2p/bootstrap": "^8.0.0",
"@libp2p/delegated-content-routing": "^4.0.0",
"@libp2p/delegated-peer-routing": "^4.0.0",
Expand All @@ -46,7 +46,7 @@
"react-scripts": "^5.0.1"
},
"devDependencies": {
"aegir": "^39.0.13"
"aegir": "^40.0.1"
},
"browserslist": [
">0.2%",
Expand Down
4 changes: 2 additions & 2 deletions examples/discovery-mechanisms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/bootstrap": "^8.0.0",
"@libp2p/floodsub": "^7.0.0",
Expand All @@ -41,7 +41,7 @@
"libp2p": "^0.45.0"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"execa": "^7.1.1",
"p-wait-for": "^5.0.2",
"uint8arrays": "^4.0.4"
Expand Down
4 changes: 2 additions & 2 deletions examples/echo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/peer-id-factory": "^2.0.0",
Expand All @@ -42,7 +42,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"execa": "^7.1.1",
"p-defer": "^4.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/libp2p-in-the-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@chainsafe/libp2p-gossipsub": "^9.0.0",
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/bootstrap": "^8.0.0",
"@libp2p/kad-dht": "^9.0.0",
Expand All @@ -42,7 +42,7 @@
"libp2p": "^0.45.0"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"execa": "^7.1.1",
"playwright": "^1.35.1",
"vite": "^2.8.6"
Expand Down
4 changes: 2 additions & 2 deletions examples/peer-and-content-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/kad-dht": "^9.0.0",
"@libp2p/mplex": "^8.0.0",
Expand All @@ -40,7 +40,7 @@
"multiformats": "^12.0.1"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
4 changes: 2 additions & 2 deletions examples/pnet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/tcp": "^7.0.0",
Expand All @@ -38,7 +38,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
4 changes: 2 additions & 2 deletions examples/protocol-and-stream-muxing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/tcp": "^7.0.0",
Expand All @@ -38,7 +38,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
4 changes: 2 additions & 2 deletions examples/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/floodsub": "^7.0.0",
"@libp2p/mplex": "^8.0.0",
Expand All @@ -38,7 +38,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"execa": "^7.1.1",
"p-defer": "^4.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/transports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:example": "node test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/tcp": "^7.0.0",
Expand All @@ -40,7 +40,7 @@
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
7 changes: 4 additions & 3 deletions interop/BrowserDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ FROM mcr.microsoft.com/playwright

COPY --from=node-js-libp2p-head /app/ /app/
WORKDIR /app/interop
RUN npx playwright install
ARG BROWSER=chromium # Options: chromium, firefox, webkit
# Options: chromium, firefox, webkit
ARG BROWSER=chromium
ENV BROWSER=$BROWSER
# disable colored output and CLI animation from test runners
ENV CI true

ENTRYPOINT npm run test:interop:multidim -- --build false --types false -t browser -- --browser $BROWSER
# manually specify runner until https://github.com/hugomrdias/playwright-test/issues/572 is resolved
ENTRYPOINT npm run test:interop:multidim -- --build false --types false -t browser -- --browser $BROWSER --runner mocha
18 changes: 16 additions & 2 deletions interop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- [Build another libp2p implementation](#build-another-libp2p-implementation)
- [Running Redis](#running-redis)
- [Start libp2p](#start-libp2p)
- [node.js](#nodejs-1)
- [Browsers](#browsers-1)
- [Start another libp2p implementation](#start-another-libp2p-implementation)
- [License](#license)
- [Contribution](#contribution)
Expand Down Expand Up @@ -67,7 +69,7 @@ $ docker build . -f ./interop/BrowserDockerfile -t js-libp2p-browsers
- When starting the docker container add `-e GOLOG_LOG_LEVEL=debug`
4. Build the version you want to test against
```console
$ cd impl/$IMPL/$VERSION
$ cd multidim-interop/impl/$IMPL/$VERSION
$ make
...
```
Expand All @@ -82,14 +84,26 @@ $ docker run --name redis --rm -p 6379:6379 redis:7-alpine

### Start libp2p

#### node.js

```console
$ docker run -e transport=tcp -e muxer=yamux -e security=noise -e is_dialer=true -e redis_addr=redis:6379 --link redis:redis js-libp2p-node
```

#### Browsers

```console
$ docker run -e transport=webtransport -e muxer=yamux -e security=noise -e is_dialer=true -e redis_addr=redis:6379 --link redis:redis js-libp2p-browsers
```

### Start another libp2p implementation

- Change `go-v0.29` to the implementation you wish to use.
- Ensure one docker run has `is_dialer=false` and the other has `is_dialer=true`
- Ensure the `transport` option is the same for both implementations

```console
$ docker run -e transport=tcp -e muxer=yamux -e security=noise -e is_dialer=false -e redis_addr=redis:6379 --link redis:redis nim-v1.0
$ docker run -e transport=tcp -e muxer=yamux -e security=noise -e is_dialer=false -e redis_addr=redis:6379 --link redis:redis go-v0.29
```

## License
Expand Down
4 changes: 2 additions & 2 deletions interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:interop:multidim": "aegir test"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.0",
"@libp2p/mplex": "^8.0.0",
"@libp2p/tcp": "^7.0.0",
Expand All @@ -52,7 +52,7 @@
"redis": "4.5.1"
},
"devDependencies": {
"aegir": "^39.0.13"
"aegir": "^40.0.1"
},
"browser": {
"@libp2p/tcp": false
Expand Down
3 changes: 3 additions & 0 deletions interop/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"test"
],
"references": [
{
"path": "../packages/connection-encryption-noise"
},
{
"path": "../packages/libp2p"
},
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"release": "run-s build npm:release",
"npm:release": "aegir exec --bail false npm -- publish",
"release:rc": "aegir release-rc",
"docs": "NODE_OPTIONS=--max_old_space_size=4096 aegir docs"
"docs": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs -- --exclude interop --exclude examples --exclude doc"
},
"devDependencies": {
"aegir": "^39.0.13"
"aegir": "^40.0.1"
},
"eslintConfig": {
"extends": "ipfs",
Expand All @@ -45,9 +45,9 @@
]
},
"workspaces": [
"packages/*",
"interop",
"doc",
"examples/*",
"doc/*"
"interop",
"packages/*"
]
}
Loading

0 comments on commit c999d6a

Please sign in to comment.