chore: upgrade TypeScript 6, Vitest 4, tsdown 0.21, Turbo 2.10 (#322) - #15
Closed
thedavidweng wants to merge 7 commits into
Closed
chore: upgrade TypeScript 6, Vitest 4, tsdown 0.21, Turbo 2.10 (#322)#15thedavidweng wants to merge 7 commits into
thedavidweng wants to merge 7 commits into
Conversation
thedavidweng
force-pushed
the
oxlint-biome-split-21be
branch
from
July 16, 2026 05:43
2ed9b17 to
f586148
Compare
thedavidweng
force-pushed
the
typescript-vitest-tsdown-turbo-21be
branch
from
July 16, 2026 05:43
8cb398d to
906f586
Compare
Upgrade react/react-dom and matching types to 19.2.x across core, demo, and the generated template. Update RefObject typings for the React 19 nullability contract. Co-authored-by: Davy <thedavidweng@users.noreply.github.com>
React 19 widens HTMLImageElement src to include Blob, which is incompatible with Next/fumadocs ImageProps. Keep string sources only for ImageZoom. Co-authored-by: Davy <thedavidweng@users.noreply.github.com>
Upgrade vite to 8.1.4 and @vitejs/plugin-react to 6.x. Replace deprecated optimizeDeps.esbuildOptions with optimizeDeps.rolldownOptions for virtual module exclusion. Fix website MDX ImageZoom typing exposed by the lockfile update. Co-authored-by: Davy <thedavidweng@users.noreply.github.com>
thedavidweng
force-pushed
the
oxlint-biome-split-21be
branch
from
July 26, 2026 06:20
f586148 to
6393682
Compare
Unify all workspaces on TypeScript 6.0.3. Move Vitest to 4.1.10 (Vite 8 peer), tsdown to 0.21.10 (newest release compatible with Node 22.13+), and Turbo to 2.10.5. Keep .js/.d.ts output via fixedExtension: false and retarget package builds to node22. Co-authored-by: Davy <thedavidweng@users.noreply.github.com>
… regenerate lockfile
thedavidweng
force-pushed
the
typescript-vitest-tsdown-turbo-21be
branch
from
July 26, 2026 06:25
906f586 to
cae47a2
Compare
Owner
Author
|
Superseded by upstream PR 1weiho#372 (1weiho#372). The stacked fork branch has been rebased onto current |
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.
Issue
Implements 1weiho#322 (parent 1weiho#318).
Stacked on:
cursor/oxlint-biome-split-21be(PR for 1weiho#321). Merge after that branch.Exact scope
Upgrade repository build/test/typecheck tooling only:
@types/nodeNo React/Vite/Biome/Oxlint/runtime library upgrades in this PR.
Versions before → after
typescript(core/cli)^5.9.3^6.0.3typescript(web)^6.0.3^6.0.3(aligned)typescript(root)6.0.3@types/node(core/cli)^22.19.17^22.19.21@types/node(web)^25.6.0^22.19.21(aligned to Node 22 contract)vitest^2.1.9^4.1.10tsdown^0.9.9^0.21.10turbo^2.9.18^2.10.5Base tip before this PR:
eedfeaa9c21bb9dbaaf2c312863d6b0c7d0b2c87.Why the old state was a problem
Why these versions were chosen
TypeScript 6.0.3 (not 7)
TypeScript 7.0.2 is the latest stable, but it is not adopted here:
tsdown@0.22.8(peers includetypescript@^7)engines.nodeis^22.18.0 || >=24.11.0, incompatible with the repo’s Node>=22.13.0contract from 1weiho#317tsdown@0.21.10(Node>=20.19.0, OK for 22.13+)typescript: ^5 || ^6only — no TypeScript 7Selected: TypeScript 6.0.3 (newest common stable supported by tsdown 0.21.10 + the Node 22.13+ contract).
Follow-up trigger: adopt TypeScript 7 when either (a) tsdown ≥0.22 lowers Node engines to include 22.13+, or (b) the repo intentionally raises engines to match tsdown 0.22+.
Official references:
Option 'baseUrl' has been removed.oxc-project/tsgolint#351 (related toolchain Node/TS constraints elsewhere)Other selections
vite: ^6 \|\| ^7 \|\| ^8— resolves the Vitest→Vite 5 leftover@types/node22.19.21: matches publishedengines.node >=22.13.0Breaking changes reviewed
.mjs/.d.mts; setfixedExtension: falseto preserve.js/.d.tsexport pathsexternal→deps.neverBundletargetnode18→node22(matches package engines)Source changes required
packages/core/tsdown.config.ts/packages/cli/tsdown.config.tspackage.jsonversion bumps + lockfileTests added or changed
None required; existing suite green on Vitest 4 (306 tests).
Benchmark results
Same machine, Node 24.18.0, pnpm 11.13.1. Warm-up + 5 measured runs; medians.
pnpm typecheckwarmpnpm testturbo --force)Core build is slightly slower; acceptable given newer Rolldown-based tsdown and preserved declaration quality.
Declaration / package comparison
dist/index.js,dist/vite/index.js,dist/locale/index.js,.d.ts)typeexport syntax forLocale/Plural) — no intentional public API changesyncCLI code now inlined intodist/cli/bin.js(tsdown warns about ineffective dynamic import); CLI behavior unchangedSecurity audit results
pnpm auditstill reports ~28 lockfile findings (mostly website transitive). Vitest upgrade removes the Vitest→Vite 5 path. Remaining advisories deferred to 1weiho#323.apps/web>posthog-js>dompurifyManual validation
Clean fixture:
open-slide initscaffoldopen-slide buildsucceededExports verified:
@open-slide/core/vite(createViteConfig),@open-slide/core/locale(en/ja/zhCN/zhTW/format/plural). Main@open-slide/coreentry still requires Vite virtual modules at runtime (unchanged).Known limitations
Prohibited workarounds
Confirmed not used:
--force,--legacy-peer-deps, overrides/resolutions, patch-package, prereleases, blanket suppressions, silent snapshot churn, unrelated features.