Skip to content

Commit eaaf289

Browse files
PunGrumpyclaude
andauthored
chore(deps): migrate monorepo to typescript 7 (#38)
* chore(deps): migrate monorepo to typescript 7 - typescript ^7 in all five manifests, settling the split 6.0.3 / ^6 version policy; typecheck scripts move from tsgo to tsc since TS7 ships the native compiler as the typescript package - @typescript/native-preview is now declared only where tsdown's dts generator actually needs it (cli, template-generator) instead of hoisted from the root - next 16.2.7 -> 16.2.12 in apps/web: required for experimental.useTypeScriptCli (TS7 has no JS compiler API for next build's default checker) and clears the open Next security advisories - cli build drops its dead dts pass (the package exports no types); under TS7 that pass leaked .d.ts files into template-generator/src - lockfile regenerated; suppress unicorn/throw-new-error on better-result TaggedError factories, whose autofix inserts `new` and breaks them (rule arrived with the oxlint bump in the refresh) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(cli): add changeset for typescript 7 toolchain Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(deps): drop @typescript/native-preview entirely With typescript 7 installed as the typescript package, rolldown-plugin-dts uses its native compiler for dts generation directly; the preview package was only the fallback for pre-7 setups. The earlier .d.ts leak came from the CLI's since-removed dts pass, not from removing this package. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent d9b8d8a commit eaaf289

11 files changed

Lines changed: 379 additions & 484 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vernostudio/cli": patch
3+
---
4+
5+
Build the CLI with the TypeScript 7 toolchain. The published package no longer ships an unused empty `dist/index.d.mts` stub (the CLI exposes a binary, not a typed API); runtime behavior is unchanged.

apps/web/next.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import type { NextConfig } from "next";
33
const nextConfig: NextConfig = {
44
experimental: {
55
turbopackFileSystemCacheForDev: true,
6+
// TypeScript 7 has no JS compiler API; run the project-local tsc CLI for
7+
// build-time type checking. https://nextjs.org/docs/app/api-reference/config/typescript
8+
useTypeScriptCli: true,
69
},
710

811
images: {

apps/web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
"build": "next build",
88
"start": "next start",
99
"test": "bun test",
10-
"typecheck": "next typegen && tsgo --noEmit"
10+
"typecheck": "next typegen && tsc --noEmit"
1111
},
1212
"dependencies": {
1313
"@shikijs/langs": "^4.2.0",
1414
"@shikijs/themes": "^4.2.0",
1515
"@t3-oss/env-nextjs": "^0.12.00",
1616
"@vernostudio/design-system": "workspace:*",
1717
"lucide-react": "^1.17.0",
18-
"next": "16.2.7",
18+
"next": "16.2.12",
1919
"posthog-js": "^1.380.1",
2020
"posthog-node": "^5.36.2",
2121
"react": "19.2.7",
@@ -32,6 +32,6 @@
3232
"@types/react-dom": "^19",
3333
"@vernostudio/typescript-config": "workspace:*",
3434
"tailwindcss": "^4.3.0",
35-
"typescript": "^6"
35+
"typescript": "^7"
3636
}
3737
}

bun.lock

Lines changed: 355 additions & 471 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
},
2222
"devDependencies": {
2323
"@changesets/cli": "^2.31.0",
24-
"@typescript/native-preview": "^7.0.0-dev.20260605.1",
2524
"husky": "^9.1.7",
2625
"mitata": "^1.0.34",
2726
"oxfmt": "^0.53.0",
2827
"oxlint": "^1.68.0",
2928
"turbo": "^2.9.16",
30-
"typescript": "6.0.3",
29+
"typescript": "^7",
3130
"ultracite": "7.8.1"
3231
},
3332
"engines": {

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"dev": "tsdown --watch",
4848
"test": "bun test",
4949
"test:coverage": "bun test --coverage",
50-
"typecheck": "tsgo --noEmit",
50+
"typecheck": "tsc --noEmit",
5151
"bench": "bun run benchmarks/cli.bench.ts",
5252
"prepublishOnly": "bun run build"
5353
},
@@ -64,7 +64,7 @@
6464
"@vernostudio/template-generator": "workspace:*",
6565
"@vernostudio/typescript-config": "workspace:*",
6666
"tsdown": "^0.22.2",
67-
"typescript": "^6",
67+
"typescript": "^7",
6868
"ultracite": "^7.8.0"
6969
}
7070
}

packages/cli/tsdown.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ export default defineConfig({
66
alwaysBundle: ["@vernostudio/template-generator"],
77
onlyBundle: ["better-result", "handlebars", "source-map"],
88
},
9-
dts: true,
9+
// The CLI ships a binary, not a typed API (exports declare no types), and
10+
// under TypeScript 7 the dts pass leaks .d.ts files into the bundled
11+
// template-generator's src/.
12+
dts: false,
1013
entry: ["src/index.ts"],
1114
format: ["esm"],
1215
outDir: "dist",

packages/design-system/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"sideEffects": false,
66
"scripts": {
7-
"typecheck": "tsgo --noEmit"
7+
"typecheck": "tsc --noEmit"
88
},
99
"dependencies": {
1010
"@base-ui/react": "^1.5.0",
@@ -32,7 +32,7 @@
3232
"@types/react-dom": "^19",
3333
"@vernostudio/typescript-config": "workspace:*",
3434
"shadcn": "^4.10.0",
35-
"typescript": "^6"
35+
"typescript": "^7"
3636
},
3737
"peerDependencies": {
3838
"react": "19.2.7",

packages/template-generator/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"prebuild": "bun run generate:templates",
4747
"build": "tsdown",
4848
"dev": "tsdown --watch",
49-
"typecheck": "bun run generate:templates && tsgo --noEmit",
49+
"typecheck": "bun run generate:templates && tsc --noEmit",
5050
"test": "bun run generate:templates && bun test",
5151
"test:coverage": "bun run generate:templates && bun test --coverage"
5252
},
@@ -57,9 +57,8 @@
5757
"devDependencies": {
5858
"@types/bun": "^1.3.14",
5959
"@types/node": "^25.9.1",
60-
"@typescript/native-preview": "^7.0.0-dev.20260605.1",
6160
"@vernostudio/typescript-config": "workspace:*",
6261
"tsdown": "^0.22.2",
63-
"typescript": "^6"
62+
"typescript": "^7"
6463
}
6564
}

packages/template-generator/src/file-write-error.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { TaggedError } from "better-result";
22

3+
// oxlint-disable-next-line unicorn/throw-new-error -- TaggedError is better-result's class factory; the autofix (inserting `new`) breaks it
34
export class FileWriteError extends TaggedError("FileWriteError")<{
45
message: string;
56
path?: string;

0 commit comments

Comments
 (0)