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

Commit 46eb376

Browse files
authored
chore: update deps (#112)
1 parent d72d6c9 commit 46eb376

File tree

6 files changed

+63
-61
lines changed

6 files changed

+63
-61
lines changed

.github/workflows/main.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- run: npm install
16+
- run: npx aegir lint
17+
- run: npx aegir dep-check
18+
test-node:
19+
needs: check
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [windows-latest, ubuntu-latest, macos-latest]
24+
node: [14, 15]
25+
fail-fast: true
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node }}
31+
- run: npm install
32+
- run: npx nyc --reporter=lcov aegir test -t node -- --bail
33+
- uses: codecov/codecov-action@v1
34+
test-chrome:
35+
needs: check
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v2
39+
- run: npm install
40+
- run: npx aegir test -t browser -t webworker --bail
41+
test-firefox:
42+
needs: check
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
- run: npm install
47+
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless

.travis.yml

-42
This file was deleted.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ js-libp2p-bootstrap
88
[![](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-bootstrap)
99
[![](https://img.shields.io/travis/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://travis-ci.com/libp2p/js-libp2p-bootstrap)
1010
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
11-
![](https://img.shields.io/badge/npm-%3E%3D6.0.0-orange.svg?style=flat-square)
12-
![](https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square)
11+
![](https://img.shields.io/badge/Node.js-%3E%3D14.0.0-orange.svg?style=flat-square)
1312

1413
> JavaScript libp2p Implementation of the railing process of a Node through a bootstrap peer list
1514

package.json

+6-11
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,20 @@
2424
"homepage": "https://github.com/libp2p/js-libp2p-bootstrap",
2525
"repository": "github:libp2p/js-libp2p-bootstrap",
2626
"engines": {
27-
"node": ">=6.0.0",
28-
"npm": ">=3.0.0"
27+
"node": ">=14.0.0"
2928
},
3029
"types": "dist/src/index.d.ts",
3130
"devDependencies": {
3231
"@types/debug": "^4.1.5",
33-
"aegir": "^30.3.0",
34-
"libp2p-interfaces": "^0.4.0"
32+
"aegir": "^33.0.0",
33+
"libp2p-interfaces": "^0.9.0"
3534
},
3635
"dependencies": {
37-
"debug": "^4.1.1",
38-
"mafmt": "^8.0.0",
39-
"multiaddr": "^8.0.0",
36+
"debug": "^4.3.1",
37+
"mafmt": "^9.0.0",
38+
"multiaddr": "^9.0.1",
4039
"peer-id": "^0.14.0"
4140
},
42-
"pre-push": [
43-
"lint",
44-
"test"
45-
],
4641
"contributors": [
4742
"David Dias <[email protected]>",
4843
"Vasco Santos <[email protected]>",

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const PeerId = require('peer-id')
4-
const multiaddr = require('multiaddr')
4+
const { Multiaddr } = require('multiaddr')
55
const mafmt = require('mafmt')
66
const { EventEmitter } = require('events')
77
const debug = require('debug')
@@ -59,7 +59,7 @@ class Bootstrap extends EventEmitter {
5959
return log.error('Invalid multiaddr')
6060
}
6161

62-
const ma = multiaddr(candidate)
62+
const ma = new Multiaddr(candidate)
6363

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

test/bootstrap.spec.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('bootstrap', () => {
2121
throw new Error('should throw if no peer list is provided')
2222
})
2323

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

3131
const p = new Promise((resolve) => r.once('peer', resolve))
3232
r.start()
33-
return p
33+
34+
await p
35+
r.stop()
3436
})
3537

36-
it('not fail on malformed peers in peer list', function () {
38+
it('not fail on malformed peers in peer list', async function () {
3739
this.timeout(5 * 1000)
3840

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

5456
r.start()
5557

56-
return p
58+
await p
59+
r.stop()
5760
})
5861

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

0 commit comments

Comments
 (0)