Skip to content

Commit bb2e176

Browse files
authored
Merge pull request #3886 from cloudflare/yagiz/add-process-features
add process.features* to node:process
2 parents 58b89fa + e76b751 commit bb2e176

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/node/internal/process.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,27 @@ export function exit(code: number) {
191191

192192
export const platform = utilImpl.processPlatform;
193193

194+
// The following features does not include deprecated or experimental flags mentioned in
195+
// https://nodejs.org/docs/latest/api/process.html
196+
export const features = Object.freeze({
197+
// A boolean value that is true if the current Node.js build is caching builtin modules.
198+
cached_builtins: true,
199+
// A boolean value that is true if the current Node.js build is a debug build.
200+
debug: false,
201+
// A boolean value that is true if the current Node.js build includes the inspector.
202+
inspector: false,
203+
// A boolean value that is true if the current Node.js build supports loading ECMAScript modules using require().
204+
// TODO(soon): Update this when we support ESM modules through require().
205+
require_module: false,
206+
// A boolean value that is true if the current Node.js build includes support for TLS.
207+
tls: true,
208+
});
209+
194210
export default {
195211
nextTick,
196212
env,
197213
exit,
198214
getBuiltinModule,
199215
platform,
216+
features,
200217
};

0 commit comments

Comments
 (0)