Skip to content

feat: migrating from tsup to tsdown#134

Merged
jaredwray merged 1 commit intomainfrom
feat-migrating-from-tsup-to-tsdown
Apr 14, 2026
Merged

feat: migrating from tsup to tsdown#134
jaredwray merged 1 commit intomainfrom
feat-migrating-from-tsup-to-tsdown

Conversation

@jaredwray
Copy link
Copy Markdown
Owner

@jaredwray jaredwray commented Apr 14, 2026

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feat: migrating from tsup to tsdown

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (923516f) to head (7b086c0).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #134   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        37           
  Lines         1063      1063           
  Branches       211       211           
=========================================
  Hits          1063      1063           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray jaredwray merged commit 90d0ff7 into main Apr 14, 2026
9 checks passed
@jaredwray jaredwray deleted the feat-migrating-from-tsup-to-tsdown branch April 14, 2026 12:06
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the build system from tsup to tsdown, upgrades TypeScript to version 6.0.2, and transitions the project to ESM by using .mjs and .d.mts extensions. It also introduces a clean script and removes decorator-related configurations from tsconfig.json. Feedback was provided to include the removal of the dist directory in the build script to prevent stale artifacts and to refine the clean script to avoid the aggressive removal of node_modules during standard cleanup tasks.

Comment thread package.json
"test:ci": "biome check --error-on-warnings && vitest run --coverage",
"dev": "pnpm lint && tsx src/index.ts --watch",
"build": "rimraf ./dist && tsup src/index.ts --format esm --dts --clean",
"build": "tsdown src/index.ts --format esm --dts",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The build script no longer cleans the dist directory before building. This can lead to stale build artifacts being present in the output, which might cause unexpected behavior. It's a good practice to ensure a clean build environment by removing the output directory before each build.

Suggested change
"build": "tsdown src/index.ts --format esm --dts",
"build": "rimraf ./dist && tsdown src/index.ts --format esm --dts",

Comment thread package.json
"dev": "pnpm lint && tsx src/index.ts --watch",
"build": "rimraf ./dist && tsup src/index.ts --format esm --dts --clean",
"build": "tsdown src/index.ts --format esm --dts",
"clean": "rimraf ./node_modules ./dist ./coverage DOCKER.md",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The clean script removes node_modules, which is quite aggressive for a standard clean task and forces a full dependency re-installation. This can slow down the development workflow. Typically, a clean script is for removing build artifacts and temporary files.

Consider renaming this to clean:all or deep-clean and having a more standard clean script that only removes build artifacts like dist, coverage, and generated files.

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.

1 participant