feat(exe)!: require Node >=25.7 and default format to esm#798
Merged
Conversation
✅ Deploy Preview for tsdown-main ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
tsdown
create-tsdown
@tsdown/css
@tsdown/exe
tsdown-migrate
commit: |
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
Raise the minimum Node.js version for
exefrom>=25.5.0to>=25.7.0, and always default to ESM format (removing the CJS fallback for older versions).Motivation
Node.js SEA (Single Executable Applications) introduced an incompatible format change between v25.6.x and v25.7.0. Executables built with one side of this boundary cannot run on the other:
The cross-boundary failure is caused by a
SeaDeserializer::Read()assertion atnode_sea.cc:171:format_value <= static_cast<uint8_t>(ModuleFormat::kModule).Since
@tsdown/exealready requires>=25.7.0for downloading Node binaries (SEA_VERSION_RANGE), aligning the build-time check avoids a confusing gap wheretsdown --exewould appear to succeed on 25.5/25.6 but produce binaries incompatible with the downloaded target.With 25.7.0 as the minimum, ESM SEA is always supported, so the conditional CJS fallback is no longer needed.
Changes
src/features/exe.ts:validateSea()now checks>=25.7.0src/config/options.ts: Remove conditional CJS default when exe is enabled (let→const, alwaysesm)src/config/types.ts: Update JSDoc forformatandexeoptionsdocs/options/exe.md,docs/reference/cli.md: Update requirements and behaviordocs/zh-CN/options/exe.md,docs/zh-CN/reference/cli.md: Chinese docs sync