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

feat: module mode #1021

Merged
merged 3 commits into from
Oct 30, 2024
Merged

feat: module mode #1021

merged 3 commits into from
Oct 30, 2024

Conversation

guybedford
Copy link
Member

@guybedford guybedford commented Oct 22, 2024

This introduces a new flag for --module-mode which disables bundling and runs the modules directly in StarlingMonkey.

This is especially useful for debugging workflows where getting a nice stack of the exact JS sources is very much needed, and I actually just implemented this myself exactly to make a debugging case easier.

In module mode, a new --bundle flag is also support to still bundle in module mode if desired, which then exactly corresponds to the previous top-level await support which is also then implemented as such and that flag is now deprecated and removed from docs for using this technique instead.

--bundle can be kept along on a 3.x timeframe, but should also then get removed on the 4.x path.

Taking module mode out of experimental is dependent on the StarlingMonkey issues bytecodealliance/StarlingMonkey#168 and bytecodealliance/StarlingMonkey#15.

src/printHelp.js Show resolved Hide resolved
integration-tests/cli/help.test.js Show resolved Hide resolved
integration-tests/cli/help.test.js Show resolved Hide resolved
@guybedford guybedford merged commit 9e47649 into main Oct 30, 2024
24 of 25 checks passed
@guybedford guybedford deleted the module-mode branch October 30, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant