Skip to content

feat: add tsdown exe support with cross-platform CD - #78

Open
nyatinte wants to merge 3 commits into
mainfrom
claude/tsdown-exe-support-ga2nO
Open

feat: add tsdown exe support with cross-platform CD#78
nyatinte wants to merge 3 commits into
mainfrom
claude/tsdown-exe-support-ga2nO

Conversation

@nyatinte

@nyatinte nyatinte commented Apr 9, 2026

Copy link
Copy Markdown
Owner
  • 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

claude added 3 commits April 9, 2026 14:14
- 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-bot

changeset-bot Bot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest 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

@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 3.05 kB

ℹ️ View Unchanged
Filename Size
dist/bin.mjs 3.05 kB

compressed-size-action

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread package.json
"build": "tsdown",
"build:exe": "tsdown --config tsdown.exe.config.ts",
"clean:dist": "rm -rf dist",
"clean:exe": "rm -rf exe",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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.

Suggested change
"clean:exe": "rm -rf exe",
"clean:exe": "rimraf exe",

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.

2 participants