summaryrefslogtreecommitdiff
path: root/lib/module.js
diff options
context:
space:
mode:
authorJohn-David Dalton <john.david.dalton@gmail.com>2017-11-16 13:12:04 -0800
committerRich Trott <rtrott@gmail.com>2017-11-28 16:21:53 -0500
commitfea1e05ba5588eeedc670c5bcfff9a362874deed (patch)
treef77af347ce2babe5d3ab6669c459802583b66d8d /lib/module.js
parentecbae568b7818ef056fc3fe9cc6e5502fb9c9269 (diff)
downloadnode-new-fea1e05ba5588eeedc670c5bcfff9a362874deed.tar.gz
module: rename internalModuleReadFile to internalModuleReadJSON
PR-URL: https://github.com/nodejs/node/pull/17084 Fixes: https://github.com/nodejs/node/issues/17076 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/module.js')
-rw-r--r--lib/module.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/module.js b/lib/module.js
index b22ba4fe66..79c93a5aef 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -31,7 +31,7 @@ const fs = require('fs');
const internalFS = require('internal/fs');
const path = require('path');
const {
- internalModuleReadFile,
+ internalModuleReadJSON,
internalModuleStat
} = process.binding('fs');
const preserveSymlinks = !!process.binding('config').preserveSymlinks;
@@ -122,7 +122,7 @@ function readPackage(requestPath) {
return entry;
const jsonPath = path.resolve(requestPath, 'package.json');
- const json = internalModuleReadFile(path.toNamespacedPath(jsonPath));
+ const json = internalModuleReadJSON(path.toNamespacedPath(jsonPath));
if (json === undefined) {
return false;