detect-module: Typeless module syntax detection does not report unsettled top-level await #54931
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loaders.Issues and PRs related to ES module loaders.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loaders.Issues and PRs related to ES module loaders.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.
Activity
aduh95 commentedon Sep 14, 2024
What's the exit code though?
avivkeller commentedon Sep 14, 2024
0:module: report unfinished TLA in ambiguous modules
module: report unfinished TLA in ambiguous modules
module: report unfinished TLA in ambiguous modules
[-]Typeless Module Detection does not report unsettled top-level await[/-][+]detect-module: Typeless module syntax detection does not report unsettled top-level await[/+]module: report unfinished TLA in ambiguous modules