Repository navigation
chore(infra) - migrate to typescript v7 && tsdown - #1325
Merged
Merged
Conversation
tsup vendors rollup-plugin-dts@6.1.1 internally and crashes on TS7's dts build; there's been no tsup release to pick up the fix since Nov 2025. tsdown (rolldown-based, tsup's own recommended successor) builds and type-checks cleanly against typescript@7.0.2. Translating tsup.config.ts required: - @tsdown/css + postcss-import + explicit css.transformer: 'postcss' (the default lightningcss transformer silently drops @apply) - outExtensions forced to .js/.d.ts (tsdown defaults to .mjs/.d.mts, which breaks every package.json exports path) - --config-loader unrun so the config's extensionless import satisfies both tsdown's loader and tsc's import-extension rules - src/flows/*/index.ts as bundled per-flow entries (tsup's directory- entry shorthand isn't supported) — restores single-file noExternal inlining and per-entry CSS naming that unbundle mode broke - onSuccess hook mirrors the deduped index.css to styles.css (verified byte-identical to tsup's output except the sourcemap comment) Known gaps: no tsdown equivalent to tsup's `keepNames`; tsup itself is left in package.json/lockfile for now since this is a size/CI spike, not a finished migration.
Contributor
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (74 total)
✅ Bundle size check passed |
Contributor
📊 Coverage Report⚪ Coverage unchanged
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
rolldown (tsdown's bundler) consolidates shared code into fewer, larger chunks than tsup/esbuild did. Total bundle size dropped 42% gzipped in this migration, but two chunks (CheckBoxField, ContractorOnboarding) now exceed the old fixed 50kB/15kB per-chunk caps. Bumped to 100kB/30kB with headroom above current sizes (78.93kB/24.52kB largest). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gabrielseco
marked this pull request as ready for review
September 16, 2026 14:47
jordividaller
approved these changes
Sep 16, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6022f28. Configure here.
This was referenced Sep 18, 2026
Closed
Merged
gabrielseco
added a commit
that referenced
this pull request
Sep 21, 2026
Renovate's lockfile-only install (used for most dependency bumps) never populates node_modules/.bin, so the repo's `prepare` script (`npm run build` -> tsdown) fails with "tsdown: command not found", aborting the whole update. Renovate then commits only the package.json bump without a matching package-lock.json, which breaks `npm ci` in CI for every subsequent PR check. This previously went unnoticed because Renovate reuses a cached node_modules across runs, and a working tsup binary was already present from earlier installs. The tsup -> tsdown migration (#1325) reset that cache, and the next two dependency PRs (#1339, #1340) hit the bug for the first time. ignoreScripts tells Renovate to skip lifecycle scripts during its own lockfile computation. It has no effect on real CI or local installs, which still run prepare/build as normal. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
gabrielseco
added a commit
that referenced
this pull request
Sep 24, 2026
#1368) * ci: smoke-test that npm run openapi-ts still works on dependency bumps Nothing in CI actually exercises the openapi-ts codegen path today, so a dependency bump that breaks it (e.g. the typescript 6->7 migration in #1325, which broke @hey-api/openapi-ts's peer-dependency compatibility — see #1367) only surfaces when someone manually regenerates the client. Runs on any PR touching package.json/package-lock.json rather than just @hey-api/openapi-ts's own line, since the actual trigger can be any dependency in that graph. Only fails on a nonzero exit (the generator crashing) — deliberately does not diff the regenerated output against what's committed, since the production schema drifts independently of any given PR and a diff there isn't itself a failure. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * ci: drop comment from openapi codegen smoke-test workflow Rationale belongs in the PR description, not a multi-line comment block. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2 of 4 tasks
gabrielseco
added a commit
that referenced
this pull request
Sep 30, 2026
* fix(build): restore per-file ./flows/* subpath modules The tsdown migration (#1325) only built each flow's index.ts, so dist/flows went from 192 modules in 1.55.0 to 11 in 1.56.0 and partner imports like flows/CostCalculator/api stopped resolving. Build every non-test flow file again, matching the old tsup entry, and fail check-exports if any flow module is missing from the tarball. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(build): surface npm pack errors in flow subpath check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(build): import partner-reported flow subpaths Resolve the three subpaths partners reported through the package exports map and assert their exports, so a regression surfaces as the same error partners would hit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix exports and mark some as deprecated * chore(editor): enable type-aware oxc in editor Share .vscode/settings.json so the oxc extension runs type-aware rules (e.g. typescript/no-deprecated) like `npm run lint --type-aware` does, and recommend the oxc extension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix import --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Spike, not a finished migration — opened as draft to get real
size-checknumbers from CI, per this investigation: tsup vendorsrollup-plugin-dts@6.1.1internally and crashes on TypeScript 7'sdtsbuild; there's been no tsup release since Nov 2025 to pick up the fix. tsdown (tsup's own recommended successor) builds and type-checks cleanly againsttypescript@7.0.2.npm run build(tsdown) → clean againsttypescript@7.0.2npm run type-check→ 0 errorsnpm run check-exports(attw) → all greentypescript@7.0.2itself ships the native (Go-ported) compiler by default now (platform binary viaoptionalDependencies, e.g.@typescript/typescript-darwin-arm64) — no separatetsgo/@typescript/native-previewinstall needed,tscalready is the native binary.external/noExternalconfig fromtsup.config.ts(external: ['react', 'react-dom'],noExternal: ['react-hook-form', '@hookform/resolvers']) carried over unchanged totsdown.config.ts— same option semantics in rolldown, verified working via the greencheck-exportsrun.size-checkCI results (real numbers from this branch)main's 282.51 kBmain's 745.97 kBmain)Two chunks (
CheckBoxField-CNRUimYw.js,ContractorOnboarding-BMNuPI6T.js) initially exceeded the old fixed 50 kB/15 kB per-chunk caps despite the large overall size win — rolldown (tsdown's bundler) consolidates shared code into fewer, larger chunks than esbuild (tsup's bundler) did, so a fixed per-chunk ceiling that made sense under the old chunking strategy doesn't directly carry over. Bumped.sizelimit.json'smaxChunkSize/maxChunkSizeGzipfrom 50 kB/15 kB to 100 kB/30 kB (headroom above the current largest chunk at 78.93 kB/24.52 kB) —size:checkpasses clean now.Known gaps (not blocking this CI check, but blocking a real merge)
keepNames(prevents the minifier renaming functions/classes) — dropped, needs a manual check for anywhere relying onFunction.name/displayNamepost-minification.styles.cssis produced via a hand-rolledonSuccessfile copy of the dedupedindex.css(verified byte-identical to tsup's own output except the sourcemap comment), not a native per-entry CSS output — tsdown's CSS pipeline dedupes identical CSS across entries by default.tsupis still listed inpackage.json/lockfile — left in place since this is a spike, not a cutover.size-check.yml's path filters listtsup.config.tsbut nottsdown.config.ts— would need updating for a real migration so the workflow still triggers on build-config-only changes.maxChunkSize/maxChunkSizeGzipvalues are a first pass sized to current output, not a deliberately-chosen budget — worth revisiting once the chunking strategy settles for a real migration.package.json'soverridespinning@remoteoss/json-schema-form-v0-deprecatedto adevbuild (0.12.5-dev.20260916142420) is temporary, for testing an unrelated json-schema-form fix against this build pipeline — should be reverted before this spike is merged, it isn't part of the tsdown migration itself.Test plan
size-checkCI job runs and compare its numbers againstmain's current bundle sizesnpm test) unaffected — not yet run in this spike, build-tool swap is orthogonal to vitest but should be checkedsize:checklocally against.sizelimit.jsonthresholds🤖 Generated with Claude Code
Note
Medium Risk
Swapping the publish build pipeline and TypeScript major version can change bundle shape, minification, and types consumers see; chunk limits were relaxed rather than re-tuned to a new chunking strategy.
Overview
Replaces tsup with tsdown (Rolldown-based) for library builds and bumps TypeScript to 7.0.2, driven by tsup’s broken
dtspath on TS 7. Rootbuild/devscripts now runtsdownwith theunrunconfig loader; bundling rules from the old setup are preserved intsdown.config.ts(react/react-domexternal,react-hook-form+@hookform/resolversbundled, multi-entry ESM, PostCSS/Tailwind CSS with a post-build copy sostyles.cssmirrors dedupedindex.css).CI and docs are aligned with the new config: bundle workflows watch
tsdown.config.tsinstead oftsup.config.ts, and contributor docs/Cursor env describe tsdown watch builds..sizelimit.jsonraises per-chunk caps (maxChunkSize50→100 kB, gzip 15→30 kB) so size-check passes under tsdown’s larger chunk consolidation while overall bundle size reportedly drops vs main. The example app lockfile picks up TS 7.0.2 and refreshed parent-package dev deps (@tsdown/css,postcss-import,unrun,@remoteoss/remote-json-schema-form-kit1.1.1).Reviewed by Cursor Bugbot for commit 3f9fce1. Bugbot is set up for automated code reviews on this repo. Configure here.