Skip to content

Commit 5716df0

Browse files
authored
Merge pull request #573 from minrk/npm-bump
consolidated nodejs bump
2 parents d5de030 + ba1cf80 commit 5716df0

File tree

7 files changed

+1009
-450
lines changed

7 files changed

+1009
-450
lines changed

bin/configurable-http-proxy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
//
88
"use strict";
99

10-
var fs = require("fs"),
10+
const fs = require("fs"),
1111
pkg = require("../package.json"),
12-
cli = require("commander"),
12+
{ Command } = require("commander"),
1313
tls = require("tls"),
1414
winston = require("winston");
1515

16+
const cli = new Command();
1617
cli
1718
.version(pkg.version)
1819
.option("--ip <ip-address>", "Public-facing IP of the proxy")

lib/log.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
2-
var strftime = require("strftime"),
3-
winston = require("winston");
2+
const winston = require("winston");
43

54
const simpleFormat = winston.format.printf((info) => {
65
// console.log(info);
@@ -13,9 +12,7 @@ function defaultLogger(options) {
1312
winston.format.colorize(),
1413
winston.format.label({ label: "ConfigProxy" }),
1514
winston.format.splat(),
16-
winston.format.timestamp({
17-
format: () => strftime("%H:%M:%S.%L", new Date()),
18-
}),
15+
winston.format.timestamp(),
1916
simpleFormat
2017
);
2118
options.transports = [new winston.transports.Console()];

lib/testutil.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,8 @@ exports.teardownServers = function (callback) {
149149
};
150150
for (var i = servers.length - 1; i >= 0; i--) {
151151
servers[i].close(onclose);
152+
// closeAllConnections is implied in close in node >=19
153+
// but this avoids waits between all tests with node 18
154+
servers[i].closeAllConnections();
152155
}
153156
};

0 commit comments

Comments
 (0)