Skip to content

Commit

Permalink
deps: remove debug and depd (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Aug 6, 2023
1 parent 6479ff4 commit 1e5e312
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

const OriginalAgent = require('http').Agent;
const ms = require('humanize-ms');
const debug = require('debug')('agentkeepalive');
const deprecate = require('depd')('agentkeepalive');
const debug = require('util').debuglog('agentkeepalive');
const {
INIT_SOCKET,
CURRENT_ID,
Expand All @@ -27,6 +26,10 @@ if (majorVersion >= 11 && majorVersion <= 12) {
defaultTimeoutListenerCount = 3;
}

function deprecate(message) {
console.log('[agentkeepalive:deprecated] %s', message);
}

class Agent extends OriginalAgent {
constructor(options) {
options = options || {};
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"contributor": "git-contributor",
"test": "npm run lint && egg-bin test --full-trace",
"test-local": "egg-bin test --full-trace",
"cov": "cross-env DEBUG=agentkeepalive egg-bin cov --full-trace",
"cov": "cross-env NODE_DEBUG=agentkeepalive egg-bin cov --full-trace",
"ci": "npm run lint && npm run cov",
"lint": "eslint lib test index.js"
},
Expand All @@ -35,8 +35,6 @@
"HttpsAgent"
],
"dependencies": {
"debug": "^4.1.0",
"depd": "^2.0.0",
"humanize-ms": "^1.2.1"
},
"devDependencies": {
Expand Down

0 comments on commit 1e5e312

Please sign in to comment.