Skip to content

feat(cli): tsup -> tsdown -> Vite+ migration - #2434

Open
KTrain5169 wants to merge 17 commits into
voidzero-dev:mainfrom
KTrain5169:tsdown-migrate
Open

feat(cli): tsup -> tsdown -> Vite+ migration#2434
KTrain5169 wants to merge 17 commits into
voidzero-dev:mainfrom
KTrain5169:tsdown-migrate

Conversation

@KTrain5169

@KTrain5169 KTrain5169 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Add automatic tsup migration to vp migrate.

For example, vp migrate --no-interactive changes the nvie/decoders project as follows.

// package.json
- "build": "tsup"
+ "build": "vp pack"

The command removes the tsup dependency. It changes tsup.config.ts to tsdown.config.ts:

-import { defineConfig } from 'tsup';
+import { defineConfig } from 'vite-plus/pack';

 export default defineConfig({
   entry: ['src/index.ts'],
   dts: true,
   splitting: true,
   clean: true,
   format: ['esm', 'cjs'],
+  target: false,
 });

The command adds the converted configuration to vite.config.ts:

import tsdownConfig from './tsdown.config.js';

import { defineConfig } from 'vite-plus';

export default defineConfig({
  pack: tsdownConfig,
});

The command reports the migration:

tsup configuration detected. Auto-migrating to tsdown...
• tsup config migrated to tsdown (`vp pack`)

If the user declines automatic migration or the command fails, Vite+ shows the tsdown-migrate skill for manual migration.

The nvie/decoders ecosystem test runs vp pack and vp test on Linux and Windows.

Use tsdown-migrate@0.23.0-rc.0 because stable 0.22.x does not support non-TTY subprocesses.

The dependency upgrade script keeps this RC while stable tsdown is 0.22.14. It uses the matching stable tsdown-migrate version when stable tsdown advances.

Resolves #2101.

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit c884d16
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a885d51d1a6d800083b2b4c

@KTrain5169
KTrain5169 marked this pull request as ready for review August 13, 2026 06:45
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Registry bridge build (2c85799)

Warning

This build is from the fork KTrain5169/vite-plus and has not been reviewed.
Installing it runs that code on your machine. Build log

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

Package Version
vite-plus 0.0.0-commit.2c857991cf429f3636b5ac65acfe2eff2deed30e
@voidzero-dev/vite-plus-core 0.0.0-commit.2c857991cf429f3636b5ac65acfe2eff2deed30e

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://vite.plus | VP_PR_VERSION=2434 bash
# Windows (PowerShell)
$env:VP_PR_VERSION="2434"; irm https://vite.plus/ps1 | iex

After installing, upgrade the current project's vite-plus to this test build with:

vp migrate

Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:

Package manager Registry config
npm / pnpm / Bun .npmrc: registry=https://registry-bridge.viteplus.dev/
Yarn (v2+) .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/"

Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):

{
  "devDependencies": {
    "vite-plus": "0.0.0-commit.2c857991cf429f3636b5ac65acfe2eff2deed30e",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.2c857991cf429f3636b5ac65acfe2eff2deed30e"
  }
}

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@KTrain5169 Thanks!
I will take over this pr and add a new ecosystem-ci test case for tsdown migration before merge.

@fengmk2 fengmk2 self-assigned this Aug 21, 2026
@socket-security

socket-security Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​tsup@​8.5.1981009583100

View full report

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

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from tsup -> tsdown -> vp pack

2 participants