Skip to content

Commit 4360e41

Browse files
nathanwhitAndaristMichalMarsalekjakebaileyCopilot
authored
Sync changes from upstream (#3)
* Port "Infer from annotated return type nodes before assigning contextual parameter types" (microsoft#1804) * Port "make exported destructured discriminated union narrowing work" (microsoft#1806) Co-authored-by: =?UTF-8?q?Michal=20Mar=C5=A1=C3=A1lek?= <[email protected]> * Implement more of doc highlights / find all refs (microsoft#1796) Co-authored-by: copilot-swe-agent[bot] <[email protected]> * Port "Provide string completions for `in` keyword checks" (microsoft#1803) * Port "Fix #61098" (microsoft#1810) Co-authored-by: Hans Brende <[email protected]> * Port "fix(61258): Renaming namespace with const enum doesn't update enum references" (microsoft#1811) Co-authored-by: "Oleksandr T." <[email protected]> * Update dependencies (microsoft#1785) * Mark libReplacement default as false (microsoft#1812) * Port "Deemphasize old JSX transform" (microsoft#1809) Co-authored-by: "Sebastian \"Sebbie\" Silbermann" <[email protected]> * Port "fix(checker): report error when using bigint as enum key" (microsoft#1814) Co-authored-by: magic-akari <[email protected]> * Port "explicitly disallow `using` in ambient contexts" (microsoft#1815) Co-authored-by: =?UTF-8?q?Ren=C3=A9?= <[email protected]> * Port 'Issue "'{0}' declarations can only be declared inside a block." for block-scoped variables in presence of parse errors' (microsoft#1816) * Port "Avoid resolving source prop type when the target is `unknown`/`any`" (microsoft#1817) * Port "Allow trailing commas after import attributes in `ImportType`" (microsoft#1818) * Port "Fix BigInt literal error in ambient contexts when targeting < ES2020" (microsoft#1819) * Port "Stop reassigning `.valueDeclaration` to avoid replacing earlier declarations with late ones" (microsoft#1813) * Port "Keep accessors as accessors in emitted anonymous class declarations" (microsoft#1822) * Port "Fixed crash in `hasVisibleDeclarations` related to binding elements" (microsoft#1820) * Port "Properly disallow `yield` in bodyless arrows" (microsoft#1825) * Port "Account for right operands & fix a weird error message for leftmost nullish literals in checkNullishCoalesceOperands" (microsoft#1805) Co-authored-by: Chiri Vulpes <[email protected]> * Remove JSDoc handling from the binder (microsoft#1827) * Port "`arguments` should not be allowed in class static block" (microsoft#1828) Co-authored-by: Zzzen <[email protected]> * Port "check usage before declaration for decorators" (microsoft#1829) Co-authored-by: Zzzen <[email protected]> * Fix nil pointer dereference in snapshotFS.GetFile for non-existent files (microsoft#1830) * Fix translation bug causing `unknown` infer-extends constraint to be emitted (microsoft#1831) * Port "Fixed nullish coalesce operator's precedence" (microsoft#1824) * Fixed an issue with type params being renamed incorrectly (microsoft#1833) * Port "Add support for `import defer` proposal" (microsoft#1826) Co-authored-by: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= <[email protected]> * Bump github/codeql-action from 3.30.5 to 3.30.6 in the github-actions group across 1 directory (microsoft#1832) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Port "Preserve type parameter constraint in emitted mapped types while preserving their distributivity" (microsoft#1834) * disable create-cache ci job * merge fixup --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Mateusz Burzyński <[email protected]> Co-authored-by: =?UTF-8?q?Michal=20Mar=C5=A1=C3=A1lek?= <[email protected]> Co-authored-by: Jake Bailey <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Hans Brende <[email protected]> Co-authored-by: "Oleksandr T." <[email protected]> Co-authored-by: "Sebastian \"Sebbie\" Silbermann" <[email protected]> Co-authored-by: magic-akari <[email protected]> Co-authored-by: =?UTF-8?q?Ren=C3=A9?= <[email protected]> Co-authored-by: Chiri Vulpes <[email protected]> Co-authored-by: Zzzen <[email protected]> Co-authored-by: John Xu <[email protected]> Co-authored-by: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 0f1d899 commit 4360e41

File tree

347 files changed

+26921
-32540
lines changed

Some content is hidden

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

347 files changed

+26921
-32540
lines changed

.custom-gcl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json
22

3-
version: v2.4.0
3+
version: v2.5.0
44

55
destination: ./_tools
66

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
# Initializes the CodeQL tools for scanning.
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
51+
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5
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@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
61+
uses: github/codeql-action/autobuild@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5
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@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
75+
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5

.github/workflows/create-cache.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
name: Create CI cache
2-
3-
on:
4-
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
8-
schedule:
9-
# Run every day at 10:00 UTC / 03:00 PST
10-
- cron: '0 10 * * *'
11-
12-
permissions:
13-
contents: read
14-
15-
# Ensure scripts are run with pipefail. See:
16-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
17-
defaults:
18-
run:
19-
shell: bash
20-
21-
jobs:
22-
cache:
23-
strategy:
24-
fail-fast: false
25-
matrix:
26-
os:
27-
- ubuntu-latest
28-
- windows-latest
29-
- macos-latest
30-
go-version:
31-
- '>=1.25.0'
32-
33-
runs-on: ${{ matrix.os }}
34-
35-
steps:
36-
- run: git config --system core.longpaths true
37-
if: ${{ matrix.os == 'windows-latest' }}
38-
39-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40-
with:
41-
submodules: true
42-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
43-
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
44-
45-
- uses: ./.github/actions/setup-go
46-
with:
47-
go-version: ${{ matrix.go-version }}
48-
create: 'true'
1+
# name: Create CI cache
2+
3+
# on:
4+
# workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - main
8+
# schedule:
9+
# # Run every day at 10:00 UTC / 03:00 PST
10+
# - cron: '0 10 * * *'
11+
12+
# permissions:
13+
# contents: read
14+
15+
# # Ensure scripts are run with pipefail. See:
16+
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
17+
# defaults:
18+
# run:
19+
# shell: bash
20+
21+
# jobs:
22+
# cache:
23+
# strategy:
24+
# fail-fast: false
25+
# matrix:
26+
# os:
27+
# - ubuntu-latest
28+
# - windows-latest
29+
# - macos-latest
30+
# go-version:
31+
# - '>=1.25.0'
32+
33+
# runs-on: ${{ matrix.os }}
34+
35+
# steps:
36+
# - run: git config --system core.longpaths true
37+
# if: ${{ matrix.os == 'windows-latest' }}
38+
39+
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40+
# with:
41+
# submodules: true
42+
# - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
43+
# - uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
44+
45+
# - uses: ./.github/actions/setup-go
46+
# with:
47+
# go-version: ${{ matrix.go-version }}
48+
# create: 'true'

NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
221221

222222
---------------------------------------------------------
223223

224-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b - BSD-3-Clause
224+
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3 - BSD-3-Clause
225225

226226

227227
Copyright 2010 The Go Authors

_extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
},
107107
"devDependencies": {
108108
"@types/vscode": "^1.100.0",
109-
"@vscode/vsce": "^3.6.0",
110-
"esbuild": "^0.25.8"
109+
"@vscode/vsce": "^3.6.2",
110+
"esbuild": "^0.25.10"
111111
}
112112
}

_packages/api/src/node.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ export class RemoteNode extends RemoteNodeBase implements Node {
544544
get isTypeOnly(): boolean | undefined {
545545
switch (this.kind) {
546546
case SyntaxKind.ImportSpecifier:
547-
case SyntaxKind.ImportClause:
548547
case SyntaxKind.ExportSpecifier:
549548
case SyntaxKind.ImportEqualsDeclaration:
550549
case SyntaxKind.ExportDeclaration:
@@ -921,6 +920,18 @@ export class RemoteNode extends RemoteNodeBase implements Node {
921920
}
922921
}
923922

923+
get phaseModifier(): SyntaxKind {
924+
switch (this.kind) {
925+
case SyntaxKind.ImportClause:
926+
const flags = (this.data & (1 << 24 | 1 << 25)) >> 24;
927+
if (flags & 1) return SyntaxKind.TypeKeyword;
928+
if (flags & 2) return SyntaxKind.DeferKeyword;
929+
// fallthrough
930+
default:
931+
return SyntaxKind.Unknown;
932+
}
933+
}
934+
924935
get token(): SyntaxKind | undefined {
925936
switch (this.kind) {
926937
case SyntaxKind.ImportAttributes:

_packages/ast/src/nodes.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,11 +1992,16 @@ export type NamedExportBindings =
19921992
export interface ImportClause extends NamedDeclaration {
19931993
readonly kind: SyntaxKind.ImportClause;
19941994
readonly parent: ImportDeclaration | JSDocImportTag;
1995-
readonly isTypeOnly: boolean;
1995+
readonly phaseModifier: ImportPhaseModifierSyntaxKind;
19961996
readonly name?: Identifier; // Default binding
19971997
readonly namedBindings?: NamedImportBindings;
19981998
}
19991999

2000+
export type ImportPhaseModifierSyntaxKind =
2001+
| SyntaxKind.Unknown
2002+
| SyntaxKind.TypeKeyword
2003+
| SyntaxKind.DeferKeyword;
2004+
20002005
/** @deprecated */
20012006
export type AssertionKey = ImportAttributeName;
20022007

_packages/ast/src/syntaxKind.enum.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export enum SyntaxKind {
165165
BigIntKeyword,
166166
OverrideKeyword,
167167
OfKeyword,
168+
DeferKeyword,
168169
QualifiedName,
169170
ComputedPropertyName,
170171
TypeParameter,

0 commit comments

Comments
 (0)