Skip to content

Commit 5043c7a

Browse files
authored
Adopt TypeScript 7 stable and tune editor/lint config (#5306)
* chore: exclude claude worktrees from zed scanning and eslint * chore: use tsgo alone as zed language server for js and ts * chore: cover TSX in zed language settings * chore: replace @typescript/native-preview with typescript@next, tsgo with tsc * chore: update zed to tsgo extension's typescript-ls language server * chore: pin typescript to latest stable 7.0 instead of nightly * chore: alias typescript to TS6 API package for lint tooling, tsc stays TS7 TS7's typescript package drops the programmatic API until 7.1, which broke typescript-eslint. Per the TS 7.0 announcement, alias typescript to @typescript/typescript6 for API consumers and install TS7 as @typescript/native, whose tsc binary drives builds. * docs: fix stale tsgo references, annotate vscode TS7 extension, add changeset * style: format .zed/settings.json
1 parent 2021690 commit 5043c7a

66 files changed

Lines changed: 495 additions & 190 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/tidy-ravens-argue.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Build tooling: replace `@typescript/native-preview` (`tsgo`) with the standard `typescript` package's TS7 `tsc`. No published-package changes.

.vscode/extensions.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"vitest.explorer",
77
"wengerk.highlight-bad-chars",
88
"yzhang.markdown-all-in-one",
9+
// The "TypeScript 7" language server extension — renamed in place on the
10+
// marketplace, so the id still says native-preview.
911
"typescriptteam.native-preview",
1012
],
1113
}

.zed/settings.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,50 @@
11
{
22
// Prettier should be configured to handle formatting of all files
33
"format_on_save": "on",
4+
// Includes zed defaults, plus claude worktrees
5+
"file_scan_exclusions": [
6+
"**/.git",
7+
"**/.svn",
8+
"**/.hg",
9+
"**/.jj",
10+
"**/CVS",
11+
"**/.DS_Store",
12+
"**/Thumbs.db",
13+
"**/.classpath",
14+
"**/.settings",
15+
"**/.claude/worktrees",
16+
],
417
"languages": {
518
"JavaScript": {
19+
"language_servers": [
20+
"typescript-ls",
21+
"!vtsls",
22+
"!typescript-language-server",
23+
],
624
// Formatting (prettier) applied through eslint
725
"formatter": "none",
826
"code_actions_on_format": {
927
"source.fixAll.eslint": true,
1028
},
1129
},
1230
"TypeScript": {
31+
"language_servers": [
32+
"typescript-ls",
33+
"!vtsls",
34+
"!typescript-language-server",
35+
],
36+
// Formatting (prettier) applied through eslint
37+
"formatter": "none",
38+
"code_actions_on_format": {
39+
"source.fixAll.eslint": true,
40+
},
41+
},
42+
"TSX": {
43+
"language_servers": [
44+
"typescript-ls",
45+
"!vtsls",
46+
"!typescript-language-server",
47+
],
1348
// Formatting (prettier) applied through eslint
1449
"formatter": "none",
1550
"code_actions_on_format": {

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The lexicon JSON schemas are derived into TypeScript runtime schemas by `@atprot
7777
**Code style rules live in [STYLE_GUIDE.md](./STYLE_GUIDE.md)** — imports, typing, dependencies, change scope, and formatting. Read it before writing code. The rest of this section covers repository mechanics only.
7878

7979
- Node ≥22 runtime floor; build/dev default to Node 24 (`.nvmrc`). Use `node --enable-source-maps` for production-style runs.
80-
- TypeScript compilation uses `tsgo` (TS7, `@typescript/native-preview`), not `tsc`. There is no per-package `typescript` devDependency — `tsgo` is hoisted at the root.
80+
- TypeScript compilation uses the native TS7 `tsc` (the standard `typescript` package). There is no per-package `typescript` devDependency — it is hoisted at the root. Note TS7 has no stable programmatic API yet; tools needing one must pin TS6.
8181
- **Every package touched by a change needs a changeset entry.** Add a file under [.changeset/](.changeset/) listing each modified package with an appropriate bump level (`minor` for breaking or new public API, `patch` otherwise). Dependency-only bumps are generated automatically — don't list them by hand.
8282

8383
## Agent files

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default [
1111
ignores: [
1212
'**/dist/**',
1313
'**/node_modules/**',
14+
'.claude/worktrees/**',
1415

1516
// buf
1617
'packages/bsky/src/proto/**',

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
"format": "pnpm lint:fix && pnpm style:fix",
3434
"codegen": "pnpm run build:tooling && pnpm run --parallel --workspace-concurrency Infinity '/^(codegen:.+)$/'",
3535
"prebuild": "pnpm run build:tooling && pnpm run --parallel --workspace-concurrency Infinity 'prebuild'",
36-
"build:tooling": "tsgo --build ./packages/lex/lex-builder/tsconfig.build.json ./packages/lex-cli/tsconfig.build.json",
37-
"build:ts": "tsgo --build tsconfig.json",
36+
"build:tooling": "tsc --build ./packages/lex/lex-builder/tsconfig.build.json ./packages/lex-cli/tsconfig.build.json",
37+
"build:ts": "tsc --build tsconfig.json",
3838
"build": "pnpm run build:ts",
3939
"postbuild": "pnpm run --parallel build:ui",
4040
"i18n": "pnpm run --parallel i18n:extract",
4141
"dev": "NODE_ENV=development pnpm run --recursive --parallel --stream '/^(dev|dev:.+)$/'",
42-
"dev:ts": "tsgo --build tsconfig.json --preserveWatchOutput --watch",
42+
"dev:ts": "tsc --build tsconfig.json --preserveWatchOutput --watch",
4343
"test": "LOG_ENABLED=false ./packages/dev-infra/with-test-redis-and-db.sh pnpm --recursive --stream test",
4444
"test:withFlags": "pnpm run test",
4545
"test:unit": "vitest --run",
@@ -61,7 +61,7 @@
6161
"@types/node": "^22",
6262
"@typescript-eslint/eslint-plugin": "^8.59.2",
6363
"@typescript-eslint/parser": "^8.59.2",
64-
"@typescript/native-preview": "^7.0.0-beta",
64+
"@typescript/native": "npm:typescript@^7.0.2",
6565
"@vitest/coverage-v8": "^4.1.10",
6666
"dotenv": "^16.0.3",
6767
"eslint": "^10.8.0",
@@ -77,6 +77,7 @@
7777
"prettier": "^3.9.6",
7878
"prettier-config-standard": "^7.0.0",
7979
"prettier-plugin-tailwindcss": "^0.6.11",
80+
"typescript": "npm:@typescript/typescript6@^6.0.2",
8081
"vitest": "^4.1.10"
8182
},
8283
"workspace": [

packages/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"codegen:lex": "lex gen-api --yes ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/* ../../lexicons/com/germnetwork/*",
5252
"codegen:code": "node ./scripts/generate-code.mjs",
5353
"prebuild": "pnpm run codegen:code && if [ ! -f ./src/client/index.ts ] || [ -n \"$(find ../../lexicons -name '*.json' -newer ./src/client/index.ts -type f -print -quit)\" ]; then pnpm run codegen:lex; fi",
54-
"build": "tsgo --build tsconfig.build.json",
54+
"build": "tsc --build tsconfig.build.json",
5555
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
5656
}
5757
}

packages/aws/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"uint8arrays": "^5.0.0"
4444
},
4545
"scripts": {
46-
"build": "tsgo --build tsconfig.build.json",
46+
"build": "tsc --build tsconfig.build.json",
4747
"test": "vitest run"
4848
},
4949
"devDependencies": {

packages/bsky/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"codegen:buf": "buf generate ../bsync/proto && buf generate ./proto",
9292
"codegen:lex": "lex build --clear --indexFile --lexicons ../../lexicons",
9393
"prebuild": "pnpm run '/^(codegen:.+)$/'",
94-
"build": "tsgo --build tsconfig.build.json",
94+
"build": "tsc --build tsconfig.build.json",
9595
"verify:import": "node --input-type=module -e \"import '@atproto/bsky'\"",
9696
"start": "node --enable-source-maps dist/bin.js",
9797
"test": "../dev-infra/with-test-redis-and-db.sh vitest run",

packages/bsync/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"scripts": {
5252
"codegen:buf": "buf generate proto",
5353
"prebuild": "pnpm run '/^(codegen:.+)$/'",
54-
"build": "tsgo --build tsconfig.build.json",
54+
"build": "tsc --build tsconfig.build.json",
5555
"start": "node --enable-source-maps dist/bin.js",
5656
"test": "NODE_OPTIONS=--experimental-vm-modules ../dev-infra/with-test-db.sh jest",
5757
"test:log": "tail -50 test.log | pino-pretty",

0 commit comments

Comments
 (0)