chore: cleanup peer disco and fix tests

This commit is contained in:
Jacob Heun 2019-10-18 14:23:50 +02:00
parent 32f863be86
commit f9f0b0902e
No known key found for this signature in database
GPG Key ID: CA5A94C15809879F
11 changed files with 8 additions and 159 deletions

View File

@ -7,6 +7,10 @@
> Contains test suites and interfaces you can use to implement the various components of libp2p.
## Lead Maintainer
[Jacob Heun](https://github.com/jacobheun).
## Interfaces
- [Connection](./src/connection)
@ -19,7 +23,7 @@
### Origin Repositories
For posterity, here is a link to the original repositories for each of the interfaces (if they had one).
For posterity, here are links to the original repositories for each of the interfaces (if they had one).
- [Connection](https://github.com/libp2p/interface-connection)
- [Content Routing](https://github.com/libp2p/interface-content-routing)
- [Peer Discovery](https://github.com/libp2p/interface-peer-discovery)

View File

@ -44,6 +44,7 @@
"devDependencies": {
"aegir": "^20.4.1",
"it-pair": "^1.0.0",
"it-pipe": "^1.0.1"
"it-pipe": "^1.0.1",
"peer-info": "^0.17.0"
}
}

View File

@ -1,8 +0,0 @@
**/node_modules/
**/*.log
package-lock.json
# Coverage directory used by tools like istanbul
coverage
docs
dist

View File

@ -1,40 +0,0 @@
language: node_js
cache: npm
stages:
- check
- test
- cov
node_js:
- '10'
- '12'
os:
- linux
- osx
- windows
script: npx nyc -s npm run test:node -- --bail
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov
jobs:
include:
- stage: check
script:
- npx aegir dep-check
- npm run lint
- stage: test
name: chrome
addons:
chrome: stable
script: npx aegir test -t browser -t webworker
- stage: test
name: firefox
addons:
firefox: latest
script: npx aegir test -t browser -t webworker -- --browsers FirefoxHeadless
notifications:
email: false

View File

@ -1,20 +0,0 @@
<a name="0.1.1"></a>
## [0.1.1](https://github.com/libp2p/interface-peer-discovery/compare/v0.1.0...v0.1.1) (2019-09-27)
### Bug Fixes
* add async support to setup ([#11](https://github.com/libp2p/interface-peer-discovery/issues/11)) ([2814c76](https://github.com/libp2p/interface-peer-discovery/commit/2814c76))
<a name="0.1.0"></a>
# [0.1.0](https://github.com/libp2p/interface-peer-discovery/compare/v0.0.1...v0.1.0) (2019-09-27)
<a name="0.0.1"></a>
## 0.0.1 (2017-02-09)

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2016 libp2p
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.

View File

@ -1,11 +1,6 @@
interface-peer-discovery
========================
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)
[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.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)
> A test suite and interface you can use to implement a Peer Discovery module for libp2p.
The primary goal of this module is to enable developers to pick and/or swap their Peer Discovery modules as they see fit for their application, without having to go through shims or compatibility issues. This module and test suite was heavily inspired by [abstract-blob-store](https://github.com/maxogden/abstract-blob-store).
@ -14,10 +9,6 @@ Publishing a test suite as a module lets multiple modules all ensure compatibili
The API is presented with both Node.js and Go primitives, however, there is not actual limitations for it to be extended for any other language, pushing forward the cross compatibility and interop through diferent stacks.
## Lead Maintainer
[Vasco Santos](https://github.com/vasco-santos).
## Modules that implement the interface
- [JavaScript libp2p-mdns](https://github.com/libp2p/js-libp2p-mdns)

View File

@ -1,58 +0,0 @@
{
"name": "interface-discovery",
"version": "0.1.1",
"description": "A test suite and interface you can use to implement a discovery interface.",
"leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>",
"main": "src/index.js",
"scripts": {
"lint": "aegir lint",
"build": "aegir build",
"test": "aegir test",
"test:node": "aegir test -t node",
"test:browser": "aegir test -t browser -t webworker",
"release": "aegir release",
"release-minor": "aegir release --type minor",
"release-major": "aegir release --type major"
},
"pre-push": [
"lint"
],
"repository": {
"type": "git",
"url": "https://github.com/libp2p/interface-peer-discovery.git"
},
"keywords": [
"libp2p",
"network",
"p2p",
"peer",
"discovery",
"peer-to-peer",
"IPFS"
],
"author": "David Dias <daviddias@ipfs.io>",
"license": "MIT",
"bugs": {
"url": "https://github.com/libp2p/interface-peer-discovery/issues"
},
"homepage": "https://github.com/libp2p/interface-peer-discovery",
"dependencies": {},
"devDependencies": {
"aegir": "^20.3.1",
"chai": "^4.2.0",
"dirty-chai": "^2.0.1",
"peer-id": "^0.13.3",
"peer-info": "^0.17.0"
},
"engines": {
"node": ">=10.0.0",
"npm": ">=6.0.0"
},
"contributors": [
"David Dias <daviddias.p@gmail.com>",
"Jacob Heun <jacobheun@gmail.com>",
"Mike Goelzer <mgoelzer@docker.com>",
"Vasco Santos <vasco.santos@moxy.studio>",
"Vasco Santos <vasco.santos@ua.pt>"
]
}

View File

@ -1,7 +1,7 @@
/* eslint-env mocha */
'use strict'
const tests = require('../src')
const tests = require('../../src/peer-discovery/tests')
const MockDiscovery = require('./mock-discovery')
describe('compliance tests', () => {