Skip to content

Commit 8d18d2d

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/apparent-mapped-type-keys-with-unknown-modifier
2 parents 1a27fd9 + 66dd12e commit 8d18d2d

16,560 files changed

Lines changed: 1060174 additions & 123665 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.

.dprint.jsonc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
"arrowFunction.useParentheses": "preferNone",
2020
"conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals.
2121
"functionExpression.spaceAfterFunctionKeyword": true,
22-
"importDeclaration.forceMultiLine": true,
22+
"importDeclaration.forceMultiLine": "whenMultiple",
2323
"constructorType.spaceAfterNewKeyword": true,
2424
"constructSignature.spaceAfterNewKeyword": true,
2525

26-
// Let eslint-plugin-simple-import-sort handle this.
27-
"module.sortImportDeclarations": "maintain",
28-
"module.sortExportDeclarations": "maintain",
29-
"exportDeclaration.sortNamedExports": "maintain",
30-
"importDeclaration.sortNamedImports": "maintain"
26+
"module.sortImportDeclarations": "caseInsensitive",
27+
"module.sortExportDeclarations": "caseInsensitive",
28+
"exportDeclaration.sortNamedExports": "caseInsensitive",
29+
"importDeclaration.sortNamedImports": "caseInsensitive"
3130
},
3231
"prettier": {
3332
"newLineKind": "lf",
@@ -44,6 +43,7 @@
4443
"trailingCommas": "never"
4544
},
4645
"excludes": [
46+
"**/.git",
4747
"**/node_modules",
4848
"**/*-lock.json",
4949
"coverage/**",
@@ -52,12 +52,13 @@
5252
"tests/**",
5353
"internal/**",
5454
"**/*.generated.*",
55-
"scripts/*.d.*"
55+
"scripts/*.d.*",
56+
"**/_namespaces/**"
5657
],
5758
// Note: if adding new languages, make sure settings.template.json is updated too.
5859
"plugins": [
59-
"https://plugins.dprint.dev/typescript-0.88.9.wasm",
60-
"https://plugins.dprint.dev/json-0.19.1.wasm",
61-
"https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40"
60+
"https://plugins.dprint.dev/typescript-0.90.0.wasm",
61+
"https://plugins.dprint.dev/json-0.19.2.wasm",
62+
"https://plugins.dprint.dev/prettier-0.39.0.json@896b70f29ef8213c1b0ba81a93cee9c2d4f39ac2194040313cd433906db7bc7c"
6263
]
6364
}

.eslintrc.json

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
],
1818
"plugins": [
1919
"@typescript-eslint",
20-
"no-null",
21-
"eslint-plugin-local",
22-
"simple-import-sort"
20+
"eslint-plugin-local"
2321
],
2422
"ignorePatterns": [
2523
"**/node_modules/**",
@@ -61,6 +59,18 @@
6159
"prefer-object-spread": "error",
6260
"unicode-bom": ["error", "never"],
6361

62+
"no-restricted-syntax": [
63+
"error",
64+
{
65+
"selector": "Literal[raw=null]",
66+
"message": "Avoid using null; use undefined instead."
67+
},
68+
{
69+
"selector": "TSNullKeyword",
70+
"message": "Avoid using null; use undefined instead."
71+
}
72+
],
73+
6474
// Enabled in eslint:recommended, but not applicable here
6575
"no-extra-boolean-cast": "off",
6676
"no-case-declarations": "off",
@@ -110,13 +120,14 @@
110120
}
111121
],
112122
"@typescript-eslint/no-unused-vars": [
113-
"error",
123+
"warn",
114124
{
115125
// Ignore: (solely underscores | starting with exactly one underscore)
116126
"argsIgnorePattern": "^(_+$|_[^_])",
117127
"varsIgnorePattern": "^(_+$|_[^_])"
118128
}
119129
],
130+
"@typescript-eslint/no-inferrable-types": "off",
120131

121132
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820
122133
"@typescript-eslint/prefer-optional-chain": "off",
@@ -133,14 +144,7 @@
133144
"local/no-in-operator": "error",
134145
"local/debug-assert": "error",
135146
"local/no-keywords": "error",
136-
"local/jsdoc-format": "error",
137-
138-
// eslint-plugin-no-null
139-
"no-null/no-null": "error",
140-
141-
// eslint-plugin-simple-import-sort
142-
"simple-import-sort/imports": "error",
143-
"simple-import-sort/exports": "error"
147+
"local/jsdoc-format": "error"
144148
},
145149
"overrides": [
146150
// By default, the ESLint CLI only looks at .js files. But, it will also look at
@@ -167,14 +171,6 @@
167171
{ "name": "exports" }
168172
]
169173
}
170-
},
171-
{
172-
// These files contain imports in a specific order that are generally unsafe to modify.
173-
"files": ["**/_namespaces/**"],
174-
"rules": {
175-
"simple-import-sort/imports": "off",
176-
"simple-import-sort/exports": "off"
177-
}
178174
}
179175
]
180176
}

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ description: 'Create a report to help us improve TypeScript'
33
body:
44
- type: markdown
55
attributes:
6-
value: Please fill in each section completely. Thank you!
6+
value: |
7+
🔍 Please [search thoroughly in GitHub](https://github.com/Microsoft/TypeScript/search?type=Issues) or by the query `site:github.com/microsoft/TypeScript <your keywords>` in your favorite search engine before reporting a new bug as most bugs are very likely to find precedents.
8+
9+
Please fill in each section completely. Thank you!
710
- type: textarea
811
id: search_terms
912
attributes:

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@ description: 'Suggest an idea'
33
body:
44
- type: markdown
55
attributes:
6-
value: 'Please fill in each section completely. Thank you!'
6+
value: |
7+
💡 Did you know? TypeScript has over 2,000 open suggestions!
8+
9+
🔎 Please [search thoroughly in GitHub](https://github.com/Microsoft/TypeScript/search?type=Issues) or by the query `site:github.com/microsoft/TypeScript <your keywords>` in your favorite search engine before logging new feature requests as most common ideas already have a proposal in progress.
10+
11+
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
12+
13+
Please fill in each section completely. Thank you!
714
- type: textarea
815
id: search_terms
916
attributes:
1017
label: '🔍 Search Terms'
1118
description: |
12-
💡 Did you know? TypeScript has over 2,000 open suggestions!
19+
What search terms did you use when trying to find an existing suggestion?
1320
14-
🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
15-
16-
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
21+
List them here so people in the future can find this one more easily.
1722
placeholder: |
1823
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
1924

.github/workflow-resources/.lsifrc.json

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

.github/workflows/accept-baselines-fix-lints.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2121
with:
2222
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
2323
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
24+
with:
25+
node-version: 'lts/*'
2426

2527
- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
2628
run: |

.github/workflows/ci.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- windows-latest
3030
- macos-14
3131
node-version:
32+
- '22'
3233
- '20'
3334
- '18'
3435
- '16'
@@ -48,7 +49,7 @@ jobs:
4849
name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }}
4950

5051
steps:
51-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
52+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
5253
- name: Use node version ${{ matrix.node-version }}
5354
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
5455
with:
@@ -57,14 +58,22 @@ jobs:
5758
- run: npm ci
5859

5960
- name: Tests
61+
id: test
6062
# run tests, but lint separately
6163
run: npm run test -- --no-lint --bundle=${{ matrix.bundle }}
6264

65+
- name: Print baseline diff on failure
66+
if: ${{ failure() && steps.test.conclusion == 'failure' }}
67+
run: |
68+
npx hereby baseline-accept
69+
git add tests/baselines/reference
70+
git diff --staged --exit-code
71+
6372
lint:
6473
runs-on: ubuntu-latest
6574

6675
steps:
67-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
76+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
6877
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
6978
with:
7079
node-version: '*'
@@ -78,14 +87,14 @@ jobs:
7887
runs-on: ubuntu-latest
7988

8089
steps:
81-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
90+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
8291
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
8392
with:
8493
node-version: '*'
8594
check-latest: true
8695
- run: npm ci
8796

88-
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
97+
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
8998
with:
9099
path: ~/.cache/dprint
91100
key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }}
@@ -99,7 +108,7 @@ jobs:
99108
runs-on: ubuntu-latest
100109

101110
steps:
102-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
111+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
103112
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
104113
with:
105114
node-version: '*'
@@ -116,7 +125,7 @@ jobs:
116125
runs-on: ubuntu-latest
117126

118127
steps:
119-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
128+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
120129
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
121130
with:
122131
node-version: '*'
@@ -130,7 +139,7 @@ jobs:
130139
runs-on: ubuntu-latest
131140

132141
steps:
133-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
142+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
134143

135144
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
136145
with:
@@ -146,6 +155,7 @@ jobs:
146155

147156
- run: npx hereby lkg
148157
- run: |
158+
node ./scripts/addPackageJsonGitHead.mjs package.json
149159
npm pack
150160
mv typescript*.tgz typescript.tgz
151161
echo "package=$PWD/typescript.tgz" >> "$GITHUB_OUTPUT"
@@ -171,11 +181,11 @@ jobs:
171181
if: github.event_name == 'pull_request'
172182

173183
steps:
174-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
184+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
175185
with:
176186
path: pr
177187

178-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
188+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
179189
with:
180190
path: base
181191
ref: ${{ github.base_ref }}
@@ -213,7 +223,7 @@ jobs:
213223
runs-on: ubuntu-latest
214224

215225
steps:
216-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
226+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
217227
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
218228
with:
219229
node-version: '*'
@@ -230,7 +240,7 @@ jobs:
230240
runs-on: ubuntu-latest
231241

232242
steps:
233-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
243+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
234244
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
235245
with:
236246
node-version: '*'
@@ -250,7 +260,7 @@ jobs:
250260
runs-on: ubuntu-latest
251261

252262
steps:
253-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
263+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
254264
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
255265
with:
256266
node-version: '*'
@@ -269,6 +279,7 @@ jobs:
269279
git add tests/baselines/reference
270280
271281
- name: Check baselines
282+
id: check-baselines
272283
run: |
273284
function print_diff() {
274285
if ! git diff --staged --exit-code --quiet --diff-filter=$1; then
@@ -281,5 +292,13 @@ jobs:
281292
print_diff ACR "Missing baselines"
282293
print_diff MTUXB "Modified baselines"
283294
print_diff D "Unused baselines"
295+
git diff --staged > fix_baselines.patch
284296
exit 1
285297
fi
298+
299+
- name: Upload baseline diff artifact
300+
if: ${{ failure() && steps.check-baselines.conclusion == 'failure' }}
301+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
302+
with:
303+
name: fix_baselines.patch
304+
path: fix_baselines.patch

.github/workflows/codeql.yml

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

4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
45+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
49+
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
5050
with:
5151
config-file: ./.github/codeql/codeql-configuration.yml
5252
# Override language selection by uncommenting this and choosing your languages
@@ -56,7 +56,7 @@ jobs:
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below).
5858
- name: Autobuild
59-
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
59+
uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -70,4 +70,4 @@ jobs:
7070
# make release
7171

7272
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
73+
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3

0 commit comments

Comments
 (0)