Version
18.0.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
require('module').builtinModules
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Everything that's requireable that ships with node is listed (or, the listed items are requireable with node: added).
What do you see instead?
node:test is not listed.
Additional information
There needs to be a way to programmatically discover all builtin modules. require('module').builtinModules is supposed to be it.
This broke assumptions in my tests for https://npmjs.com/is-core-module - specifically, CIGTM should have failed prior to node 18 going out, because node:test wasn't part of is-core-module, but by making it effectively "secret", my tests didn't know about it.
Version
18.0.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
require('module').builtinModulesHow often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Everything that's requireable that ships with node is listed (or, the listed items are requireable with
node:added).What do you see instead?
node:testis not listed.Additional information
There needs to be a way to programmatically discover all builtin modules.
require('module').builtinModulesis supposed to be it.This broke assumptions in my tests for https://npmjs.com/is-core-module - specifically, CIGTM should have failed prior to node 18 going out, because
node:testwasn't part of is-core-module, but by making it effectively "secret", my tests didn't know about it.