Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/webrtc-direct-in…
Browse files Browse the repository at this point in the history
…-node-js
  • Loading branch information
achingbrain committed Jan 14, 2025
2 parents 71bf4cb + 06fc82d commit f58bf18
Show file tree
Hide file tree
Showing 924 changed files with 51,535 additions and 20,140 deletions.
21 changes: 18 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
directories:
- "**/*"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 20
commit-message:
prefix: "deps"
prefix-development: "deps(dev)"
prefix-development: "chore"
groups:
helia-deps: # group all deps that should be updated when Helia deps need updated
patterns:
- "*helia*"
- "*libp2p*"
- "*multiformats*"
store-deps: # group all blockstore and datastore updates (interface & impl)
patterns:
- "*blockstore*"
- "*datastore*"
kubo-deps: # group kubo, kubo-rpc-client, and ipfsd-ctl updates
patterns:
- "*kubo*"
- "ipfsd-ctl"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: ci
prefix: chore
75 changes: 72 additions & 3 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main

test-examples:
name: Test example ${{ matrix.example.name }}
Expand All @@ -27,10 +27,19 @@ jobs:
strategy:
matrix:
example:
- name: js-libp2p-example-browser-pubsub
repo: https://github.com/libp2p/js-libp2p-example-browser-pubsub.git
deps:
- '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
- '@libp2p/dcutr@$PWD/packages/protocol-dcutr'
- '@libp2p/identify@$PWD/packages/protocol-identify'
- '@libp2p/webrtc@$PWD/packages/transport-webrtc'
- '@libp2p/websockets@$PWD/packages/transport-websockets'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-chat
repo: https://github.com/libp2p/js-libp2p-example-chat.git
deps:
- '@libp2p/peer-id-factory@$PWD/packages/peer-id-factory'
- '@libp2p/mdns@$PWD/packages/peer-discovery-mdns'
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- '@libp2p/websockets@$PWD/packages/transport-websockets'
- 'libp2p@$PWD/packages/libp2p'
Expand All @@ -47,10 +56,70 @@ jobs:
- '@libp2p/plaintext@$PWD/packages/connection-encrypter-plaintext'
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-custom-protocols
repo: https://github.com/libp2p/js-libp2p-example-custom-protocols.git
deps:
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- '@libp2p/websockets@$PWD/packages/transport-websockets'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-delegated-routing
repo: https://github.com/libp2p/js-libp2p-example-delegated-routing.git
deps:
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-discovery-mechanisms
repo: https://github.com/libp2p/js-libp2p-example-discovery-mechanisms.git
deps:
- '@libp2p/bootstrap@$PWD/packages/peer-discovery-bootstrap'
- '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
- '@libp2p/identify@$PWD/packages/protocol-identify'
- '@libp2p/kad-dht@$PWD/packages/kad-dht'
- '@libp2p/mdns@$PWD/packages/peer-discovery-mdns'
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-peer-and-content-routing
repo: https://github.com/libp2p/js-libp2p-example-peer-and-content-routing.git
deps:
- '@libp2p/identify@$PWD/packages/protocol-identify'
- '@libp2p/kad-dht@$PWD/packages/kad-dht'
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-pnet
repo: https://github.com/libp2p/js-libp2p-example-pnet.git
deps:
- '@libp2p/pnet@$PWD/packages/pnet'
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-protocol-and-stream-muxing
repo: https://github.com/libp2p/js-libp2p-example-protocol-and-stream-muxing.git
deps:
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-pubsub
repo: https://github.com/libp2p/js-libp2p-example-pubsub.git
deps:
- '@libp2p/identify@$PWD/packages/protocol-identify'
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-transports
repo: https://github.com/libp2p/js-libp2p-example-transports.git
deps:
- '@libp2p/tcp@$PWD/packages/transport-tcp'
- '@libp2p/websockets@$PWD/packages/transport-websockets'
- 'libp2p@$PWD/packages/libp2p'
- name: js-libp2p-example-webrtc-private-to-private
repo: https://github.com/libp2p/js-libp2p-example-webrtc-private-to-private.git
deps:
- '@libp2p/circuit-relay-v2@$PWD/packages/transport-circuit-relay-v2'
- '@libp2p/identify@$PWD/packages/protocol-identify'
- '@libp2p/ping@$PWD/packages/protocol-ping'
- '@libp2p/webrtc@$PWD/packages/transport-webrtc'
- '@libp2p/websockets@$PWD/packages/transport-websockets'
- 'libp2p@$PWD/packages/libp2p'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
- run: npx playwright install-deps
- run: npx xvfb-maybe aegir test-dependant ${{ matrix.example.repo }} --deps ${{ join(matrix.example.deps, ',') }}
82 changes: 52 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
branches:
- '**'

env:
CACHE_DIRS: |
./interop/dist
./interop/node_modules
./doc/node_modules
jobs:

build:
Expand All @@ -16,12 +22,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: |
./interop/dist
./interop/node_modules
./doc/node_modules
directories: ${{ env.CACHE_DIRS }}

check:
needs: build
Expand All @@ -31,7 +34,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npm run --if-present lint
- run: npm run --if-present dep-check
- run: npm run --if-present docs:no-publish
Expand All @@ -49,9 +54,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npm run --if-present test:node
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: node
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -65,9 +72,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npm run --if-present test:chrome
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: chrome
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -81,9 +90,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npm run --if-present test:chrome-webworker
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: chrome-webworker
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -97,9 +108,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npm run --if-present test:firefox
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: firefox
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -113,9 +126,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npm run --if-present test:firefox-webworker
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: firefox-webworker
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -129,14 +144,16 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
# https://github.com/actions/runner-images/issues/9733#issuecomment-2074590278
- run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update
- run: npx playwright install-deps
- run: npm run --if-present test:webkit
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: webkit
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -150,9 +167,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npx xvfb-maybe npm run --if-present test:electron-main
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: electron-main
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -166,9 +185,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
flags: electron-renderer
files: .coverage/*,packages/*/.coverage/*
Expand All @@ -182,7 +203,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- run: npm run test:interop -- --bail

transport-interop:
Expand All @@ -193,11 +216,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: |
./interop/dist
./interop/node_modules
directories: ${{ env.CACHE_DIRS }}
- name: Build images
run: (cd interop && make -j 4)
- name: Save package-lock.json as artifact
Expand All @@ -210,7 +231,6 @@ jobs:
- uses: libp2p/test-plans/.github/actions/run-interop-ping-test@master
with:
test-filter: js-libp2p-head
test-ignore: nim
extra-versions: ${{ github.workspace }}/interop/node-version.json ${{ github.workspace }}/interop/chromium-version.json ${{ github.workspace }}/interop/firefox-version.json
s3-cache-bucket: ${{ vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME }}
s3-access-key-id: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -249,8 +269,10 @@ jobs:
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/docker-login@master
- uses: ipfs/aegir/actions/cache-node-modules@main
with:
directories: ${{ env.CACHE_DIRS }}
- uses: ipfs/aegir/actions/docker-login@main
with:
docker-token: ${{ secrets.DOCKER_TOKEN }}
docker-username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"packages/connection-encrypter-plaintext":"1.0.25","packages/connection-encrypter-tls":"1.0.13","packages/crypto":"4.1.3","packages/interface":"1.4.1","packages/interface-compliance-tests":"5.4.6","packages/interface-internal":"1.2.3","packages/kad-dht":"12.0.18","packages/keychain":"4.0.16","packages/libp2p":"1.6.1","packages/logger":"4.0.14","packages/metrics-devtools":"0.1.1","packages/metrics-prometheus":"3.0.25","packages/metrics-simple":"1.0.3","packages/multistream-select":"5.1.11","packages/peer-collections":"5.2.3","packages/peer-discovery-bootstrap":"10.0.25","packages/peer-discovery-mdns":"10.0.25","packages/peer-id":"4.1.3","packages/peer-id-factory":"4.1.3","packages/peer-record":"7.0.19","packages/peer-store":"10.0.20","packages/protocol-autonat":"1.0.22","packages/protocol-dcutr":"1.0.22","packages/protocol-echo":"1.0.8","packages/protocol-fetch":"1.0.19","packages/protocol-identify":"2.0.3","packages/protocol-perf":"3.0.25","packages/protocol-ping":"1.0.20","packages/pubsub":"9.0.20","packages/pubsub-floodsub":"9.0.21","packages/record":"4.0.3","packages/stream-multiplexer-mplex":"10.0.25","packages/transport-circuit-relay-v2":"1.0.25","packages/transport-tcp":"9.0.27","packages/transport-webrtc":"4.0.34","packages/transport-websockets":"8.0.25","packages/transport-webtransport":"4.0.33","packages/upnp-nat":"1.1.0","packages/utils":"5.4.3"}
{"packages/auto-tls":"1.0.4","packages/config":"1.0.1","packages/connection-encrypter-plaintext":"2.0.13","packages/connection-encrypter-tls":"2.0.13","packages/crypto":"5.0.9","packages/interface":"2.4.0","packages/interface-compliance-tests":"6.2.3","packages/interface-internal":"2.2.2","packages/kad-dht":"14.2.0","packages/keychain":"5.0.12","packages/libp2p":"2.5.0","packages/logger":"5.1.6","packages/metrics-devtools":"1.2.0","packages/metrics-opentelemetry":"1.0.0","packages/metrics-prometheus":"4.3.0","packages/metrics-simple":"1.3.0","packages/multistream-select":"6.0.11","packages/peer-collections":"6.0.14","packages/peer-discovery-bootstrap":"11.0.17","packages/peer-discovery-mdns":"11.0.17","packages/peer-id":"5.0.10","packages/peer-record":"8.0.14","packages/peer-store":"11.0.14","packages/pnet":"2.0.17","packages/protocol-autonat":"2.0.16","packages/protocol-dcutr":"2.0.15","packages/protocol-echo":"2.1.6","packages/protocol-fetch":"3.0.0","packages/protocol-identify":"3.0.15","packages/protocol-perf":"4.0.17","packages/protocol-ping":"2.0.15","packages/pubsub":"10.0.15","packages/pubsub-floodsub":"10.1.16","packages/record":"4.0.4","packages/stream-multiplexer-mplex":"11.0.17","packages/transport-circuit-relay-v2":"3.1.7","packages/transport-memory":"1.0.3","packages/transport-tcp":"10.0.15","packages/transport-webrtc":"5.0.23","packages/transport-websockets":"9.1.2","packages/transport-webtransport":"5.0.22","packages/upnp-nat":"3.0.4","packages/utils":"6.3.1"}
6 changes: 5 additions & 1 deletion .release-please.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
{ "type": "refactor", "section": "Refactors", "hidden": false }
],
"packages": {
"packages/auto-tls": {},
"packages/config": {},
"packages/connection-encrypter-plaintext": {},
"packages/connection-encrypter-tls": {},
"packages/crypto": {},
Expand All @@ -20,16 +22,17 @@
"packages/libp2p": {},
"packages/logger": {},
"packages/metrics-devtools": {},
"packages/metrics-opentelemetry": {},
"packages/metrics-prometheus": {},
"packages/metrics-simple": {},
"packages/multistream-select": {},
"packages/peer-collections": {},
"packages/peer-discovery-bootstrap": {},
"packages/peer-discovery-mdns": {},
"packages/peer-id": {},
"packages/peer-id-factory": {},
"packages/peer-record": {},
"packages/peer-store": {},
"packages/pnet": {},
"packages/protocol-autonat": {},
"packages/protocol-dcutr": {},
"packages/protocol-echo": {},
Expand All @@ -42,6 +45,7 @@
"packages/record": {},
"packages/stream-multiplexer-mplex": {},
"packages/transport-circuit-relay-v2": {},
"packages/transport-memory": {},
"packages/transport-tcp": {},
"packages/transport-webrtc": {},
"packages/transport-websockets": {},
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

👉 Please see the [IPFS JavaScript Community contributing guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for how to collaborate and contribute to js-libp2p.

💪 The [core maintainers](https://github.com/libp2p/js-libp2p/blob/main/CODEOWNERS) hang out in #libp2p-implementers in ipfs.io Matrix, FIL Slack, and IPFS Discord. They perform weekly triage of issues and PRs per https://lu.ma/js-libp2p
💪 The [core maintainers](https://github.com/libp2p/js-libp2p/blob/main/CODEOWNERS) hang out in #libp2p-implementers in ipfs.io Matrix, FIL Slack, and IPFS Discord. They perform weekly triage of issues and PRs per https://lu.ma/libp2p

🤲 Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed in [README.md](https://github.com/libp2p/js-libp2p/blob/main/README.md), without any additional terms or conditions.

Expand Down
4 changes: 0 additions & 4 deletions LICENSE

This file was deleted.

Loading

0 comments on commit f58bf18

Please sign in to comment.