Skip to content

fix: preserve SEA build defines on Windows - #64

Merged
altaywtf merged 1 commit into
mainfrom
fix/windows-sea-build-config
Aug 15, 2026
Merged

fix: preserve SEA build defines on Windows#64
altaywtf merged 1 commit into
mainfrom
fix/windows-sea-build-config

Conversation

@altaywtf

Copy link
Copy Markdown
Member

Summary

Fix the Windows SEA release build after the v1.6.0 workflow exposed a shell-quoting bug in the esbuild CLI invocation.

Changed

  • call esbuild through its typed Node API
  • pass crash-reporting build defines as values instead of shell-quoted arguments
  • keep the existing SEA output, target, bundling, and release-time DSN requirement unchanged

Risk

Low. This only changes how the existing SEA build options reach esbuild. It does not change crash-reporting policy, runtime telemetry behavior, or Sentry configuration.

Verification

  • pnpm exec vp check scripts/build-sea.mts
  • PUTIO_CLI_REQUIRE_SENTRY_DSN=true PUTIO_CLI_SENTRY_DSN=<public-dsn> pnpm exec vp run build:sea
  • pnpm exec vp run verify:sea
  • env -u PUTIO_CLI_SENTRY_DSN -u PUTIO_CLI_REQUIRE_SENTRY_DSN pnpm exec vp run verify
  • pre-push verification: 33 files / 339 tests passed

The failed Windows release log for v1.6.0 reported Invalid define value after the .cmd wrapper stripped JSON quoting from the CLI argument.

Copilot AI lite review requested due to automatic review settings August 15, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the Windows SEA release build by switching the SEA entry bundling step from an esbuild CLI invocation (susceptible to .cmd quoting issues) to the typed Node esbuild API, ensuring crash-reporting define values are preserved correctly.

Changes:

  • Replaced the execFileSync-driven esbuild CLI call with esbuild.buildSync(...).
  • Passed crash-reporting build defines via the API define map (instead of shell-constructed --define: arguments), preserving JSON quoting on Windows.
  • Kept SEA bundling output/target settings consistent (bundle, cjs, node, node24, same outfile path).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@altaywtf
altaywtf merged commit 0df8cf5 into main Aug 15, 2026
7 checks passed
@altaywtf
altaywtf deleted the fix/windows-sea-build-config branch August 15, 2026 11:46
putio-releaser Bot added a commit that referenced this pull request Aug 15, 2026
## [1.6.1](v1.6.0...v1.6.1) (2026-08-15)

### Bug Fixes

* preserve SEA build defines on Windows ([#64](#64)) ([0df8cf5](0df8cf5))
@putio-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants