Skip to content

build: upgrade to TypeScript 6 and tsdown#117

Open
bytaesu wants to merge 2 commits into
mainfrom
2026-07-18/build/upgrade-typescript-tsdown
Open

build: upgrade to TypeScript 6 and tsdown#117
bytaesu wants to merge 2 commits into
mainfrom
2026-07-18/build/upgrade-typescript-tsdown

Conversation

@bytaesu

@bytaesu bytaesu commented Jul 17, 2026

Copy link
Copy Markdown
Member

docs already need updates and aren't currently deployed automatically, so I left them unchanged in this PR

Copilot AI review requested due to automatic review settings July 17, 2026 16:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown

Greptile Summary

This PR migrates both better-fetch and logger packages from tsup to tsdown (rolldown-based) and bumps TypeScript from ^5.x to ^6.0.3. A small explicit return-type annotation is added to getTimeout in utils.ts to satisfy TypeScript 6's stricter inference requirements.

  • Build tool migration: tsdown.config.ts files replace tsup.config.ts across both packages, mapping externaldeps.neverBundle and adding target: "es2017" / platform: "neutral". Default output extensions (.js for ESM, .cjs for CJS) align with the exports fields in each package.json.
  • TypeScript 6 compatibility: tsconfig.json files updated with lib: ["ES2022", "DOM"] and moduleResolution: "bundler" where needed; packages/logger/tsconfig.json switches module from "commonjs" to "ESNext" and adds customConditions: ["node"].
  • Toolchain centralization: tsdown is declared only in the root package.json rather than in each package's own devDependencies (unlike the previous tsup setup), relying on pnpm workspace hoisting for resolution.

Confidence Score: 5/5

Safe to merge; the tooling changes are mechanical and the output file paths produced by tsdown's defaults correctly match the exports fields in both packages.

The build configs produce the correct ESM/CJS output extensions without any outExtensions override, the tsconfig changes are consistent with TypeScript 6 requirements, and the explicit return-type annotation in utils.ts is accurate. No logic changes to library code are introduced.

packages/better-fetch/package.json and packages/logger/package.json no longer declare tsdown locally (unlike the previous tsup entries); this relies on pnpm workspace hoisting and is worth keeping an eye on if the packages are ever built in an isolated context.

Reviews (2): Last reviewed commit: "build: use tsdown default output extensi..." | Re-trigger Greptile

Comment thread packages/better-fetch/tsdown.config.ts Outdated
Comment thread packages/logger/tsdown.config.ts Outdated
Comment thread packages/logger/package.json
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.

2 participants