Skip to content

feat(tsgo): support custom tsgo binary path#164

Merged
sxzz merged 7 commits intosxzz:mainfrom
ryoppippi:feat/tsgo-custom-path
Jan 18, 2026
Merged

feat(tsgo): support custom tsgo binary path#164
sxzz merged 7 commits intosxzz:mainfrom
ryoppippi:feat/tsgo-custom-path

Conversation

@ryoppippi
Copy link
Contributor

Summary

Add support for specifying a custom tsgo binary path via tsgo.path option. This allows users who manage tsgo externally (e.g., via Nix) to use their own binary instead of the bundled @typescript/native-preview package.

What Changed

  • Extended tsgo option to accept boolean | { path: string }
  • Added TsgoOptionsResolved interface for internal handling
  • Updated runTsgo function to accept custom path parameter
  • Added test for custom path functionality

Usage

// Use bundled tsgo (unchanged)
dts({ tsgo: true })

// Use custom tsgo path
dts({ tsgo: { path: '/path/to/tsgo' } })

Backward Compatibility

Existing tsgo: boolean usage remains fully supported.


Follow-up to #163 - implements the tsgo.path option as discussed.

ryoppippi and others added 7 commits January 18, 2026 15:39
Add support for specifying a custom tsgo binary path via `tsgo.path`
option. This is useful when managing tsgo externally (e.g., via Nix)
instead of using the bundled @typescript/native-preview package.

The tsgo option now accepts:
- `tsgo: true` - use bundled @typescript/native-preview (unchanged)
- `tsgo: { path: '/path/to/tsgo' }` - use custom binary path

Backward compatible with existing `tsgo: boolean` usage.

Closes sxzz#163
@sxzz sxzz enabled auto-merge (squash) January 18, 2026 16:07
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 18, 2026

Open in StackBlitz

npm i https://pkg.pr.new/rolldown-plugin-dts@164

commit: 88ac2d1

@sxzz sxzz merged commit 1394d24 into sxzz:main Jan 18, 2026
13 checks passed
@ryoppippi ryoppippi deleted the feat/tsgo-custom-path branch January 18, 2026 16:19
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