feat: add tsdown exe support with cross-platform CD - #78
Conversation
- Add @tsdown/exe devDependency for cross-platform SEA builds - Add tsdown.exe.config.ts targeting linux/darwin/win (x64 + arm64) with latest-lts Node.js - Add build:exe and clean:exe npm scripts - Add exe/ to .gitignore - Update release.yml: after changeset publish, build all-platform executables from a single ubuntu runner (Node.js 25 for SEA) and upload to GitHub Release https://claude.ai/code/session_01FfqTVGaM3rpJpKymWD86nx
- Update .node-versions to 25.7.0 (required by tsdown SEA build) - Use node-version-file in release.yml exe job (no hardcoded version) - Fix potential injection: pass publishedPackages via env var before jq - Add comment to tsdown.exe.config.ts explaining default vs targets behavior - Add standalone binary install instructions to README (en/ja) https://claude.ai/code/session_01FfqTVGaM3rpJpKymWD86nx
🦋 Changeset detectedLatest commit: 27ce2b0 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Size Change: 0 B Total Size: 3.05 kB ℹ️ View Unchanged
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27ce2b0638
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| PUBLISHED_PACKAGES: ${{ needs.release.outputs.publishedPackages }} | ||
| run: | | ||
| VERSION=$(echo "$PUBLISHED_PACKAGES" | jq -r '.[0].version') | ||
| echo "tag=@nyatinte/prw@${VERSION}" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Derive the correct Changesets release tag
This hardcodes the release tag to @nyatinte/prw@<version>, but in this repository the publish tag from changesets/action is v<version> (its root-package code path is used when the repo is not detected as a monorepo). As a result, the upload step points softprops/action-gh-release at a tag/release that does not exist, so the exe/* artifacts are not attached after a successful publish.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Code Review
This pull request introduces standalone executable support for multiple platforms (Linux, macOS, Windows) using Node.js SEA via tsdown. Key changes include adding new build scripts (build:exe, clean:exe), updating the .gitignore to include the exe/ directory, and enhancing the README.md and README.ja.md with installation instructions for these new binaries. The Node.js version has also been updated. A review comment suggests improving the clean:exe script, and potentially clean:dist, by using a cross-platform tool like rimraf instead of rm -rf to ensure compatibility, especially for Windows builds.
| "build": "tsdown", | ||
| "build:exe": "tsdown --config tsdown.exe.config.ts", | ||
| "clean:dist": "rm -rf dist", | ||
| "clean:exe": "rm -rf exe", |
There was a problem hiding this comment.
The rm -rf command is not cross-platform and will fail on Windows if a Unix-like environment isn't used. Since this project now builds for Windows, making the development scripts cross-platform would be a good improvement.
Consider using a package like rimraf for deleting directories. You'll need to add it to your devDependencies.
The existing clean:dist script has the same issue and could be updated as well.
| "clean:exe": "rm -rf exe", | |
| "clean:exe": "rimraf exe", |
https://claude.ai/code/session_01FfqTVGaM3rpJpKymWD86nx