Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
chore: update deps (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Apr 12, 2021
1 parent d72d6c9 commit 46eb376
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 61 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir lint
- run: npx aegir dep-check
test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [14, 15]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npx nyc --reporter=lcov aegir test -t node -- --bail
- uses: codecov/codecov-action@v1
test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir test -t browser -t webworker --bail
test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ js-libp2p-bootstrap
[![](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-bootstrap)
[![](https://img.shields.io/travis/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://travis-ci.com/libp2p/js-libp2p-bootstrap)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
![](https://img.shields.io/badge/npm-%3E%3D6.0.0-orange.svg?style=flat-square)
![](https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square)
![](https://img.shields.io/badge/Node.js-%3E%3D14.0.0-orange.svg?style=flat-square)

> JavaScript libp2p Implementation of the railing process of a Node through a bootstrap peer list
Expand Down
17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,20 @@
"homepage": "https://github.com/libp2p/js-libp2p-bootstrap",
"repository": "github:libp2p/js-libp2p-bootstrap",
"engines": {
"node": ">=6.0.0",
"npm": ">=3.0.0"
"node": ">=14.0.0"
},
"types": "dist/src/index.d.ts",
"devDependencies": {
"@types/debug": "^4.1.5",
"aegir": "^30.3.0",
"libp2p-interfaces": "^0.4.0"
"aegir": "^33.0.0",
"libp2p-interfaces": "^0.9.0"
},
"dependencies": {
"debug": "^4.1.1",
"mafmt": "^8.0.0",
"multiaddr": "^8.0.0",
"debug": "^4.3.1",
"mafmt": "^9.0.0",
"multiaddr": "^9.0.1",
"peer-id": "^0.14.0"
},
"pre-push": [
"lint",
"test"
],
"contributors": [
"David Dias <daviddias.p@gmail.com>",
"Vasco Santos <vasco.santos@moxy.studio>",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const PeerId = require('peer-id')
const multiaddr = require('multiaddr')
const { Multiaddr } = require('multiaddr')
const mafmt = require('mafmt')
const { EventEmitter } = require('events')
const debug = require('debug')
Expand Down Expand Up @@ -59,7 +59,7 @@ class Bootstrap extends EventEmitter {
return log.error('Invalid multiaddr')
}

const ma = multiaddr(candidate)
const ma = new Multiaddr(candidate)

const peerId = PeerId.createFromB58String(ma.getPeerId())

Expand Down
11 changes: 7 additions & 4 deletions test/bootstrap.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('bootstrap', () => {
throw new Error('should throw if no peer list is provided')
})

it('find the other peer', function () {
it('find the other peer', async function () {
this.timeout(5 * 1000)
const r = new Bootstrap({
list: peerList,
Expand All @@ -30,10 +30,12 @@ describe('bootstrap', () => {

const p = new Promise((resolve) => r.once('peer', resolve))
r.start()
return p

await p
r.stop()
})

it('not fail on malformed peers in peer list', function () {
it('not fail on malformed peers in peer list', async function () {
this.timeout(5 * 1000)

const r = new Bootstrap({
Expand All @@ -53,7 +55,8 @@ describe('bootstrap', () => {

r.start()

return p
await p
r.stop()
})

it('stop emitting events when stop() called', async function () {
Expand Down

0 comments on commit 46eb376

Please sign in to comment.