Skip to content

detect-module: Typeless module syntax detection does not report unsettled top-level await #54931

Closed
@avivkeller

Description

@avivkeller

Version

v22.8.0

Platform

N/A

Subsystem

No response

What steps will reproduce the bug?

Create a repro.js file:

await new Promise(() => {});

Run repro.js

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

Every time

What is the expected behavior? Why is that the expected behavior?

It should output the same as if the file was named repro.mjs:

Warning: Detected unsettled top-level await at file:///repro.mjs:1
await new Promise(() => {});
^

What do you see instead?

Silently exits.

Additional information

Ref: #54930

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loadersmoduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions