Skip to content

Commit

Permalink
feat!: update libp2p interfaces (#67)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: uses new single-issue libp2p interface modules
  • Loading branch information
achingbrain committed Jun 15, 2022
1 parent e13a3e7 commit b07e6db
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 25 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
node-version: ${{ matrix.node }}
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:node
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
directory: ./.nyc_output
flags: node
Expand All @@ -50,7 +50,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
directory: ./.nyc_output
flags: chrome
Expand All @@ -65,7 +65,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome-webworker
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
directory: ./.nyc_output
flags: chrome-webworker
Expand All @@ -80,7 +80,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
directory: ./.nyc_output
flags: firefox
Expand All @@ -95,7 +95,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox-webworker
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
directory: ./.nyc_output
flags: firefox-webworker
Expand All @@ -110,7 +110,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-main
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
directory: ./.nyc_output
flags: electron-main
Expand All @@ -125,7 +125,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
directory: ./.nyc_output
flags: electron-renderer
Expand Down
40 changes: 27 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
# Interoperability Tests for libp2p
# @libp2p/interop <!-- omit in toc -->

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai/)
[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io)
[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![IRC](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![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/interop.svg?style=flat-square)](https://codecov.io/gh/libp2p/interop)
[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-interfaces/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/interop/actions/workflows/js-test-and-release.yml)

> Interoperability tests for libp2p Implementations
> Interoperability Tests for libp2p
This repository will be used for interop tests.
## Table of contents <!-- omit in toc -->

## Usage
- [Install](#install)
- [Usage](#usage)
- [Running the tests](#running-the-tests)
- [Contribute](#contribute)
- [License](#license)
- [Contribution](#contribution)

### Install
## Install

```console
$ npm i @libp2p/interop
```
> npm install @libp2p/interop
```

This repository will be used for interop tests.

## Usage

### Running the tests

Expand Down Expand Up @@ -67,5 +77,9 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c

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)
- 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.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
],
"exports": {
".": {
"types": "./src/index.d.ts",
"import": "./dist/src/index.js"
}
},
Expand Down Expand Up @@ -128,8 +129,8 @@
},
"dependencies": {
"@libp2p/daemon-client": "^1.0.0",
"@libp2p/interfaces": "^2.0.1",
"@libp2p/logger": "^1.1.2",
"@libp2p/interface-peer-info": "^1.0.1",
"@libp2p/logger": "^2.0.0",
"@libp2p/peer-id": "^1.1.8",
"@multiformats/multiaddr": "^10.1.8",
"it-all": "^1.0.6",
Expand All @@ -139,9 +140,9 @@
"uint8arrays": "^3.0.0"
},
"devDependencies": {
"aegir": "^37.0.9"
"aegir": "^37.2.0"
},
"peerDependencies": {
"aegir": "^37.0.9"
"aegir": "^37.2.0"
}
}
2 changes: 1 addition & 1 deletion src/dht/peer-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { expect } from 'aegir/chai'
import type { Daemon, DaemonFactory, NodeType, SpawnOptions } from '../index.js'
import pRetry from 'p-retry'
import type { PeerInfo } from '@libp2p/interfaces/peer-info'
import type { PeerInfo } from '@libp2p/interface-peer-info'

export function peerRoutingTests (factory: DaemonFactory) {
const nodeTypes: NodeType[] = ['js', 'go']
Expand Down

0 comments on commit b07e6db

Please sign in to comment.