You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.
1. If module is not a Cyclic Module Record, then
a. Perform ? module.Evaluate().
b. Return index.
However as per the changes to Abstract Module Record, .Evaluate() always returns a promise. Previously this step would've thrown the resulting error, but now it simply returns a promise which may reject. As such we need to handle rejections.
This will affect JSON modules which are not cyclic module records:
// works even if "./config.json" has a parsing errorimportconfigfrom"./config.json"assert{type: "json" };console.log(config);
The text was updated successfully, but these errors were encountered:
Jamesernator
changed the title
Non-cyclic module errors are ignored
Non-cyclic modules are not waited for
Oct 16, 2020
Realised that the implication is larger than just errors, basically the result of .Evaluate() is not awaited at all. This means if it takes a long time to resolve a cyclic module might execute before .Evaluate() is even finished. As such the value might not even be ready.
In InnerModuleEvaluation Step 1. we have:
However as per the changes to Abstract Module Record,
.Evaluate()
always returns a promise. Previously this step would've thrown the resulting error, but now it simply returns a promise which may reject. As such we need to handle rejections.This will affect JSON modules which are not cyclic module records:
The text was updated successfully, but these errors were encountered: