-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Rename InternalModuleReadFile and friends. #17076
Comments
That pull request's been open for six weeks, why didn't you comment then? I don't think the name matters, it's used in only one place. Pull requests welcome, I guess, but honestly, it seems very low value. |
I wasn't aware of the PR until I saw the commit message next to "lib/module.js" when navigating files on GitHub 😋
The name and function matter, in part, because it's an appealing pseudo private. Since this is designated a semver major change anyway it might as well be a clean break with either an API name change or a new helper. I mentioned the potential usefulness of this helper to @Trott in the hallway track of Node Interactive. Do others have an opinion or preference for direction? Update: |
due to change in node.js(nodejs/node#17076) internalModuleReadFile has been renamed to internalModuleReadJSON, and in vendor/node/lib/internal/modules/cjs/loader.js it will call internalModuleReadJSON and result in can't read the package.json file.
due to change in node.js(nodejs/node#17076) internalModuleReadFile has been renamed to internalModuleReadJSON, and in vendor/node/lib/internal/modules/cjs/loader.js it will call internalModuleReadJSON and result in can't read the package.json file.
due to change in node.js(nodejs/node#17076) internalModuleReadFile has been renamed to internalModuleReadJSON, and in vendor/node/lib/internal/modules/cjs/loader.js it will call internalModuleReadJSON and result in can't read the package.json file.
As per nodejs/node#17076 the functions have been renamed in node now. This reenables dynamic loading of modules using the node10 runtime.
With the addition of PR #15767 the internal
InternalModuleReadFile
and pseudo exposedprocess.binding("fs").internalModuleReadFile
are no longer generic read file helpers and are essentially locked down to justjson
.InternalModuleReadFile
was more generically useful before and could have been applied to loading more than justjson
.I think the name
InternalModuleReadFile
, and the pseudo exposedprocess.binding("fs").internalModuleReadFile
, should either be renamed or a new internal forjson
-only should be created (maybe that wrapsInternalModuleReadFile
).The text was updated successfully, but these errors were encountered: