Skip to content

test: replace util.inherits with es6 extends

I wanted to see how hard it would be to eradicate util.inherits() from an existing code base and I figured, having done the work, I might as well PR it.

I did a quick and partial attempt at updating lib/ as well but it makes for huge diffs, plus it breaks code that calls constructors as functions (e.g. server = http.Server(cb).)

$ git stash show 
 lib/_debug_agent.js                             | 237 ++++++++++++++++++------------------
 lib/_debugger.js                                | 808 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------
 lib/_http_agent.js                              | 460 +++++++++++++++++++++++++++++++++++----------------------------------
 lib/_http_client.js                             | 590 ++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------
 lib/_http_incoming.js                           | 275 +++++++++++++++++++++---------------------
 lib/http.js                                     |  85 ++++++-------
 lib/https.js                                    | 253 +++++++++++++++++++-------------------
 test/parallel/test-http-keepalive-client.js     |   4 +-
 test/parallel/test-http-keepalive-maxsockets.js |   4 +-
 test/parallel/test-http-keepalive-request.js    |   4 +-
 test/parallel/test-https-agent-servername.js    |   2 +-
 test/parallel/test-https-agent-sni.js           |   2 +-
 test/parallel/test-https-agent.js               |   2 +-
 13 files changed, 1347 insertions(+), 1379 deletions(-)

CI: https://ci.nodejs.org/job/node-test-pull-request/2477/

Merge request reports

Loading