- Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Closed
Copy link
Labels
data:jsCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript
Description
What type of issue is this?
Missing compatibility data
What information was incorrect, unhelpful, or incomplete?
import.meta.resolve in Node.js is reported as returning a Promise.
What browsers does this problem apply to, if applicable?
No response
What did you expect to see?
Since some v20.x release, import.meta.resolve in Node.js now returns synchronously.
Did you test this? If so, how?
I've not run tests.
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
The latest Node.js v19 docs report returning a Promise:
This function is asynchronous because the ES module resolver in Node.js is allowed to be asynchronous.
The current v20 docs (v20.4.0 at time of writing) report that this is now synchronous:
In alignment with browser behavior, this now returns synchronously.
History is not given in the Node.js docs. I'm not sure which specific version first made this change.
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta
MDN metadata
MDN page report details
- Query:
javascript.operators.import_meta - Report started: 2023-07-10T01:35:42.309Z
regseb
Metadata
Metadata
Assignees
Labels
data:jsCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript