Skip to content

Commit 1e5e312

Browse files
authored
deps: remove debug and depd (#114)
1 parent 6479ff4 commit 1e5e312

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/agent.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
const OriginalAgent = require('http').Agent;
44
const ms = require('humanize-ms');
5-
const debug = require('debug')('agentkeepalive');
6-
const deprecate = require('depd')('agentkeepalive');
5+
const debug = require('util').debuglog('agentkeepalive');
76
const {
87
INIT_SOCKET,
98
CURRENT_ID,
@@ -27,6 +26,10 @@ if (majorVersion >= 11 && majorVersion <= 12) {
2726
defaultTimeoutListenerCount = 3;
2827
}
2928

29+
function deprecate(message) {
30+
console.log('[agentkeepalive:deprecated] %s', message);
31+
}
32+
3033
class Agent extends OriginalAgent {
3134
constructor(options) {
3235
options = options || {};

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"contributor": "git-contributor",
1515
"test": "npm run lint && egg-bin test --full-trace",
1616
"test-local": "egg-bin test --full-trace",
17-
"cov": "cross-env DEBUG=agentkeepalive egg-bin cov --full-trace",
17+
"cov": "cross-env NODE_DEBUG=agentkeepalive egg-bin cov --full-trace",
1818
"ci": "npm run lint && npm run cov",
1919
"lint": "eslint lib test index.js"
2020
},
@@ -35,8 +35,6 @@
3535
"HttpsAgent"
3636
],
3737
"dependencies": {
38-
"debug": "^4.1.0",
39-
"depd": "^2.0.0",
4038
"humanize-ms": "^1.2.1"
4139
},
4240
"devDependencies": {

0 commit comments

Comments
 (0)