Skip to content

Commit 2e942be

Browse files
authored
Drop Node 6 support and bump to 3.0.0 (#236)
1 parent 01dfb4d commit 2e942be

File tree

13 files changed

+4600
-31
lines changed

13 files changed

+4600
-31
lines changed

.eslintrc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"wikimedia/server"
5+
],
6+
"rules": {
7+
"array-bracket-spacing": "off",
8+
"camelcase": "off",
9+
"computed-property-spacing": "off",
10+
"indent": [ "off" ],
11+
"no-console": "off",
12+
"no-process-exit": "off",
13+
"no-shadow": "off",
14+
"no-underscore-dangle": "off",
15+
"no-use-before-define": "off",
16+
"space-in-parens": "off",
17+
"jsdoc/newline-after-description": "off"
18+
}
19+
}

.eslintrc.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [6.x, 10.x, 12.x]
12+
node-version: [10.x, 12.x]
1313

1414
steps:
1515
- uses: actions/checkout@v2
1616
- name: Use Node.js ${{ matrix.node-version }}
1717
uses: actions/setup-node@v1
1818
with:
1919
node-version: ${{ matrix.node-version }}
20-
- run: npm install
20+
- run: npm ci
2121
- run: npm test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ npm-debug.log
55
.vscode/
66
*.iml
77
Dockerfile
8-
package-lock.json
98
.eslintcache
109
.nyc_output

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,12 @@ In package.json, configure `npm start` to call service-runner:
6060
Create a `config.yaml` file following the spec below. Make sure to point the
6161
module parameter to your service's entry point.
6262

63-
Finally, **start your service with `npm start`**. In npm >= 2.0 (node 0.12 or iojs), you can also pass parameters to `service-runner` like this: `npm start -- -c /etc/yourservice/config.yaml`.
63+
Finally, **start your service with `npm start`**. You can also pass parameters to `service-runner` like this: `npm start -- -c /etc/yourservice/config.yaml`.
6464

6565
### As a library
6666

6767
Service-runner can also be used to run services within an application. This is
68-
useful for node 0.10 support, but can also be used to run services for testing
69-
or other purposes.
68+
can also be used to run services for testing or other purposes.
7069

7170
Example script for **starting** a service, using commandline options:
7271

@@ -328,8 +327,7 @@ project](https://phabricator.wikimedia.org/tag/service-runner/).
328327

329328
## See also
330329
- https://github.com/Unitech/PM2 - A lot of features. Focus on interactive
331-
use with commandline tools. Weak on logging (only local log files). Does
332-
not support node 0.10's cluster module.
330+
use with commandline tools. Weak on logging (only local log files).
333331
- https://github.com/strongloop/strong-agent - commercial license. Focus on
334332
profiling and monitoring, although a lot of the functionality is now
335333
available in other libraries.

lib/base_service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ class BaseService {
436436
/**
437437
* Exits the process with a provided exit code with a little delay
438438
* to allow asynchronous logging to complete.
439-
* @param {Integer} [returnCode=0] exit code
439+
* @param {number} [returnCode=0] exit code
440440
* @return {Promise}
441441
* @protected
442442
*/

lib/master.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const PrometheusServer = require('./metrics/servers/prometheus');
1515
* startup fails more then limit times, master is killed with
1616
* exit code 1.
1717
*
18-
* @const
18+
* @constant
1919
* @type {number}
2020
*/
2121
const STARTUP_ATTEMPTS_LIMIT = 3;

lib/metrics/prometheus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class PrometheusMetric {
1818
this.options.labels.names.unshift(labelName);
1919
});
2020
// Normalize all the label names.
21-
this.options.labels.names = this.options.labels.names.map(this._normalize)
21+
this.options.labels.names = this.options.labels.names.map(this._normalize);
2222

2323
this.options.prometheus.name = this._normalize(this.options.prometheus.name);
2424
this.metric = new this.client[this.options.type]({

lib/metrics/statsd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const cloneDeep = require('lodash.clonedeep');
88
/**
99
* Maximum size of a metrics batch used by default.
1010
*
11-
* @const
11+
* @constant
1212
* @type {number}
1313
*/
1414
const DEFAULT_MAX_BATCH_SIZE = 1450;

0 commit comments

Comments
 (0)