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

Forbid top-level-await in __syncModuleProgram__ module source protocol #2590

Open
kriskowal opened this issue Oct 18, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@kriskowal
Copy link
Member

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 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”.

Platform environment

Endo at 271aa92

@kriskowal kriskowal added the bug Something isn't working label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant