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
Currently, bundle-source (via @endo/module-source) will happily generate a bundle where a module contains a top-level-await which defers a SyntaxError to runtime, since the enclosing function is not async.
Steps to reproduce
bundle-source entry.mjs where entry.mjs is await null, then run this bundle with importBundle.
Expected behavior
bundle-source should balk because ModuleSource throws a user-meaningful exception like “Endo emulated ModuleSource does not yet support top-level-await”.
Describe the bug
Currently,
bundle-source
(via@endo/module-source
) will happily generate a bundle where a module contains a top-level-await which defers a SyntaxError to runtime, since the enclosing function is notasync
.Steps to reproduce
bundle-source entry.mjs
whereentry.mjs
isawait null
, then run this bundle withimportBundle
.Expected behavior
bundle-source
should balk becauseModuleSource
throws a user-meaningful exception like “Endo emulated ModuleSource does not yet support top-level-await”.Platform environment
Endo at 271aa92
The text was updated successfully, but these errors were encountered: