Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
repl: preload missing constants module
The `constants` module was previously missing from the
list of builtin modules which are available without requiring
in the repl and using the `--eval` command line option.

This patch adds it to that list.
  • Loading branch information
addaleax committed Apr 30, 2016
commit 24664c9dd4ca0c06388823f1a56874e04595bdcb
6 changes: 3 additions & 3 deletions lib/internal/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function stripBOM(content) {
}

exports.builtinLibs = ['assert', 'buffer', 'child_process', 'cluster',
'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'net',
'os', 'path', 'punycode', 'querystring', 'readline', 'repl', 'stream',
'string_decoder', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib'];
'constants', 'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http',
'https', 'net', 'os', 'path', 'punycode', 'querystring', 'readline', 'repl',
'stream', 'string_decoder', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib'];

function addBuiltinLibsToObject(object) {
// Make built-in modules available directly (loaded lazily).
Expand Down