Skip to content

Commit c179ff3

Browse files
authored
chore: update deps (#52)
Update deps to usable versions. BREAKING CHANGE: only node15+ is supported
1 parent bcd8031 commit c179ff3

File tree

5 files changed

+55
-52
lines changed

5 files changed

+55
-52
lines changed

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "11:00"
8+
open-pull-requests-limit: 10

.github/workflows/main.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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: npm run lint
17+
- run: npm run 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: [16]
25+
fail-fast: true
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-node@v2
29+
with:
30+
node-version: ${{ matrix.node }}
31+
- run: npm install
32+
- run: npm run test:node -- --cov --bail
33+
- uses: codecov/codecov-action@v1

.travis.yml

-39
This file was deleted.

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"src"
1010
],
1111
"engines": {
12-
"node": ">=14.0.0",
12+
"node": ">=15.0.0",
1313
"npm": ">6.0.0"
1414
},
1515
"scripts": {
1616
"lint": "aegir lint",
17-
"test": "aegir test -t node -f test/node.js -- --exit",
18-
"test:node": "aegir test -t node -f test/node.js -- --exit",
17+
"test": "aegir test -t node -f test/node.js",
18+
"test:node": "aegir test -t node -f test/node.js",
1919
"test:browser": "aegir test -t browser --no-cors -f test/browser.js",
20-
"prerelease": "npm run test",
20+
"dep-check": "aegir dep-check",
2121
"release": "aegir release --target node --build=false --no-test",
2222
"release-minor": "aegir release --type minor --target node --build=false --no-test"
2323
},
@@ -47,10 +47,10 @@
4747
"cross-env": "^7.0.0",
4848
"debug": "^4.1.1",
4949
"execa": "^4.0.0",
50-
"go-libp2p-dep": "^0.11.0",
50+
"go-libp2p-dep": "^0.11.3",
5151
"it-first": "^1.0.7",
52-
"libp2p-daemon": "^0.8.1",
53-
"libp2p-daemon-client": "^0.9.0",
52+
"libp2p-daemon": "^0.9.1",
53+
"libp2p-daemon-client": "^0.10.0",
5454
"multiaddr": "^10.0.1",
5555
"multiformats": "^9.4.5",
5656
"p-retry": "^4.2.0",

src/daemon.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@ class Daemon {
134134

135135
log(this._binPath, execOptions)
136136

137-
const daemon = execa(this._binPath, execOptions)
138-
daemon.stderr.pipe(process.stderr)
137+
this._daemon = execa(this._binPath, execOptions)
138+
this._daemon.stderr.pipe(process.stderr)
139139

140-
daemon.stdout.once('data', () => {
140+
this._daemon.stdout.once('data', () => {
141141
resolve()
142142

143-
daemon.stdout.on('data', (data) => {
143+
this._daemon.stdout.on('data', (data) => {
144144
log(data.toString())
145145
})
146146
})
147-
daemon.on('exit', (code, signal) => {
147+
this._daemon.on('exit', (code, signal) => {
148148
if (code !== 0) {
149149
reject(new Error(`daemon exited with status code ${code}`))
150150
} else if ((signal || '') !== '') {
@@ -162,7 +162,8 @@ class Daemon {
162162
* @returns {void}
163163
*/
164164
async stop () {
165-
await this._client && this._client.close()
165+
await (this._client && this._client.close())
166+
await (this._daemon && this._daemon.kill())
166167
await this._cleanUnixSocket()
167168
}
168169

0 commit comments

Comments
 (0)