Skip to content

Commit

Permalink
chore: add non-interface modules to monorepo (#1828)
Browse files Browse the repository at this point in the history
Adds all supported non-interface modules to the monorepo.
  • Loading branch information
achingbrain committed Jun 19, 2023
1 parent 70060e8 commit ea8a063
Show file tree
Hide file tree
Showing 568 changed files with 57,362 additions and 2,752 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ipfs/aegir/actions/cache-node-modules@master
with:
directories: |
./interop/node_modules
- name: Build interop
run: (cd interop && npm i && npm run build)
- name: Build images
run: (cd interop && make)
- name: Save package-lock.json as artifact
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:

test-webkit:
needs: check
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -116,6 +116,22 @@ jobs:
directory: ./.nyc_output
flags: webkit

test-webkit-webworker:
needs: check
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx playwright install-deps
- run: npm run --if-present test:webkit-webworker
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: webkit-webworker

test-electron-main:
needs: check
runs-on: ubuntu-latest
Expand Down Expand Up @@ -165,6 +181,8 @@ jobs:
test-chrome-webworker,
test-firefox,
test-firefox-webworker,
test-webkit,
test-webkit-webworker,
test-electron-main,
test-electron-renderer,
test-interop
Expand Down
27 changes: 26 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
{"packages/interface-address-manager":"3.0.1","packages/interface-compliance-tests":"3.0.7","packages/interface-connection":"5.1.1","packages/interface-connection-compliance-tests":"2.0.9","packages/interface-connection-encrypter":"4.0.1","packages/interface-connection-encrypter-compliance-tests":"5.0.1","packages/interface-connection-gater":"3.0.1","packages/interface-connection-manager":"3.0.1","packages/interface-content-routing":"2.1.1","packages/interface-dht":"2.0.3","packages/interface-keychain":"2.0.5","packages/interface-keys":"1.0.8","packages/interface-libp2p":"3.2.0","packages/interface-metrics":"4.0.8","packages/interface-mocks":"12.0.1","packages/interface-peer-discovery":"2.0.0","packages/interface-peer-discovery-compliance-tests":"2.0.8","packages/interface-peer-id":"2.0.2","packages/interface-peer-info":"1.0.10","packages/interface-peer-routing":"1.1.1","packages/interface-peer-store":"2.0.4","packages/interface-pubsub":"4.0.1","packages/interface-pubsub-compliance-tests":"5.0.9","packages/interface-record":"2.0.7","packages/interface-record-compliance-tests":"2.0.5","packages/interface-registrar":"2.0.12","packages/interface-stream-muxer":"4.1.2","packages/interface-stream-muxer-compliance-tests":"7.0.3","packages/interface-transport":"4.0.3","packages/interface-transport-compliance-tests":"4.0.2","packages/interfaces":"3.3.2","packages/libp2p":"0.45.9"}
{
"packages/peer-discovery-bootstrap": "8.0.0",
"packages/crypto": "1.0.17",
"packages/interface-address-manager":"3.0.1","packages/interface-compliance-tests":"3.0.7","packages/interface-connection":"5.1.1","packages/interface-connection-compliance-tests":"2.0.9","packages/interface-connection-encrypter":"4.0.1","packages/interface-connection-encrypter-compliance-tests":"5.0.1","packages/interface-connection-gater":"3.0.1","packages/interface-connection-manager":"3.0.1","packages/interface-content-routing":"2.1.1","packages/interface-dht":"2.0.3","packages/interface-keychain":"2.0.5","packages/interface-keys":"1.0.8","packages/interface-libp2p":"3.2.0","packages/interface-metrics":"4.0.8","packages/interface-mocks":"12.0.1","packages/interface-peer-discovery":"2.0.0","packages/interface-peer-discovery-compliance-tests":"2.0.8","packages/interface-peer-id":"2.0.2","packages/interface-peer-info":"1.0.10","packages/interface-peer-routing":"1.1.1","packages/interface-peer-store":"2.0.4","packages/interface-pubsub":"4.0.1","packages/interface-pubsub-compliance-tests":"5.0.9","packages/interface-record":"2.0.7","packages/interface-record-compliance-tests":"2.0.5","packages/interface-registrar":"2.0.12","packages/interface-stream-muxer":"4.1.2","packages/interface-stream-muxer-compliance-tests":"7.0.3","packages/interface-transport":"4.0.3","packages/interface-transport-compliance-tests":"4.0.2","packages/interfaces":"3.3.2",
"packages/kad-dht": "9.3.6",
"packages/keychain": "2.0.1",
"packages/libp2p":"0.45.9",
"packages/logger":"2.1.1",
"packages/peer-discovery-mdns":"8.0.0",
"packages/stream-multiplexer-mplex":"8.0.4",
"packages/multistream-select":"3.1.9",
"packages/peer-collections":"3.0.2",
"packages/peer-id":"2.0.3",
"packages/peer-id-factory":"2.0.3",
"packages/peer-record":"5.0.4",
"packages/peer-store":"8.2.1",
"packages/metrics-prometheus":"1.1.5",
"packages/record":"3.0.4",
"packages/transport-tcp":"7.0.3",
"packages/topology":"4.0.3",
"packages/tracked-map":"3.0.3",
"packages/utils": "3.0.12",
"packages/transport-webrtc":"2.0.10",
"packages/transport-websockets":"6.0.3",
"packages/transport-webtransport":"2.0.2"
}
24 changes: 23 additions & 1 deletion .release-please.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"bump-patch-for-minor-pre-major": true,
"group-pull-request-title-pattern": "chore: release ${component}",
"packages": {
"packages/crypto": {},
"packages/interface-address-manager": {},
"packages/interface-compliance-tests": {},
"packages/interface-connection": {},
Expand Down Expand Up @@ -35,6 +36,27 @@
"packages/interface-transport": {},
"packages/interface-transport-compliance-tests": {},
"packages/interfaces": {},
"packages/libp2p": {}
"packages/kad-dht": {},
"packages/keychain": {},
"packages/libp2p": {},
"packages/logger": {},
"packages/metrics-prometheus": {},
"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/record": {},
"packages/stream-multiplexer-mplex": {},
"packages/topology": {},
"packages/tracked-map": {},
"packages/transport-tcp": {},
"packages/transport-webrtc": {},
"packages/transport-websockets": {},
"packages/transport-webtransport": {},
"packages/utils": {}
}
}
2 changes: 1 addition & 1 deletion interop/BrowserDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM mcr.microsoft.com/playwright

COPY --from=node-js-libp2p-head /app/ /app/
WORKDIR /app/interop
RUN ./node_modules/.bin/playwright install
RUN npx playwright install
ARG BROWSER=chromium # Options: chromium, firefox, webkit
ENV BROWSER=$BROWSER

Expand Down
8 changes: 2 additions & 6 deletions interop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ FROM node:18
WORKDIR /app
COPY package.json .
COPY ./node_modules ./node_modules
COPY ./packages/libp2p ./packages/libp2p
COPY ./packages ./packages
COPY ./interop ./interop

WORKDIR /app/interop
COPY ./interop/node_modules ./node_modules
COPY ./interop/dist ./dist
COPY ./interop/package.json .
COPY ./interop/.aegir.js .
COPY ./interop/relay.js .

ENTRYPOINT [ "npm", "test", "--", "--build", "false", "--types", "false", "-t", "node" ]
4 changes: 4 additions & 0 deletions interop/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This project is dual licensed under MIT and Apache-2.0.

MIT: https://www.opensource.org/licenses/mit
Apache-2.0: https://www.apache.org/licenses/license-2.0
5 changes: 5 additions & 0 deletions interop/LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
19 changes: 19 additions & 0 deletions interop/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
36 changes: 36 additions & 0 deletions interop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# @libp2p/multidim-interop <!-- omit in toc -->

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)

> Multidimensional Interop Test
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [API Docs](#api-docs)
- [License](#license)
- [Contribution](#contribution)

## Install

```console
$ npm i @libp2p/multidim-interop
```

## API Docs

- <https://libp2p.github.io/js-libp2p/modules/_libp2p_multidim_interop.html>

## License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution

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 as above, without any additional terms or conditions.
58 changes: 42 additions & 16 deletions interop/package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,60 @@
{
"name": "multidim-interop",
"private": true,
"name": "@libp2p/multidim-interop",
"version": "1.0.0",
"description": "Multidimension Interop Test",
"type": "module",
"main": "index.js",
"description": "Multidimensional Interop Test",
"author": "Glen De Cauwsemaecker <glen@littlebearlabs.io> / @marcopolo",
"license": "MIT",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/libp2p/js-libp2p/tree/master/interop#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/libp2p/js-libp2p.git"
},
"bugs": {
"url": "https://github.com/libp2p/js-libp2p/issues"
},
"type": "module",
"types": "./dist/src/index.d.ts",
"files": [
"src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
}
},
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"sourceType": "module"
}
},
"scripts": {
"start": "node index.js",
"build": "aegir build",
"test": "aegir test"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-yamux": "^4.0.1",
"@libp2p/mplex": "^8.0.1",
"@libp2p/tcp": "^7.0.1",
"@libp2p/webrtc": "^2.0.7",
"@libp2p/websockets": "^6.0.1",
"@libp2p/webtransport": "^2.0.1",
"@libp2p/mplex": "^8.0.0",
"@libp2p/tcp": "^7.0.0",
"@libp2p/webrtc": "^2.0.0",
"@libp2p/websockets": "^6.0.0",
"@libp2p/webtransport": "^2.0.0",
"@multiformats/mafmt": "^12.1.2",
"@multiformats/multiaddr": "^12.1.3",
"libp2p": "../packages/libp2p",
"libp2p": "^0.45.0",
"redis": "4.5.1"
},
"devDependencies": {
"aegir": "^39.0.10"
},
"browser": {
"@libp2p/tcp": false
},
"devDependencies": {
"aegir": "^39.0.5"
}
"private": true
}
6 changes: 6 additions & 0 deletions interop/test/ping.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ describe('ping test', () => {
services: {
ping: pingService(),
identify: identifyService()
},
connectionManager: {
// disable auto-dial
minConnections: 0,
// slow CI is slow
dialTimeout: 60 * 1000 * 5
}
}

Expand Down
38 changes: 29 additions & 9 deletions interop/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
{
"extends": "aegir/src/config/tsconfig.aegir.json",
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src",
"test"
]
}
"extends": "aegir/src/config/tsconfig.aegir.json",
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src",
"test"
],
"references": [
{
"path": "../packages/libp2p"
},
{
"path": "../packages/stream-multiplexer-mplex"
},
{
"path": "../packages/transport-tcp"
},
{
"path": "../packages/transport-webrtc"
},
{
"path": "../packages/transport-websockets"
},
{
"path": "../packages/transport-webtransport"
}
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
]
},
"workspaces": [
"interop",
"packages/*"
]
}
7 changes: 7 additions & 0 deletions packages/crypto/.aegir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

/** @type {import('aegir/types').PartialOptions} */
export default {
build: {
bundlesizeMax: '70kB'
}
}
Loading

0 comments on commit ea8a063

Please sign in to comment.