Browse Source

Do not load readline from util.inspect

This causes all modules using console.log() to load readline which seems
unnecessary.
Ryan Dahl 13 years ago
parent
commit
8c87250816
  1. 2
      lib/util.js
  2. 11
      test/simple/test-module-load-list.js

2
lib/util.js

@ -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 ') +
' ' +

11
test/simple/test-module-load-list.js

@ -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;
@ -98,7 +91,6 @@ if (!process.features.uv) {
'Binding timer_wrap',
'NativeModule _linklist',
'Binding pipe_wrap',
'NativeModule readline'
]);
break;
@ -110,9 +102,6 @@ if (!process.features.uv) {
'Binding timer_wrap',
'NativeModule _linklist',
'Binding pipe_wrap',
'NativeModule readline',
'NativeModule tty',
'NativeModule tty_posix',
]);
break;

Loading…
Cancel
Save