Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module: remove unnecessary JSON.stringify #3578

Closed
wants to merge 1 commit into from
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
14 changes: 6 additions & 8 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ Module._resolveLookupPaths = function(request, parent) {
id = './' + id;
}

debug('RELATIVE: requested:' + request +
' set ID to: ' + id + ' from ' + parent.id);
debug('RELATIVE: requested: %s set ID to: %s from %s', request, id,
parent.id);

return [id, [path.dirname(parent.filename)]];
};
Expand All @@ -270,7 +270,7 @@ Module._resolveLookupPaths = function(request, parent) {
// object.
Module._load = function(request, parent, isMain) {
if (parent) {
debug('Module._load REQUEST ' + (request) + ' parent: ' + parent.id);
debug('Module._load REQUEST %s parent: %s', request, parent.id);
}

// REPL is a special case, because it needs the real require.
Expand All @@ -292,7 +292,7 @@ Module._load = function(request, parent, isMain) {
}

if (NativeModule.nonInternalExists(filename)) {
debug('load native module ' + request);
debug('load native module %s', request);
return NativeModule.require(filename);
}

Expand Down Expand Up @@ -329,8 +329,7 @@ Module._resolveFilename = function(request, parent) {
var paths = resolvedModule[1];

// look up the filename first, since that's the cache key.
debug('looking for ' + JSON.stringify(id) +
' in ' + JSON.stringify(paths));
debug('looking for %j in %j', id, paths);

var filename = Module._findPath(request, paths);
if (!filename) {
Expand All @@ -344,8 +343,7 @@ Module._resolveFilename = function(request, parent) {

// Given a file name, pass it to the proper extension handler.
Module.prototype.load = function(filename) {
debug('load ' + JSON.stringify(filename) +
' for module ' + JSON.stringify(this.id));
debug('load %j for module %j', filename, this.id);

assert(!this.loaded);
this.filename = filename;
Expand Down