Skip to content

Migrate plugin-tools from tsup to tsdown#607

Merged
huntercaron merged 1 commit intomainfrom
huntercaron/tsdown-plugin-tools
Mar 23, 2026
Merged

Migrate plugin-tools from tsup to tsdown#607
huntercaron merged 1 commit intomainfrom
huntercaron/tsdown-plugin-tools

Conversation

@huntercaron
Copy link
Collaborator

@huntercaron huntercaron commented Mar 23, 2026

Description

Migrates the plugin-tools package build tooling from tsup to tsdown. Updates commander to v14 and vitest to v4. Removes ~26 transitive dependency cache entries that are no longer needed.

Changelog

  • Replaced tsup with tsdown as the build tool for plugin-tools
  • Updated commander and @commander-js/extra-typings to v14
  • Updated vitest to v4

Testing

  • Build plugin-tools
    • Run yarn build in packages/plugin-tools
    • Verify CLI binary has shebang and runs
    • Verify library exports and .d.ts generation
  • End-to-end pack
    • Run yarn run g:pack from a plugin (e.g. plugins/code-link)
    • Verify plugin.zip is produced
  • Tests pass
    • Run yarn test in packages/plugin-tools

Replace tsup with tsdown as the build tool for the plugin-tools package.
Updates dependencies and build config accordingly.
Copilot AI review requested due to automatic review settings March 23, 2026 14:22
@github-actions github-actions bot added the Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging label Mar 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the framer-plugin-tools workspace from tsup to tsdown for builds, while also updating key CLI/test dependencies (commander + vitest) and cleaning up Yarn dependency artifacts.

Changes:

  • Switch plugin-tools build script/config from tsup to tsdown.
  • Bump commander + @commander-js/extra-typings to v14 and vitest to v4.
  • Update yarn.lock and remove now-unneeded .yarn/cache entries from the previous toolchain.

Reviewed changes

Copilot reviewed 2 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Updates lockfile for tsdown migration and dependency version bumps; drops transitive deps no longer required.
packages/plugin-tools/tsdown.config.ts Replaces tsup config import/shape with tsdown config for CLI + library builds.
packages/plugin-tools/package.json Changes build script to tsdown and bumps commander/vitest dependencies accordingly.
.yarn/cache/@commander-js-extra-typings-npm-14.0.0-3fbbb62a8c-66754a659d.zip Adds new Yarn cache artifact for updated @commander-js/extra-typings version.
.yarn/cache/@commander-js-extra-typings-npm-13.1.0-360957fb64-cdb7f854ac.zip Removes old Yarn cache artifact after dependency bump.
.yarn/cache/any-promise-npm-1.3.0-f34eeaa7e7-6737469ba3.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/bundle-require-npm-5.1.0-022b2c8e1b-735e022005.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/chokidar-npm-4.0.3-962354fbb4-bf2a575ea5.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/commander-npm-13.1.0-bdbbfaaf9d-d3b4b79e6b.zip Cache cleanup due to commander bump.
.yarn/cache/commander-npm-4.1.1-22a0fe921b-3b2dc4125f.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/confbox-npm-0.1.8-8396039b68-4ebcfb1c6a.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/consola-npm-3.4.2-133d72719e-32192c9f50.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/fix-dts-default-cjs-exports-npm-1.0.1-421fe0399f-3324418bb6.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/joycon-npm-3.1.1-3033e0e5f4-4b36e34791.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/lilconfig-npm-3.1.3-74a77377bb-b932ce1af9.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/lines-and-columns-npm-1.2.4-d6c7cc5799-0c37f9f7fa.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/load-tsconfig-npm-0.2.5-70feef5c98-b3176f6f0c.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/mlly-npm-1.8.0-448698f313-4db690a421.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/mz-npm-2.7.0-ec3cef4ec2-8427de0ece.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/pirates-npm-4.0.7-5e4ee2f078-2427f37136.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/pkg-types-npm-1.3.1-832c9cd162-6d491f2244.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/postcss-load-config-npm-6.0.1-50722afd05-1691cfc949.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/readdirp-npm-4.1.2-3440472afe-7b817c2659.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/resolve-from-npm-5.0.0-15c9db4d33-be18a5e4d7.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/source-map-npm-0.7.6-a3854be193-c8d2da7c57.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/sucrase-npm-3.35.1-9a5f68e2af-539f5c6ebc.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/thenify-all-npm-1.6.0-96309bbc8b-dba7cc8a23.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/thenify-npm-3.3.1-030bedb22c-486e1283a8.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/ts-interface-checker-npm-0.1.13-0c7b064494-9f7346b9e2.zip Cache cleanup due to removal of tsup toolchain transitive deps.
.yarn/cache/tsup-npm-8.5.1-41f4f7d59b-f1927ec2dd.zip Cache cleanup due to switching build tool from tsup to tsdown.
.yarn/cache/ufo-npm-1.6.3-29bac69d97-79803984f3.zip Cache cleanup due to removal of tsup toolchain transitive deps.
Comments suppressed due to low confidence (1)

packages/plugin-tools/tsdown.config.ts:12

  • framer-plugin-tools still declares main/exports/bin pointing at dist/*.js, but tsdown in this repo appears to commonly emit .mjs for ESM builds (e.g. packages/code-link-cli). Please ensure the tsdown config is explicitly producing dist/cli.js + dist/index.js (and that the shebang banner applies to the actual output filename), or update package.json to point to the emitted .mjs files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 25 to +47
@@ -35,15 +35,15 @@
"node": ">=22"
},
"dependencies": {
"@commander-js/extra-typings": "^13.1.0",
"@commander-js/extra-typings": "^14.0.0",
"adm-zip": "^0.5.16",
"commander": "^13.1.0"
"commander": "^14.0.3"
},
"devDependencies": {
"@types/adm-zip": "^0.5.7",
"@types/node": "^22.0.0",
"tsup": "^8.0.0",
"tsdown": "^0.20.1",
"typescript": "^5.9.2",
"vitest": "^3.2.4"
"vitest": "^4.1.0"
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

After switching the build script to tsdown, please double-check that the build output filenames still match main/types/exports/bin (currently dist/index.js, dist/index.d.ts, dist/cli.js). If tsdown outputs .mjs for ESM by default, the package entrypoints will break unless the config forces .js or the fields are updated accordingly.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@huntercaron huntercaron requested a review from niekert March 23, 2026 14:27
@niekert niekert deployed to development March 23, 2026 14:31 — with GitHub Actions Active
Copy link
Member

@niekert niekert left a comment

Choose a reason for hiding this comment

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

⬇️ 👏

@huntercaron huntercaron added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 8ee56c6 Mar 23, 2026
12 of 16 checks passed
@huntercaron huntercaron deleted the huntercaron/tsdown-plugin-tools branch March 23, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants