Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
avivkeller opened this issue Sep 13, 2024 · 2 comments · Fixed by #54980
Closed
Labels
confirmed-bug Issues with confirmed bugs. esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders module Issues and PRs related to the module subsystem.

Comments

@avivkeller
Copy link
Member

avivkeller commented Sep 13, 2024

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

@avivkeller avivkeller added confirmed-bug Issues with confirmed bugs. loaders Issues and PRs related to ES module loaders labels Sep 13, 2024
@aduh95
Copy link
Contributor

aduh95 commented Sep 14, 2024

Silently exits.

What's the exit code though?

@avivkeller
Copy link
Member Author

0:

$ node repro.js && echo $? 
(node:6296) [MODULE_TYPELESS_PACKAGE_JSON] Warning: file:///repro.js parsed as an ES module because module syntax was detected; to avoid the performance penalty of syntax detection, add "type": "module" to /package.json
(Use `node --trace-warnings ...` to show where the warning was created)
0

joyeecheung pushed a commit to joyeecheung/node that referenced this issue Oct 1, 2024
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
targos pushed a commit that referenced this issue Oct 4, 2024
PR-URL: #54980
Fixes: #54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@GeoffreyBooth GeoffreyBooth added module Issues and PRs related to the module subsystem. esm Issues and PRs related to the ECMAScript Modules implementation. labels Nov 8, 2024
@GeoffreyBooth GeoffreyBooth changed the title Typeless Module Detection does not report unsettled top-level await detect-module: Typeless module syntax detection does not report unsettled top-level await Nov 8, 2024
tpoisseau pushed a commit to tpoisseau/node that referenced this issue Nov 21, 2024
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
joyeecheung pushed a commit to joyeecheung/node that referenced this issue Feb 5, 2025
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
joyeecheung pushed a commit to joyeecheung/node that referenced this issue Feb 5, 2025
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
joyeecheung pushed a commit to joyeecheung/node that referenced this issue Feb 5, 2025
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
joyeecheung pushed a commit to joyeecheung/node that referenced this issue Feb 5, 2025
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
joyeecheung pushed a commit to joyeecheung/node that referenced this issue Feb 6, 2025
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
joyeecheung pushed a commit to joyeecheung/node that referenced this issue Feb 6, 2025
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
joyeecheung pushed a commit to joyeecheung/node that referenced this issue Feb 10, 2025
PR-URL: nodejs#54980
Fixes: nodejs#54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
marco-ippolito pushed a commit that referenced this issue Feb 11, 2025
PR-URL: #54980
Backport-PR-URL: #56927
Fixes: #54931
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Refs: #52697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders module Issues and PRs related to the module subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants