Merged
Conversation
4 tasks
Contributor
Author
49090ed to
8eac799
Compare
divmain
approved these changes
Apr 2, 2026
Rename config files to shorter, consistent names: - esbuild.cli.build.mjs -> esbuild.cli.mjs - esbuild.config.mjs -> esbuild.build.mjs (orchestrator) - esbuild.index.config.mjs -> esbuild.index.mjs - esbuild-shared.mjs -> esbuild-utils.mjs Refactor esbuild-utils.mjs: - Replace createBuildRunner() with async runBuild() that properly rethrows errors (enables allSettled rejection detection) - Import esbuild statically instead of dynamically - Use logger instead of console Update all import paths in: - packages/cli/scripts/ (build.mjs, build-js.mjs, cover.mjs, etc.) - packages/package-builder/templates/ (cli-package, cli-sentry-package) - docs/build-guide.md - packages/build-infra/README.md
8eac799 to
e249fe4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
esbuild.cli.build.mjs->esbuild.cli.mjsesbuild.config.mjs->esbuild.build.mjs(orchestrator)esbuild.index.config.mjs->esbuild.index.mjsesbuild-shared.mjs->esbuild-utils.mjsesbuild-utils.mjs: replacecreateBuildRunner()with asyncrunBuild()that properly rethrows errors, imports esbuild statically, and uses loggerpackages/cli/scripts/,packages/package-builder/templates/,docs/build-guide.md, andpackages/build-infra/README.mdSplit from #1140. Best reviewed after #1148 (bug fixes) and #1149 (dead code removal) land.
Test plan
pnpm --filter @socketsecurity/cli run buildsucceeds with renamed configspnpm --filter @socketsecurity/cli run build --watchworksNote
Medium Risk
Medium risk because it rewires the CLI/package-builder build entrypoints and watch mode to new esbuild config filenames and a new orchestrator/runner, so path or execution-flow regressions could break builds despite minimal runtime impact.
Overview
Renames and reshapes the CLI esbuild setup to use shorter, consistent config names (e.g.
esbuild.cli.mjs,esbuild.index.mjs) and introduces a new orchestratoresbuild.build.mjsthat runs variants in parallel.Refactors build execution by replacing
createBuildRunner()with a shared asyncrunBuild()inscripts/esbuild-utils.mjs, and updates CLI build scripts, watch mode, and package-builder templates to call the new configs/utilities.Also updates related docs/README references and tightens build-script robustness (e.g., more consistent
utf-8encoding, explicit handling of failed spawns, andPromise.allSettlederror reporting in post-processing/test wrapper).Written by Cursor Bugbot for commit 49090ed. Configure here.