GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(pack): generate declarations with bundled tsrs without typescript by fengmk2 · Pull Request #3433 · voidzero-dev/vite-plus

Conversation

@fengmk2

@fengmk2 fengmk2 commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Projects that do not install typescript cannot generate declarations with vp pack today. The build fails with "TypeScript is not installed". Upgrading tsdown alone does not change this, because the declaration plugin never selects tsrs automatically.

With this change, vp pack selects generator: 'tsrs' with the tsrs package that vite-plus already ships for lint, in that case only. All other generator choices stay with upstream, so builds that work today keep their output.

  • The selection runs in the CLI between resolveUserConfig() and buildWithConfigs(), so it also covers declarations that tsdown infers from package.json.
  • It keeps explicit generators, Oxc for isolatedDeclarations (including through extends), Vue and custom languages, and configs without a tsconfig.
  • Without typescript, dts.compilerOptions and dts.tsconfigRaw fail with a diagnostic, because native generators do not apply them to the program.
  • An explicit generator: 'tsrs' also gets the bundled tsrs as dts.tsrs.moduleUrl. Core gets no new dependency.
  • When no generator is set, the plugin's experimental tsrs notice is suppressed, so failOnWarn builds do not fail after a successful emit. One info line names the bundled tsrs version instead:
ℹ Generating declarations with bundled tsrs v7.1.0-beta.tsrs4 (experimental) because `typescript` is not installed
ℹ Build start
ℹ Emit types with tsrs

Projects without typescript get tsrs declarations with pnpm hoist: false and with pnpm's default hoisting. The new command_pack_dts_tsrs and command_pack_dts_tsrs_hoisted cases record both layouts.

The RFC covers the design, the tsrs version coupling, release gates, upstream requests, and the upgrade items that stay open after #3511.

Stacked on #3511, which upgrades to tsdown 0.23.7 and the declaration plugin 0.30.2. The plugin 0.28.8 on main does not know the tsrs generator. Merge #3511 first.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jong-kyung reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://codex-tsdown-native-design-viteplus-dev.voidzero-docs.workers.dev (commit 46de882)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e7f35fb1-viteplus-dev.voidzero-docs.workers.dev 46de882 2026-11-25T16:47:02.930Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9a1dc198-viteplus-dev.voidzero-docs.workers.dev afa29d4 2026-11-25T08:01:38.874Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0347c319-viteplus-dev.voidzero-docs.workers.dev c9bfbf0 2026-11-25T07:40:40.523Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f0ea8ca6-viteplus-dev.voidzero-docs.workers.dev 568d670 2026-11-25T07:09:42.995Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c865c9eb-viteplus-dev.voidzero-docs.workers.dev a5ec321 2026-11-25T06:16:16.961Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://37f815e0-viteplus-dev.voidzero-docs.workers.dev b6e30c4 2026-11-23T13:54:01.551Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a963eaab-viteplus-dev.voidzero-docs.workers.dev f33f818 2026-11-19T13:12:06.412Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c71f54de-viteplus-dev.voidzero-docs.workers.dev 1fab03e 2026-11-19T12:15:47.362Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://63e6a7e6-viteplus-dev.voidzero-docs.workers.dev ed9befd 2026-11-18T03:56:39.428Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://39da2467-viteplus-dev.voidzero-docs.workers.dev 73e2953 2026-11-11T09:21:14.726Z Visit the dashboard ↗
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Base automatically changed from codex/tsrs-lint-bench to main November 16, 2026 17:03
@fengmk2
fengmk2 force-pushed the codex/tsdown-native-design branch 2 times, most recently from ed9befd to 1fab03e Compare November 19, 2026 12:14
@fengmk2 fengmk2 changed the title docs(rfc): design native declarations for vp pack feat(pack): generate declarations with bundled tsrs without typescript Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 46de882

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fengmk2
fengmk2 force-pushed the codex/tsdown-native-design branch from f33f818 to b6e30c4 Compare November 23, 2026 13:53
@fengmk2
fengmk2 changed the base branch from main to codex/vite-8.4-beta November 23, 2026 13:53
@fengmk2
fengmk2 force-pushed the codex/tsdown-native-design branch from b6e30c4 to a5ec321 Compare November 25, 2026 06:15
@fengmk2
fengmk2 added this pull request to stack #3574 November 25, 2026 06:15
@fengmk2
fengmk2 force-pushed the codex/tsdown-native-design branch 2 times, most recently from 568d670 to c9bfbf0 Compare November 25, 2026 07:39
@fengmk2
fengmk2 force-pushed the codex/tsdown-native-design branch 2 times, most recently from afa29d4 to 2aa3343 Compare November 25, 2026 16:35
fengmk2 and others added 6 commits November 26, 2026 00:45
@fengmk2
docs(rfc): design native declarations for vp pack
cd00622
@fengmk2 @claude
docs(rfc): narrow native declarations to a CLI fallback
35d5a3c
Select bundled tsrs only where the declaration plugin would fail with
"TypeScript is not installed", and leave every other generator choice
to upstream. Run the selection in the CLI between resolveUserConfig()
and buildWithConfigs(), and pass the CLI's own tsrs as
dts.tsrs.moduleUrl instead of adding a core dependency.

Rebase the baseline on main after #3352, document the tsrs version
coupling and the failOnWarn behavior, and move the tsdown/Rolldown
upgrade and migration rewrites out of scope.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fengmk2 @claude
feat(pack): generate declarations with bundled tsrs without typescript
ae53afd
When a `vp pack` build needs declarations and `typescript` does not
resolve from the declaration plugin, select `generator: 'tsrs'` with
the tsrs package that vite-plus ships for lint. Upstream fails with
"TypeScript is not installed" in that case, so builds that work today
keep their generator.

The selection runs after resolveUserConfig(), so it also covers
declarations that tsdown infers from package.json. It keeps explicit
generators, isolated declarations (Oxc), Vue and custom languages, and
configs without a tsconfig. It rejects dts.compilerOptions and
dts.tsconfigRaw without typescript, because native generators ignore
them. An explicit tsrs generator also gets the bundled tsrs moduleUrl.

The plugin's experimental tsrs notice is suppressed when no generator
is set, so failOnWarn builds do not fail after a successful emit. One
info line names the bundled tsrs version instead.

This needs the bundled declaration plugin 0.30 (tsdown 0.23.7).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fengmk2 @claude
docs(rfc): rebase the native declarations baseline on #3511
4aa827d
#3511 performs the tsdown 0.23.7, declaration plugin 0.30.2,
Rolldown 1.3.3, and Vite 8.4 beta upgrade. Record what it handles
(native-preview, tsgo.path, the TypeScript 7.1 peer range, yuku) and
the upgrade items that stay open (dts.entry, deprecated top-level
options, yuku on musl). Note that tsrs4 also passes the probe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fengmk2 @claude
test(pack): cover declarations without typescript
f537a2d
Add packed-CLI snapshot cases for a project without typescript, with
pnpm hoist:false and with default hoisting. Both select the bundled
tsrs, and the experimental tsrs notice does not fail --fail-on-warn.

Print the tsrs version with a v prefix, like other tool banners, so
snapshot redaction masks it and tsrs updates do not churn the cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fengmk2 @claude
fix(pack): follow the Oxlint preset in the declaration selection
f2cab40
The rebased base adopts the Cloudflare Oxlint preset (#3562). Type the
selection with the resolved tsdown dts options instead of unknown
records, parse tsconfig files through the shared JSON helpers, and drop
the type assertions in pack-bin and the tests.

Track only the current `extends` path when reading
isolatedDeclarations, so a base that two `extends` entries share is
not reported as a cycle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fengmk2 @claude
docs(rfc): note the Vite 8.4.0-beta.2 baseline from #3511
46de882
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fengmk2
fengmk2 force-pushed the codex/tsdown-native-design branch from 2aa3343 to 46de882 Compare November 25, 2026 16:46

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@fengmk2
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.