Skip to content

wasi incorrectly defined on global #45560

Closed
@nomagick

Description

@nomagick

Version

v18.12.1

Platform

Linux - 5.4.190-107.353.amzn2.x86_6

Subsystem

wasi global

What steps will reproduce the bug?

global.wasi

Object.getOwnPropertyNames(global).forEach((k) => {
    const v = Reflect.get(global, k);
    if (isConstructor(v)) {
        NATIVE_CLASS_PROTOTYPES.set(v.prototype, v);
    }
});

Uncaught Error: Cannot find module 'wasi'

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior?

global.wasi evaluates to undefined;

assert(global.hasOwnProperty('wasi') === false)

What do you see instead?

Uncaught Error: Cannot find module 'wasi' for global.wasi

assert(global.hasOwnProperty('wasi') === true)

Additional information

--experimental-wasi-unstable-preview1 not specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions