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

Use execa to orchestrate running npm scripts, and add a lage-debug command #744

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Apr 25, 2024

Use execa's promise API to handle running npm scripts in NpmScriptRunner, and pass the abort signal directly as an option. I'm wondering if one or both of these changes might address the mysterious intermittent crashes I've seen from lage (the ones that aren't related to hashing).

Due to the external dependency on execa in NpmScriptRunner, it was also necessary to update the bundling logic (previously the runners weren't bundled, so external deps weren't available at runtime). Based on experience with esbuild from cloudpack, I refactored the bundling logic to specify all the entry points in a more "proper" way and create all the bundles in a single operation, rather than a file copy followed by multiple bundle commands.

I also added a new lage-debug command which uses non-minified bundles. If the first change above didn't fix the intermittent crash, the new command should help with figuring it out.

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