Do not load readline from util.inspect
authorRyan Dahl <ry@tinyclouds.org>
Tue, 13 Sep 2011 01:25:00 +0000 (18:25 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 13 Sep 2011 01:25:23 +0000 (18:25 -0700)
This causes all modules using console.log() to load readline which seems
unnecessary.

lib/util.js
test/simple/test-module-load-list.js

index 5e4f1a6..c2a118a 100644 (file)
@@ -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 ') +
            ' ' +
index ba430fa..fb2a72e 100644 (file)
@@ -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;