Skip to content

Modules under flags should not be exposed in the REPL if the flag is not set #39911

@Mesteery

Description

@Mesteery

I think that (experimental) modules under flags should not be exposed in the REPL if the flag is not set.

Expected:
The --experimental-wasi-unstable-preview1 flag must be set normally for this to work.

$ node
Welcome to Node.js v16.8.0.
Type ".help" for more information.
> wasi
Uncaught ReferenceError: wasi is not defined

Currently:

$ node
Welcome to Node.js v16.8.0.
Type ".help" for more information.
> wasi
{ WASI: [class WASI] }
> (node:15508) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

Metadata

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions