Skip to content

Commit 4da16e7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into auto-imports-user-prefs
2 parents ca39d02 + a767276 commit 4da16e7

File tree

213 files changed

+5012
-417
lines changed

Some content is hidden

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

213 files changed

+5012
-417
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
build:
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
28-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
27+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
28+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2929
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
3030
- uses: ./.github/actions/setup-go
3131

@@ -44,8 +44,8 @@ jobs:
4444
extension:
4545
runs-on: ubuntu-latest
4646
steps:
47-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
48-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
47+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
48+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
4949
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
5050

5151
- run: npm ci
@@ -54,7 +54,7 @@ jobs:
5454

5555
test:
5656
strategy:
57-
fail-fast: false
57+
fail-fast: ${{ github.event_name == 'merge_group' }}
5858
matrix:
5959
config:
6060
- os: ubuntu-latest
@@ -109,10 +109,10 @@ jobs:
109109
- run: git config --system core.longpaths true
110110
if: ${{ matrix.config.os == 'windows-latest' }}
111111

112-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
112+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
113113
with:
114114
submodules: ${{ !matrix.config.no-submodules }}
115-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
115+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
116116
with:
117117
node-version: 'lts/*'
118118
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
@@ -172,7 +172,7 @@ jobs:
172172

173173
lint:
174174
strategy:
175-
fail-fast: false
175+
fail-fast: ${{ github.event_name == 'merge_group' }}
176176
matrix:
177177
config:
178178
- os: ubuntu-latest
@@ -204,8 +204,8 @@ jobs:
204204
docker-images: false
205205
swap-storage: false
206206
dotnet: false
207-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
208-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
207+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
208+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
209209
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
210210
- uses: ./.github/actions/setup-go
211211
with:
@@ -227,8 +227,8 @@ jobs:
227227
format:
228228
runs-on: ubuntu-latest
229229
steps:
230-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
231-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
230+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
231+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
232232
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
233233
- uses: ./.github/actions/setup-go
234234

@@ -245,10 +245,10 @@ jobs:
245245
docker-images: false
246246
swap-storage: false
247247
dotnet: false
248-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
248+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
249249
with:
250250
submodules: true
251-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
251+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
252252
with:
253253
node-version: '>=22.16.0'
254254
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
@@ -281,7 +281,7 @@ jobs:
281281
tidy:
282282
runs-on: ubuntu-latest
283283
steps:
284-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
284+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
285285
- uses: ./.github/actions/setup-go
286286

287287
- run: go mod tidy -diff
@@ -290,10 +290,10 @@ jobs:
290290
smoke:
291291
runs-on: ubuntu-latest
292292
steps:
293-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
293+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
294294
with:
295295
submodules: true
296-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
296+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
297297
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
298298
- uses: ./.github/actions/setup-go
299299

@@ -318,7 +318,7 @@ jobs:
318318
misc:
319319
runs-on: ubuntu-latest
320320
steps:
321-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
321+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
322322
- uses: ./.github/actions/setup-go
323323

324324
- run: go -C ./_tools run ./cmd/checkmodpaths $PWD
@@ -332,10 +332,10 @@ jobs:
332332
docker-images: false
333333
swap-storage: false
334334
dotnet: false
335-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
335+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
336336
with:
337337
submodules: true
338-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
338+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
339339
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
340340
- uses: ./.github/actions/setup-go
341341

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444

4545
steps:
4646
- name: Checkout repository
47-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
47+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4848

4949
# Initializes the CodeQL tools for scanning.
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
51+
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
5252
with:
5353
config-file: ./.github/codeql/codeql-configuration.yml
5454
# Override language selection by uncommenting this and choosing your languages
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below).
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
61+
uses: github/codeql-action/autobuild@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -72,4 +72,4 @@ jobs:
7272
# make release
7373

7474
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
75+
uses: github/codeql-action/analyze@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
docker-images: false
2323
swap-storage: false
2424
dotnet: false
25-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
25+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2626
with:
2727
submodules: true
28-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
28+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2929
with:
3030
node-version: '>=22.16.0'
3131
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable

.github/workflows/create-cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
- run: git config --system core.longpaths true
4444
if: ${{ matrix.os == 'windows-latest' }}
4545

46-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
46+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4747
with:
4848
submodules: true
49-
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
49+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
5050
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
5151

5252
- uses: ./.github/actions/setup-go

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ f.called = false;
5151

5252
| Name | Example | Substitute | Note |
5353
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
54-
| Fallback initialisers | `f.x = f.x \| init` | `if (!f.x) f.x = init` | |
54+
| Fallback initialisers | `f.x = f.x \|\| init` | `if (!f.x) f.x = init` | |
5555
| Nested, undeclared expandos | <pre><code>var N = {};</code><br/><code>N.X.Y = {}</code></pre> | <pre><code>var N = {};</code><br/><code>N.X = {};</code><br/><code>N.X.Y = {}</code></pre> | All intermediate expandos have to be assigned. Closure feature. |
5656
| Constructor function whole-prototype assignment | <pre><code>C.prototype = {</code><br/> <code>m: function() { }</code><br/> <code>n: function() { }</code><br/><code>}</code></pre> | <pre><code>C.prototype.m = function() { }</code><br/><code>C.prototype.n = function() { }</code></pre> | Constructor function feature. See note at end. |
5757
| Identifier declarations | <pre><code>class C {</code><br/> <code>constructor() {</code><br/> <code>/\** @type {T} */</code><br/> <code>identifier;</code><br/> <code>}</code><br/><code>}</code></pre> | <pre><code>class C {</code><br/> <code>/\** @type {T} */</code><br/> <code>identifier;</code><br/> <code>constructor() { }</code><br/><code>}</code></pre> | Closure feature. |

_extension/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "https://github.com/microsoft/typescript-go"
1414
},
1515
"engines": {
16-
"vscode": "^1.100.0"
16+
"vscode": "^1.106.0"
1717
},
1818
"capabilities": {
1919
"untrustedWorkspaces": {
@@ -119,10 +119,10 @@
119119
"bundle": "esbuild src/extension.ts --bundle --external:vscode --platform=node --format=cjs --outfile=dist/extension.bundle.js --minify"
120120
},
121121
"dependencies": {
122-
"vscode-languageclient": "^9.0.1"
122+
"vscode-languageclient": "^10.0.0-next.18"
123123
},
124124
"devDependencies": {
125-
"@types/vscode": "^1.100.0",
125+
"@types/vscode": "^1.106.0",
126126
"@vscode/vsce": "^3.7.0",
127127
"esbuild": "^0.27.0"
128128
}

_extension/src/client.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ import { getLanguageForUri } from "./util";
2020
const codeLensShowLocationsCommandName = "typescript.native-preview.codeLens.showLocations";
2121

2222
export class Client {
23-
private outputChannel: vscode.OutputChannel;
24-
private traceOutputChannel: vscode.OutputChannel;
23+
private outputChannel: vscode.LogOutputChannel;
24+
private traceOutputChannel: vscode.LogOutputChannel;
2525
private clientOptions: LanguageClientOptions;
2626
private client?: LanguageClient;
2727
private exe: ExeInfo | undefined;
2828
private onStartedCallbacks: Set<() => void> = new Set();
2929

30-
constructor(outputChannel: vscode.OutputChannel, traceOutputChannel: vscode.OutputChannel) {
30+
constructor(outputChannel: vscode.LogOutputChannel, traceOutputChannel: vscode.LogOutputChannel) {
3131
this.outputChannel = outputChannel;
3232
this.traceOutputChannel = traceOutputChannel;
3333
this.clientOptions = {
@@ -128,6 +128,10 @@ export class Client {
128128
vscode.commands.executeCommand("setContext", "typescript.native-preview.serverRunning", true);
129129
this.onStartedCallbacks.forEach(callback => callback());
130130

131+
if (this.traceOutputChannel.logLevel !== vscode.LogLevel.Trace) {
132+
this.traceOutputChannel.appendLine(`To see LSP trace output, set this output's log level to "Trace" (gear icon next to the dropdown).`);
133+
}
134+
131135
const codeLensLocationsCommand = vscode.commands.registerCommand(codeLensShowLocationsCommandName, (...args: unknown[]) => {
132136
if (args.length !== 3) {
133137
throw new Error("Unexpected number of arguments.");

_extension/src/extension.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { setupVersionStatusItem } from "./versionStatusItem";
1212
export async function activate(context: vscode.ExtensionContext) {
1313
await vscode.commands.executeCommand("setContext", "typescript.native-preview.serverRunning", false);
1414
registerEnablementCommands(context);
15-
const output = vscode.window.createOutputChannel("typescript-native-preview", "log");
16-
const traceOutput = vscode.window.createOutputChannel("typescript-native-preview (LSP)");
15+
const output = vscode.window.createOutputChannel("typescript-native-preview", { log: true });
16+
const traceOutput = vscode.window.createOutputChannel("typescript-native-preview (LSP)", { log: true });
1717
context.subscriptions.push(output, traceOutput);
1818

1919
let disposeLanguageFeatures: vscode.Disposable | undefined;
@@ -77,7 +77,7 @@ export async function activate(context: vscode.ExtensionContext) {
7777
context.subscriptions.push(disposeLanguageFeatures);
7878
}
7979

80-
async function activateLanguageFeatures(context: vscode.ExtensionContext, output: vscode.OutputChannel, traceOutput: vscode.OutputChannel): Promise<vscode.Disposable> {
80+
async function activateLanguageFeatures(context: vscode.ExtensionContext, output: vscode.LogOutputChannel, traceOutput: vscode.LogOutputChannel): Promise<vscode.Disposable> {
8181
const disposables: vscode.Disposable[] = [];
8282

8383
const client = new Client(output, traceOutput);

internal/ast/diagnostic.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,11 @@ func getDiagnosticPath(d *Diagnostic) string {
195195
}
196196

197197
func EqualDiagnostics(d1, d2 *Diagnostic) bool {
198-
if d1 == d2 {
199-
return true
200-
}
201198
return EqualDiagnosticsNoRelatedInfo(d1, d2) &&
202199
slices.EqualFunc(d1.RelatedInformation(), d2.RelatedInformation(), EqualDiagnostics)
203200
}
204201

205202
func EqualDiagnosticsNoRelatedInfo(d1, d2 *Diagnostic) bool {
206-
if d1 == d2 {
207-
return true
208-
}
209203
return getDiagnosticPath(d1) == getDiagnosticPath(d2) &&
210204
d1.Loc() == d2.Loc() &&
211205
d1.Code() == d2.Code() &&
@@ -214,9 +208,6 @@ func EqualDiagnosticsNoRelatedInfo(d1, d2 *Diagnostic) bool {
214208
}
215209

216210
func equalMessageChain(c1, c2 *Diagnostic) bool {
217-
if c1 == c2 {
218-
return true
219-
}
220211
return c1.Code() == c2.Code() &&
221212
slices.Equal(c1.MessageArgs(), c2.MessageArgs()) &&
222213
slices.EqualFunc(c1.MessageChain(), c2.MessageChain(), equalMessageChain)
@@ -267,9 +258,6 @@ func compareRelatedInfo(r1, r2 []*Diagnostic) int {
267258
}
268259

269260
func CompareDiagnostics(d1, d2 *Diagnostic) int {
270-
if d1 == d2 {
271-
return 0
272-
}
273261
c := strings.Compare(getDiagnosticPath(d1), getDiagnosticPath(d2))
274262
if c != 0 {
275263
return c

internal/checker/checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15800,7 +15800,7 @@ func (c *Checker) resolveAlias(symbol *ast.Symbol) *ast.Symbol {
1580015800
}
1580115801

1580215802
func (c *Checker) resolveIndirectionAlias(source *ast.Symbol, target *ast.Symbol) *ast.Symbol {
15803-
result := c.resolveAlias(target)
15803+
result := c.getMergedSymbol(c.resolveAlias(target))
1580415804
if targetLinks := c.aliasSymbolLinks.Get(target); targetLinks.typeOnlyDeclaration != nil {
1580515805
if sourceLinks := c.aliasSymbolLinks.Get(source); sourceLinks.typeOnlyDeclaration == nil {
1580615806
sourceLinks.typeOnlyDeclaration = targetLinks.typeOnlyDeclaration

0 commit comments

Comments
 (0)