Skip to content

Commit 88c2579

Browse files
committed
Merge branch 'main' into enforceReadonly
# Conflicts: # src/compiler/diagnosticMessages.json # tests/baselines/reference/es2018IntlAPIs.types # tests/baselines/reference/es2020IntlAPIs.types # tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types # tests/baselines/reference/instantiationExpressions.types # tests/baselines/reference/localesObjectArgument.types # tests/baselines/reference/mappedTypeConstraints2.types # tests/baselines/reference/mappedTypeRecursiveInference.types # tests/baselines/reference/unionTypeInference.types # tests/baselines/reference/useObjectValuesAndEntries1.types # tests/baselines/reference/useObjectValuesAndEntries4.types
2 parents 8c1ac64 + 4900c7f commit 88c2579

File tree

7,332 files changed

+469885
-145157
lines changed

Some content is hidden

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

7,332 files changed

+469885
-145157
lines changed

.eslintrc.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
],
1818
"plugins": [
1919
"@typescript-eslint",
20-
"no-null",
2120
"eslint-plugin-local"
2221
],
2322
"ignorePatterns": [
@@ -60,6 +59,18 @@
6059
"prefer-object-spread": "error",
6160
"unicode-bom": ["error", "never"],
6261

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+
6374
// Enabled in eslint:recommended, but not applicable here
6475
"no-extra-boolean-cast": "off",
6576
"no-case-declarations": "off",
@@ -132,10 +143,7 @@
132143
"local/no-in-operator": "error",
133144
"local/debug-assert": "error",
134145
"local/no-keywords": "error",
135-
"local/jsdoc-format": "error",
136-
137-
// eslint-plugin-no-null
138-
"no-null/no-null": "error"
146+
"local/jsdoc-format": "error"
139147
},
140148
"overrides": [
141149
// By default, the ESLint CLI only looks at .js files. But, it will also look at

.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/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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
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: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }}
4949

5050
steps:
51-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
51+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
5252
- name: Use node version ${{ matrix.node-version }}
5353
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
5454
with:
@@ -72,7 +72,7 @@ jobs:
7272
runs-on: ubuntu-latest
7373

7474
steps:
75-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
75+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
7676
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
7777
with:
7878
node-version: '*'
@@ -86,14 +86,14 @@ jobs:
8686
runs-on: ubuntu-latest
8787

8888
steps:
89-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
89+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
9090
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
9191
with:
9292
node-version: '*'
9393
check-latest: true
9494
- run: npm ci
9595

96-
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
96+
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
9797
with:
9898
path: ~/.cache/dprint
9999
key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }}
@@ -107,7 +107,7 @@ jobs:
107107
runs-on: ubuntu-latest
108108

109109
steps:
110-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
110+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
111111
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
112112
with:
113113
node-version: '*'
@@ -124,7 +124,7 @@ jobs:
124124
runs-on: ubuntu-latest
125125

126126
steps:
127-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
127+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
128128
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
129129
with:
130130
node-version: '*'
@@ -138,7 +138,7 @@ jobs:
138138
runs-on: ubuntu-latest
139139

140140
steps:
141-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
141+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
142142

143143
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
144144
with:
@@ -154,6 +154,7 @@ jobs:
154154

155155
- run: npx hereby lkg
156156
- run: |
157+
node ./scripts/addPackageJsonGitHead.mjs package.json
157158
npm pack
158159
mv typescript*.tgz typescript.tgz
159160
echo "package=$PWD/typescript.tgz" >> "$GITHUB_OUTPUT"
@@ -179,11 +180,11 @@ jobs:
179180
if: github.event_name == 'pull_request'
180181

181182
steps:
182-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
183+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
183184
with:
184185
path: pr
185186

186-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
187+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
187188
with:
188189
path: base
189190
ref: ${{ github.base_ref }}
@@ -221,7 +222,7 @@ jobs:
221222
runs-on: ubuntu-latest
222223

223224
steps:
224-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
225+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
225226
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
226227
with:
227228
node-version: '*'
@@ -238,7 +239,7 @@ jobs:
238239
runs-on: ubuntu-latest
239240

240241
steps:
241-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
242+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
242243
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
243244
with:
244245
node-version: '*'
@@ -258,7 +259,7 @@ jobs:
258259
runs-on: ubuntu-latest
259260

260261
steps:
261-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
262+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
262263
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
263264
with:
264265
node-version: '*'

.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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
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@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
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@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
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@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10

.github/workflows/create-cherry-pick-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
if: github.repository == 'microsoft/TypeScript'
4848

4949
steps:
50-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
50+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
5151
with:
5252
filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
5353
fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.

.github/workflows/insiders.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
if: github.repository == 'microsoft/TypeScript'
2121

2222
steps:
23-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
23+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
2424
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
25+
with:
26+
node-version: 'lts/*'
2527
- run: |
2628
npm --version
2729
# corepack enable npm
@@ -40,9 +42,10 @@ jobs:
4042
if: github.repository == 'microsoft/TypeScript'
4143

4244
steps:
43-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
45+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
4446
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
4547
with:
48+
node-version: 'lts/*'
4649
# Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
4750
registry-url: https://registry.npmjs.org/
4851
- run: |
@@ -56,6 +59,7 @@ jobs:
5659
npm ci
5760
npx hereby configure-insiders
5861
npx hereby LKG
62+
node ./scripts/addPackageJsonGitHead.mjs package.json
5963
npm publish --tag insiders
6064
env:
6165
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/lkg.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ jobs:
2727
exit 1
2828
fi
2929
30-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
3131
with:
3232
ref: ${{ inputs.branch_name }}
3333
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
3434
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
35+
with:
36+
node-version: 'lts/*'
3537
- run: |
3638
npm --version
3739
# corepack enable npm

.github/workflows/new-release-branch.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ jobs:
5050
runs-on: ubuntu-latest
5151

5252
steps:
53-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
53+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
5454
with:
5555
filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
5656
fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
5757
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
5858
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
59+
with:
60+
node-version: 'lts/*'
5961
- run: |
6062
npm --version
6163
# corepack enable npm

0 commit comments

Comments
 (0)