Skip to content

Commit 010281a

Browse files
chore(upgrade): dependencies (including Node v12, eslint v6, and nyc)
* Remove unusued config files * Test also on travis 12 * Bump eslint to v6 * Update all dependencies (dev and prod) * Upgrade istanbul to nyc * Remove deprecated bithound badge
1 parent 47e09c8 commit 010281a

9 files changed

+19
-124
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ yarn.lock
1717

1818
# build task results for ci
1919
coverage/
20+
.nyc_output/

.jscsrc

-103
This file was deleted.

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ language: node_js
44
node_js:
55
- '8'
66
- '10'
7+
- '12'
78
- "lts/*" # Active LTS release
89
- "node" # Latest stable release
910
after_success:

.yo-rc.json

-3
This file was deleted.

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ YARN := yarn
2424
NPM := npm
2525
COVERALLS := $(NODE_BIN)/coveralls
2626
ESLINT := $(NODE_BIN)/eslint
27-
ISTANBUL := $(NODE_BIN)/istanbul
27+
ISTANBUL := $(NODE_BIN)/nyc
2828
MOCHA := $(NODE_BIN)/mocha
2929
_MOCHA := $(NODE_BIN)/_mocha
3030
UNLEASH := $(NODE_BIN)/unleash
@@ -100,12 +100,12 @@ test: $(NODE_MODULES) ## Run unit tests
100100

101101
.PHONY: coverage
102102
coverage: $(NODE_MODULES) clean-coverage ## Generate test coverage
103-
@$(ISTANBUL) cover $(_MOCHA) --report lcovonly -- -R spec
103+
@$(ISTANBUL) --report lcovonly $(_MOCHA) -R spec
104104

105105

106106
.PHONY: report-coverage
107107
report-coverage: $(NODE_MODULES) coverage ## Report test coverage to Coveralls
108-
@cat $(LCOV) | $(COVERALLS)
108+
$(ISTANBUL) report --reporter=text-lcov | $(COVERALLS)
109109

110110

111111
.PHONY: clean-coverage

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![Coverage Status](https://coveralls.io/repos/restify/errors/badge.svg?branch=master)](https://coveralls.io/r/restify/errors?branch=master)
66
[![Dependency Status](https://david-dm.org/restify/errors.svg)](https://david-dm.org/restify/errors)
77
[![devDependency Status](https://david-dm.org/restify/errors/dev-status.svg)](https://david-dm.org/restify/errors#info=devDependencies)
8-
[![bitHound Score](https://www.bithound.io/github/restify/errors/badges/score.svg)](https://www.bithound.io/github/restify/errors/master)
98

109
> A collection of HTTP and REST Error constructors.
1110

lib/baseClasses/HttpError.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function HttpError() {
9090
* @property
9191
* @type {Function}
9292
*/
93-
if (opts.hasOwnProperty('toJSON')) {
93+
if (Object.prototype.hasOwnProperty.call(opts, 'toJSON')) {
9494
self.toJSON = opts.toJSON;
9595
}
9696

@@ -100,7 +100,7 @@ function HttpError() {
100100
* @property
101101
* @type {Function}
102102
*/
103-
if (opts.hasOwnProperty('toString')) {
103+
if (Object.prototype.hasOwnProperty.call(opts, 'toString')) {
104104
self.toString = opts.toString;
105105
}
106106
}

lib/helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function parseVErrorArgs(ctorArgs) {
4646
if (_.isPlainObject(args[0])) {
4747
// split restify-errors options from verror options
4848
_.forOwn(args[0], function(val, key) {
49-
if (INTERNAL_OPTS_KEYS.hasOwnProperty(key)) {
49+
if (Object.prototype.hasOwnProperty.call(INTERNAL_OPTS_KEYS, key)) {
5050
internalOpts[key] = val;
5151
} else {
5252
verrorOpts[key] = val;

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@
3535
"test": "make test"
3636
},
3737
"devDependencies": {
38-
"bunyan": "^1.8.10",
38+
"bunyan": "^1.8.12",
3939
"chai": "^4.2.0",
40-
"conventional-changelog-angular": "^5.0.0",
41-
"conventional-recommended-bump": "^4.0.0",
42-
"coveralls": "^3.0.3",
43-
"eslint": "^5.16.0",
44-
"istanbul": "^0.4.5",
40+
"conventional-changelog-angular": "^5.0.6",
41+
"conventional-recommended-bump": "^6.0.5",
42+
"coveralls": "^3.0.9",
43+
"eslint": "^6.7.2",
4544
"mkdirp": "^0.5.1",
46-
"mocha": "^6.1.4",
47-
"restify": "^8.3.1",
48-
"restify-clients": "^2.6.4",
45+
"mocha": "^6.2.2",
46+
"nyc": "^14.1.1",
47+
"restify": "^8.5.0",
48+
"restify-clients": "^2.6.7",
4949
"unleash": "^2.0.1"
5050
},
5151
"optionalDependencies": {
52-
"safe-json-stringify": "^1.0.4"
52+
"safe-json-stringify": "^1.2.0"
5353
},
5454
"dependencies": {
55-
"@netflix/nerror": "^1.0.0",
55+
"@netflix/nerror": "^1.1.3",
5656
"assert-plus": "^1.0.0",
5757
"lodash": "^4.17.15"
5858
}

0 commit comments

Comments
 (0)