-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Require from internal folder #14570
Comments
It's available as an undocumented cli switch. I'm not sure I want to name it explicitly here, but if you grep [edit] |
|
We added lib/internal + the switch precisely because people kept mucking with node's internals. The switch is there for our test suite, don't use it. |
To elaborate on @bnoordhuis comment.... Since JS does not have a formal notion of @streamich if you feel that a specific endpoint (or groups of endpoints) should be made public, feel free to raise a PR and IMHO it will receive proper discussion. |
@refack, thanks. Would be great to expose the |
That's coming, probably even in an |
What do you exactly mean? @streamich's reason is very legit. |
if a specific api is needed it would more constructive to discuss exposing that specific api. |
I'm particularly interested in |
@szmarczak Can you file issues for each? |
This might be a somewhat controversial proposal: allow users to require from
internal
folder, likerequire('internal/fs.js')
.One can already use the hidden modules in the
/lib
folder, like:However, I am not aware of a way to access the modules in
/lib/internal
folder. Does anyone know a way torequire
those? Are there any issues with that?I know that in this form it would conflict with the
internal
package, so the exact syntax has still to be figured out.This could be provided as "use at your own risk".
The text was updated successfully, but these errors were encountered: