Skip to content

Commit 57045f9

Browse files
authored
chore: upgrade aegir and fix linting (#552)
1 parent b8233be commit 57045f9

File tree

8 files changed

+26
-19
lines changed

8 files changed

+26
-19
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"temp-write": "^4.0.0"
6464
},
6565
"devDependencies": {
66-
"aegir": "^26.0.0",
66+
"aegir": "^28.0.2",
6767
"benchmark": "^2.1.4",
6868
"go-ipfs": "^0.7.0",
6969
"husky": "^4.2.5",

src/endpoint/server.browser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
/**
55
* Creates an instance of Server.
6+
*
67
* @class
78
*/
89
class Server {
910
/**
10-
* @constructor
11+
* @class
1112
* @param {Object} options
1213
* @param {number} [options.port=43134] - Server port.
13-
* @param {function} createNode
14+
* @param {Function} createNode
1415
*/
1516
constructor (options, createNode) {
1617
options = options || { port: 43134 }
@@ -34,7 +35,6 @@ class Server {
3435
/**
3536
* Stop the server
3637
*
37-
* @param {object} [options] - {@link https://hapi.dev/api/?v=18.4.0#-await-serverstopoptions Hapi docs}
3838
* @returns {Promise}
3939
*/
4040
stop () {

src/endpoint/server.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ const routes = require('./routes')
55

66
/**
77
* Creates an instance of Server.
8+
*
89
* @class
910
*/
1011
class Server {
1112
/**
12-
* @constructor
13+
* @class
1314
* @param {Object} options
1415
* @param {number} [options.port=43134] - Server port.
15-
* @param {function} createFactory
16+
* @param {Function} createFactory
1617
*/
1718
constructor (options = { port: 43134, host: 'localhost' }, createFactory) {
1819
this.options = options

src/factory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Factory {
5656
*
5757
* @param {ControllerOptions} options - Controller type
5858
*
59-
* @returns {Promise<String>}
59+
* @returns {Promise<string>}
6060
*/
6161
async tmpDir (options) {
6262
options = merge(this.opts, options)
@@ -98,6 +98,7 @@ class Factory {
9898

9999
/**
100100
* Spawn an IPFSd Controller
101+
*
101102
* @param {ControllerOptions} options
102103
* @returns {Promise<ControllerDaemon>}
103104
*/
@@ -149,6 +150,7 @@ class Factory {
149150

150151
/**
151152
* Stop all controllers
153+
*
152154
* @returns {Promise<ControllerDaemon[]>}
153155
*/
154156
async clean () {

src/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ module.exports = {
5454

5555
/**
5656
* Same as https://github.com/ipfs/js-ipfs/blob/master/README.md#ipfs-constructor
57+
*
5758
* @typedef {Object} IpfsOptions
5859
* @property {string|Object} [repo] - The file path at which to store the IPFS node’s data. Alternatively, you can set up a customized storage system by providing an ipfs.Repo instance.
5960
* @property {boolean|Object} [init=true] - Initialize the repo when creating the IPFS node. Instead of a boolean, you may provide an object with custom initialization options. https://github.com/ipfs/js-ipfs/blob/master/README.md#optionsinit
@@ -65,7 +66,7 @@ module.exports = {
6566
* @property {object} [EXPERIMENTAL] - Enable and configure experimental features. https://github.com/ipfs/js-ipfs/blob/master/README.md#optionsexperimental Default: `{ ipnsPubsub: false, sharding: false }`
6667
* @property {object} [config] - Modify the default IPFS node config. This object will be merged with the default config; it will not replace it. The default config is documented in the js-ipfs config file docs. https://github.com/ipfs/js-ipfs/blob/master/README.md#optionsconfig
6768
* @property {object} [ipld] - Modify the default IPLD config. This object will be merged with the default config; it will not replace it. Check IPLD docs for more information on the available options. https://github.com/ipfs/js-ipfs/blob/master/README.md#optionsipld
68-
* @property {object|function} [libp2p] - The libp2p option allows you to build your libp2p node by configuration, or via a bundle function. https://github.com/ipfs/js-ipfs/blob/master/README.md#optionslibp2p
69+
* @property {object | Function} [libp2p] - The libp2p option allows you to build your libp2p node by configuration, or via a bundle function. https://github.com/ipfs/js-ipfs/blob/master/README.md#optionslibp2p
6970
* @property {object} [connectionManager] - Configure the libp2p connection manager. https://github.com/ipfs/js-ipfs/blob/master/README.md#optionsconnectionmanager
7071
* @property {boolean} [offline=false] - Run the node offline.
7172
*/
@@ -75,7 +76,7 @@ module.exports = {
7576
* @property {boolean} [test=false] - Flag to activate custom config for tests.
7677
* @property {boolean} [remote] - Use remote endpoint to spawn the controllers. Defaults to `true` when not in node.
7778
* @property {string} [endpoint] - Endpoint URL to manage remote Controllers. (Defaults: 'http://localhost:43134').
78-
* @property {Boolean} [disposable=true] - A new repo is created and initialized for each invocation, as well as cleaned up automatically once the process exits.
79+
* @property {boolean} [disposable=true] - A new repo is created and initialized for each invocation, as well as cleaned up automatically once the process exits.
7980
* @property {string} [type] - The daemon type, see below the options:
8081
* - go - spawn go-ipfs daemon node
8182
* - js - spawn js-ipfs daemon node
@@ -84,10 +85,10 @@ module.exports = {
8485
* @property {Array} [args] - Custom cli args.
8586
* @property {Object} [ipfsHttpModule] - Reference to a IPFS HTTP Client object.
8687
* @property {Object} [ipfsModule] - Reference to a IPFS API object.
87-
* @property {String} [ipfsBin] - Path to a IPFS exectutable.
88+
* @property {string} [ipfsBin] - Path to a IPFS exectutable.
8889
* @property {IpfsOptions} [ipfsOptions] - Options for the IPFS node.
8990
* @property {boolean} [forceKill] - Whether to use SIGKILL to quit a daemon that does not stop after `.stop()` is called. (default true)
90-
* @property {Number} [forceKillTimeout] - How long to wait before force killing a daemon in ms. (default 5000)
91+
* @property {number} [forceKillTimeout] - How long to wait before force killing a daemon in ms. (default 5000)
9192
*/
9293

9394
/**

src/ipfsd-client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ const daemonLog = {
1414

1515
/**
1616
* Controller for remote nodes
17+
*
1718
* @class
1819
*/
1920
class Client {
2021
/**
21-
* @constructor
22+
* @class
2223
* @param {string} baseUrl
2324
* @param {Object} remoteState
2425
* @param {ControllerOptions} options
@@ -184,7 +185,7 @@ class Client {
184185
/**
185186
* Get the version of ipfs
186187
*
187-
* @returns {Promise<String>}
188+
* @returns {Promise<string>}
188189
*/
189190
async version () {
190191
const req = await http.get(

src/ipfsd-daemon.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ function translateError (err) {
2727

2828
/**
2929
* Controller for daemon nodes
30+
*
3031
* @class
3132
*
3233
*/
3334
class Daemon {
3435
/**
35-
* @constructor
36+
* @class
3637
* @param {ControllerOptions} [opts]
3738
*/
3839
constructor (opts) {
@@ -153,7 +154,7 @@ class Daemon {
153154
/**
154155
* Start the daemon.
155156
*
156-
* @return {Promise<Daemon>}
157+
* @returns {Promise<Daemon>}
157158
*/
158159
async start () {
159160
const args = ['daemon']
@@ -227,7 +228,7 @@ class Daemon {
227228
/**
228229
* Stop the daemon.
229230
*
230-
* @return {Promise<Daemon>}
231+
* @returns {Promise<Daemon>}
231232
*/
232233
async stop () {
233234
if (!this.started) {
@@ -270,7 +271,7 @@ class Daemon {
270271
/**
271272
* Get the pid of the `ipfs daemon` process.
272273
*
273-
* @returns {Promise<Number>}
274+
* @returns {Promise<number>}
274275
*/
275276
pid () {
276277
if (this.subprocess) {
@@ -286,7 +287,7 @@ class Daemon {
286287
*
287288
* @private
288289
* @param {string} [key] - A specific config to retrieve.
289-
* @returns {Promise<Object|String>}
290+
* @returns {Promise<Object | string>}
290291
*/
291292
async _getConfig (key = 'show') {
292293
const {
@@ -331,7 +332,7 @@ class Daemon {
331332
/**
332333
* Get the version of ipfs
333334
*
334-
* @returns {Promise<String>}
335+
* @returns {Promise<string>}
335336
*/
336337
async version () {
337338
const {

src/utils.browser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const deleteDb = (path) => {
1111

1212
/**
1313
* close repoPath , repoPath/keys, repoPath/blocks and repoPath/datastore
14+
*
1415
* @param {string} repoPath
1516
*/
1617
const removeRepo = async (repoPath) => {

0 commit comments

Comments
 (0)