Skip to content

Commit

Permalink
module: revert "optimize js and json file i/o"
Browse files Browse the repository at this point in the history
This reverts commit 7c60328.

It is causing CI failures on Windows.

Ref: #4575
PR-URL: #4679
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
Trott committed Jan 16, 2016
1 parent 3441a41 commit 19f7008
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,14 @@ Module.prototype._compile = function(content, filename) {

// Native extension for .js
Module._extensions['.js'] = function(module, filename) {
var content = internalModuleReadFile(filename);
var content = fs.readFileSync(filename, 'utf8');
module._compile(internalModule.stripBOM(content), filename);
};


// Native extension for .json
Module._extensions['.json'] = function(module, filename) {
var content = internalModuleReadFile(filename);
var content = fs.readFileSync(filename, 'utf8');
try {
module.exports = JSON.parse(internalModule.stripBOM(content));
} catch (err) {
Expand Down

0 comments on commit 19f7008

Please sign in to comment.