Migrate plugin-tools from tsup to tsdown#607
Conversation
Replace tsup with tsdown as the build tool for the plugin-tools package. Updates dependencies and build config accordingly.
There was a problem hiding this comment.
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-toolsbuild script/config fromtsuptotsdown. - Bump
commander+@commander-js/extra-typingsto v14 andvitestto v4. - Update
yarn.lockand remove now-unneeded.yarn/cacheentries 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-toolsstill declaresmain/exports/binpointing atdist/*.js, but tsdown in this repo appears to commonly emit.mjsfor ESM builds (e.g.packages/code-link-cli). Please ensure the tsdown config is explicitly producingdist/cli.js+dist/index.js(and that the shebang banner applies to the actual output filename), or updatepackage.jsonto point to the emitted.mjsfiles.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -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" | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Description
Migrates the
plugin-toolspackage 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
Testing
yarn buildinpackages/plugin-tools.d.tsgenerationyarn run g:packfrom a plugin (e.g.plugins/code-link)plugin.zipis producedyarn testinpackages/plugin-tools