← Back to PRs

#16480: fix(build): replace bash A2UI bundle script with cross-platform TypeScript

by colddonkey open 2026-02-14 19:50 View on GitHub →
scripts stale size: S
## Summary - `scripts/bundle-a2ui.sh` fails on Windows because the `bash` subprocess cannot locate `node` in its PATH, even when Node is available in the parent PowerShell/CMD environment. - Replaces the bash script with `scripts/bundle-a2ui.ts` - a cross-platform TypeScript equivalent that runs via `node --import tsx`. Same logic (hash check, tsc, rolldown), works on Windows/macOS/Linux without bash. - Updates `package.json` `canvas:a2ui:bundle` script accordingly. ## Test plan - [x] `pnpm build` completes successfully on Windows (previously failed at A2UI bundling step). - [x] Hash-based skip logic works correctly (re-running skips when sources unchanged). - [x] Docker/missing-sources fallback preserved (keeps prebuilt bundle if sources absent). <!-- greptile_comment --> <h3>Greptile Summary</h3> Replaces the bash script `scripts/bundle-a2ui.sh` with a cross-platform TypeScript equivalent to fix Windows build failures caused by bash subprocess PATH issues. The new implementation preserves all original functionality: hash-based incremental bundling, Docker environment fallback for prebuilt bundles, and identical build command execution (tsc + rolldown). The conversion is straightforward and faithful to the original logic. <h3>Confidence Score: 5/5</h3> - Safe to merge - straightforward script migration with preserved logic and successful test validation - This is a simple bash-to-TypeScript conversion that addresses a legitimate cross-platform issue. The implementation faithfully replicates the original logic (hash computation, file walking, command execution), and the PR author has validated it on Windows with successful builds and correct hash-skip behavior. No functional changes or risky modifications. - No files require special attention <sub>Last reviewed commit: 974a706</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs