Skip to content

Commit

Permalink
lib: remove unused modules
Browse files Browse the repository at this point in the history
Some files in `lib` were using `require` to load modules that were
subsequently not used in the file. This removes those `require`
statements.

PR-URL: #4396
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
Trott committed Dec 25, 2015
1 parent 7d1d0b7 commit fdeb862
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const util = require('util');
const net = require('net');
const url = require('url');
const EventEmitter = require('events');
const HTTPParser = process.binding('http_parser').HTTPParser;
const assert = require('assert').ok;
const common = require('_http_common');
Expand Down
1 change: 0 additions & 1 deletion lib/os.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const binding = process.binding('os');
const util = require('util');
const internalUtil = require('internal/util');
const isWindows = process.platform === 'win32';

Expand Down
1 change: 0 additions & 1 deletion lib/tty.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const util = require('util');
const internalUtil = require('internal/util');
const net = require('net');
const TTY = process.binding('tty_wrap').TTY;
const isTTY = process.binding('tty_wrap').isTTY;
Expand Down

3 comments on commit fdeb862

@Fishrock123
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following needs to be amended to this commit when backporting:

diff --git a/lib/tty.js b/lib/tty.js
index 82b8e62..f3f84ca 100644
--- a/lib/tty.js
+++ b/lib/tty.js
@@ -1,6 +1,7 @@
 'use strict';

 const util = require('util');
+const internalUtil = require('internal/util');
 const net = require('net');
 const TTY = process.binding('tty_wrap').TTY;
 const isTTY = process.binding('tty_wrap').isTTY;

@Trott
Copy link
Member Author

@Trott Trott commented on fdeb862 Jan 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will probably fail in the linting step if you do that, no? Maybe just don't backport the linting commit? In which case maybe don't backport this commit?

@Fishrock123
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because this should have been removed in a2c0aa8, a breaking change. :)

Please sign in to comment.