Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Do not load readline from util.inspect
Browse files Browse the repository at this point in the history
This causes all modules using console.log() to load readline which seems
unnecessary.
  • Loading branch information
ry committed Sep 13, 2011
1 parent 0928f0f commit 8c87250
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion lib/util.js
Expand Up @@ -365,7 +365,7 @@ function reduceToSingleString(output, base, braces) {
return prev + cur.length + 1;
}, 0);

if (length > (require('readline').columns || 50)) {
if (length > 60) {
return braces[0] +
(base === '' ? '' : base + '\n ') +
' ' +
Expand Down
11 changes: 0 additions & 11 deletions test/simple/test-module-load-list.js
Expand Up @@ -78,13 +78,6 @@ if (!process.features.uv) {
case 'fs':
expected = expected.concat([
'NativeModule console',
'NativeModule readline',
'NativeModule tty',
'NativeModule tty_posix',
'NativeModule net_uv',
'NativeModule timers_uv',
'Binding timer_wrap',
'NativeModule _linklist',
]);
break;

Expand All @@ -98,7 +91,6 @@ if (!process.features.uv) {
'Binding timer_wrap',
'NativeModule _linklist',
'Binding pipe_wrap',
'NativeModule readline'
]);
break;

Expand All @@ -110,9 +102,6 @@ if (!process.features.uv) {
'Binding timer_wrap',
'NativeModule _linklist',
'Binding pipe_wrap',
'NativeModule readline',
'NativeModule tty',
'NativeModule tty_posix',
]);
break;

Expand Down

0 comments on commit 8c87250

Please sign in to comment.