Skip to content

Commit 5f647a8

Browse files
committed
Apply the TypeScript 7 repository layout
1 parent 28c68f4 commit 5f647a8

133,168 files changed

Lines changed: 78458 additions & 8888883 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.

.c8rc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.custom-gcl.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json
2+
3+
version: v2.12.2
4+
5+
destination: ./tools
6+
7+
plugins:
8+
- module: 'github.com/microsoft/TypeScript/tools'
9+
import: 'github.com/microsoft/TypeScript/tools/customlint'
10+
path: ./tools

.devcontainer/devcontainer.json

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,28 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2-
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
31
{
4-
"name": "Node.js",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm",
7-
8-
// Features to add to the dev container. More info: https://containers.dev/features.
2+
"name": "TypeScript Compiler Development",
3+
"image": "mcr.microsoft.com/devcontainers/go:dev-1.26-bookworm",
94
"features": {
10-
"ghcr.io/devcontainers/features/go:1": {}
5+
"ghcr.io/devcontainers/features/node:2": {
6+
"version": "24",
7+
"pnpmVersion": "latest",
8+
"nvmVersion": "latest"
9+
},
10+
"ghcr.io/devcontainers-extra/features/dprint-asdf:2": {
11+
"version": "latest"
12+
},
13+
"ghcr.io/devcontainers/features/github-cli:1": {}
1114
},
12-
13-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
14-
// "forwardPorts": [],
15-
16-
// Use 'postCreateCommand' to run commands after the container is created.
1715
"postCreateCommand": {
18-
"Configure Build Tools": "sudo npm install -g hereby; npm ci",
19-
"Install pprof": "go install github.com/google/pprof@latest",
20-
"Install Graphviz": "sudo apt install graphviz"
16+
"Install dependencies": "npm ci; go -C ./tsc mod download; go -C ./tools mod download",
17+
"Install repository tools": "npx hereby install-tools; go install github.com/google/pprof@latest",
18+
"Install Graphviz": "sudo apt update -y; sudo apt install -y graphviz"
2119
},
22-
23-
// Configure tool-specific properties.
2420
"customizations": {
2521
"vscode": {
26-
"settings": {
27-
"terminal.integrated.defaultProfile.linux": "bash",
28-
"terminal.integrated.profiles.linux": {
29-
"bash": {
30-
"path": "/bin/bash",
31-
"icon": "terminal-bash"
32-
}
33-
}
34-
},
3522
"extensions": [
36-
"dbaeumer.vscode-eslint",
37-
"dprint.dprint"
23+
"dprint.dprint",
24+
"golang.go"
3825
]
3926
}
40-
},
41-
42-
// More info: https://aka.ms/dev-containers-non-root.
43-
"remoteUser": "node"
27+
}
4428
}

.dprint.jsonc

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,35 @@
3737
// This would be good to do in known-JSONC files, but VS Code warns on trailing commas.
3838
"trailingCommas": "never"
3939
},
40+
"gofumpt": {
41+
"langVersion": "go1.26",
42+
"modulePath": "github.com/microsoft/TypeScript/tsc"
43+
},
4044
"excludes": [
4145
"**/.git",
4246
"**/node_modules",
4347
"**/*-lock.json",
44-
"coverage/**",
45-
"lib/**",
46-
"built/**",
47-
"tests/**",
48-
"internal/**",
49-
"**/*.generated.*",
50-
"scripts/*.d.*",
51-
"**/_namespaces/**"
48+
"**/testdata",
49+
"packages/vscode-typescript/l10n/**",
50+
"tsc/internal/bundled/libs/**",
51+
"tsc/internal/lsp/lsproto/_generate/*.json",
52+
"tsc/internal/lsp/lsproto/_generate/metaModelSchema.mts",
53+
// Needs to be LF to have a working shebang.
54+
"packages/typescript/bin/tsc",
55+
"tsc/internal/bundled/source/**",
56+
"tsc/internal/locale/lcl/**",
57+
"packages/typescript/dist/**",
58+
"packages/typescript/tsconfig.tsbuildinfo",
59+
"packages/vscode-typescript/dist/**",
60+
"packages/vscode-typescript-nightly/dist/**",
61+
"packages/typescript/vendor/**"
5262
],
5363
// Note: if adding new languages, make sure settings.template.json is updated too.
5464
// Also, if updating typescript, update the one in package.json.
5565
"plugins": [
56-
"https://plugins.dprint.dev/typescript-0.93.4.wasm",
57-
"https://plugins.dprint.dev/json-0.19.4.wasm",
58-
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"
66+
"npm:@dprint/typescript@0.96.1",
67+
"npm:@dprint/json@0.22.0",
68+
"npm:dprint-plugin-yaml@0.6.0",
69+
"npm:@jakebailey/dprint-plugin-gofumpt@0.0.13"
5970
]
6071
}

.editorconfig

Lines changed: 0 additions & 10 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.js linguist-language=TypeScript
22
**/*.json linguist-language=jsonc
33
* -text
4+
*.go text eol=lf
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You are a crash triage and replay minimization agent.
99

1010
## Goal
1111

12-
Given a replay file and a project directory provided by the user, you MUST use the built-in Go replay test (`TestReplay` in `internal/lsp/replay_test.go`) to:
12+
Given a replay file and a project directory provided by the user, you MUST use the built-in Go replay test (`TestReplay` in `tsc/internal/lsp/replay_test.go`) to:
1313

1414
1. Reproduce the crash deterministically (or characterize flakiness)
1515
2. Identify a stable crash signature (stack/exception/location)
@@ -30,8 +30,8 @@ If either is missing, ask the user to provide it before proceeding.
3030
Use the built-in Go test `TestReplay` located at `internal/lsp/replay_test.go`. Run it from the repository root with:
3131

3232
```bash
33-
cd <typescript-go repo root>
34-
go test ./internal/lsp/ -run ^TestReplay$ -replay <path/to/replay.txt> -testDir <path/to/project/dir> -timeout 120s 2>&1
33+
cd <TypeScript repo root>
34+
go -C ./tsc test ./internal/lsp/ -run ^TestReplay$ -replay <path/to/replay.txt> -testDir <path/to/project/dir> -timeout 120s 2>&1
3535
```
3636

3737
### Available flags
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: CodeQL Configuration
22

33
paths-ignore:
4-
- src/lib
5-
- tests
4+
- built
5+
- packages/*/dist
6+
- tsc/internal/bundled/libs
7+
- tsc/internal/bundled/source
8+
- tsc/testdata
69

710
query-filters:
8-
# Falls over on our dynamic RegExp generation
911
- exclude:
1012
id: js/regex-injection

0 commit comments

Comments
 (0)