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

Use the core module without importing or requiring it. #56532

Open
shambhu-bcoder opened this issue Jan 9, 2025 · 3 comments
Open

Use the core module without importing or requiring it. #56532

shambhu-bcoder opened this issue Jan 9, 2025 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@shambhu-bcoder
Copy link

What is the problem this feature will solve?

Utilize a core module directly in your application without the need for importing or requiring it.

What is the feature you are proposing to solve the problem?

direclty using its like fs.readFile etc

What alternatives have you considered?

No response

@shambhu-bcoder shambhu-bcoder added the feature request Issues that request new features to be added to Node.js. label Jan 9, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Jan 9, 2025
@joyeecheung
Copy link
Member

joyeecheung commented Jan 9, 2025

I think you are requesting something like process.getBuiltinModule()?

@ljharb
Copy link
Member

ljharb commented Jan 9, 2025

I think maybe they’re asking them to be globals - which wouldn’t be an improvement. Having to explicitly require/import dependencies is a good thing, not a bad thing.

@jasnell
Copy link
Member

jasnell commented Jan 10, 2025

Yeah, that's my interpretation also. If that's the case, definite -1 on making all the node.js core modules globals in non-repl use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Status: Awaiting Triage
Development

No branches or pull requests

4 participants