Skip to content

Commit b1acdfa

Browse files
committed
Merge branch 'main' into annotate-exports
2 parents 066537c + 23156cb commit b1acdfa

File tree

2,153 files changed

+169472
-166505
lines changed

Some content is hidden

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

2,153 files changed

+169472
-166505
lines changed

.eslintrc.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
{ "selector": "property", "format": null }
8383
],
8484

85+
"@typescript-eslint/unified-signatures": "error",
86+
"no-unused-expressions": "off",
87+
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
88+
8589
// Rules enabled in typescript-eslint configs that are not applicable here
8690
"@typescript-eslint/ban-ts-comment": "off",
8791
"@typescript-eslint/class-literal-property-style": "off",
@@ -105,9 +109,14 @@
105109
}
106110
}
107111
],
108-
109-
// Todo: For each of these, investigate whether we want to enable them ✨
110-
"@typescript-eslint/no-unused-vars": "off",
112+
"@typescript-eslint/no-unused-vars": [
113+
"error",
114+
{
115+
// Ignore: (solely underscores | starting with exactly one underscore)
116+
"argsIgnorePattern": "^(_+$|_[^_])",
117+
"varsIgnorePattern": "^(_+$|_[^_])"
118+
}
119+
],
111120

112121
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820
113122
"@typescript-eslint/prefer-optional-chain": "off",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2121
with:
2222
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
23-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
23+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2424

2525
- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
2626
run: |

.github/workflows/ci.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525

2626
strategy:
27+
fail-fast: false
2728
matrix:
2829
node-version:
2930
- '20'
@@ -41,7 +42,7 @@ jobs:
4142
steps:
4243
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4344
- name: Use node version ${{ matrix.node-version }}
44-
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
45+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
4546
with:
4647
node-version: ${{ matrix.node-version }}
4748
check-latest: true
@@ -56,7 +57,7 @@ jobs:
5657

5758
steps:
5859
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
59-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
60+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
6061
with:
6162
node-version: '*'
6263
check-latest: true
@@ -70,7 +71,7 @@ jobs:
7071

7172
steps:
7273
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
73-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
74+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
7475
with:
7576
node-version: '*'
7677
check-latest: true
@@ -91,7 +92,7 @@ jobs:
9192

9293
steps:
9394
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
94-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
95+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
9596
with:
9697
node-version: '*'
9798
check-latest: true
@@ -108,7 +109,7 @@ jobs:
108109

109110
steps:
110111
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
111-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
112+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
112113
with:
113114
node-version: '*'
114115
check-latest: true
@@ -123,7 +124,7 @@ jobs:
123124
steps:
124125
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
125126

126-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
127+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
127128
with:
128129
node-version: '*'
129130
check-latest: true
@@ -171,7 +172,7 @@ jobs:
171172
path: base
172173
ref: ${{ github.base_ref }}
173174

174-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
175+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
175176
with:
176177
node-version: '*'
177178
check-latest: true
@@ -205,7 +206,7 @@ jobs:
205206

206207
steps:
207208
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
208-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
209+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
209210
with:
210211
node-version: '*'
211212
check-latest: true
@@ -222,7 +223,7 @@ jobs:
222223

223224
steps:
224225
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
225-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
226+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
226227
with:
227228
node-version: '*'
228229
check-latest: true
@@ -242,7 +243,7 @@ jobs:
242243

243244
steps:
244245
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
245-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
246+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
246247
with:
247248
node-version: '*'
248249
check-latest: true

.github/workflows/close-issues.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ jobs:
4747
close_issues "Declined"
4848
close_issues "Won't Fix"
4949
close_issues "Too Complex"
50+
close_issues "Design Limitation"

.github/workflows/codeql.yml

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

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
49+
uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
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@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
59+
uses: github/codeql-action/autobuild@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
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@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
73+
uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5

.github/workflows/insiders.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Insiders
2+
3+
on:
4+
workflow_dispatch: {}
5+
repository_dispatch:
6+
types: [publish-insiders]
7+
8+
permissions:
9+
contents: read
10+
11+
# Ensure scripts are run with pipefail. See:
12+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
if: github.repository == 'microsoft/TypeScript'
21+
22+
steps:
23+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
24+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
25+
with:
26+
# Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
27+
registry-url: https://registry.npmjs.org/
28+
- run: |
29+
npm --version
30+
# corepack enable npm
31+
npm install -g $(jq -r '.packageManager' < package.json)
32+
npm --version
33+
- name: Setup and publish insiders
34+
run: |
35+
npm whoami
36+
npm ci
37+
npx hereby configure-insiders
38+
npx hereby LKG
39+
npx hereby runtests-parallel
40+
npx hereby clean
41+
npm publish --tag insiders
42+
env:
43+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
2424
fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
2525
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
26-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
26+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2727
- run: |
2828
npm --version
2929
# corepack enable npm

.github/workflows/nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
27+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2828
with:
2929
# Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
3030
registry-url: https://registry.npmjs.org/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
23-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
23+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2424
- run: |
2525
npm --version
2626
# corepack enable npm
@@ -41,7 +41,7 @@ jobs:
4141
npm pack ./
4242
mv typescript-*.tgz typescript.tgz
4343
- name: Upload built tarfile
44-
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
44+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
4545
with:
4646
name: tgz
4747
path: typescript.tgz

.github/workflows/rich-navigation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2828

29-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
29+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
3030

3131
- name: Install dependencies
3232
run: npm ci
3333

34-
- uses: microsoft/RichCodeNavIndexer@e444937494b8941cc2bcccf2bcf2cd595d402f6b # v0.1
34+
- uses: microsoft/RichCodeNavIndexer@c8b97bc908f7bc0151fe4872aa029e99b2a0b96b # v0.1
3535
with:
3636
languages: typescript
3737
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ jobs:
4747
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
4848
# format to the repository Actions tab.
4949
- name: 'Upload artifact'
50-
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
50+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
5151
with:
5252
name: SARIF file
5353
path: results.sarif
5454
retention-days: 5
5555

5656
# Upload the results to GitHub's code scanning dashboard.
5757
- name: 'Upload to code-scanning'
58-
uses: github/codeql-action/upload-sarif@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
58+
uses: github/codeql-action/upload-sarif@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
5959
with:
6060
sarif_file: results.sarif

.github/workflows/set-version.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
ref: ${{ github.event.client_payload.branch_name }}
2323
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
24-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
24+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2525
- run: |
2626
npm --version
2727
# corepack enable npm

.github/workflows/sync-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424

2525
steps:
26-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
26+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2727
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2828
with:
2929
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}

.github/workflows/twoslash-repros.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
4141
- if: ${{ !github.event.inputs.bisect }}
4242
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
43-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
44-
- uses: microsoft/TypeScript-Twoslash-Repro-Action@80178415feb0ebd3ed88d09e263a7cb8c8d6e1d2 # master
43+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
44+
- uses: microsoft/TypeScript-Twoslash-Repro-Action@8680b5b290d48a7badbc7ba65971d526c61b86b8 # master
4545
with:
4646
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
4747
issue: ${{ github.event.inputs.issue }}

.github/workflows/update-package-lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626
with:
2727
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
28-
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
28+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2929
with:
3030
node-version: '*'
3131
check-latest: true

.vscode/launch.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"0"
3939
],
4040
"env": {
41-
"NODE_ENV": "testing"
41+
"NODE_ENV": "development"
4242
},
4343
"outFiles": [
4444
"${workspaceFolder}/built/**/*.js",

Herebyfile.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,15 @@ export const cleanSrc = task({
160160
run: () => cleanProject("src"),
161161
});
162162

163+
const dtsBundlerPath = "./scripts/dtsBundler.mjs";
164+
163165
/**
164166
* @param {string} entrypoint
165167
* @param {string} output
166168
*/
167169
async function runDtsBundler(entrypoint, output) {
168170
await exec(process.execPath, [
169-
"./scripts/dtsBundler.mjs",
171+
dtsBundlerPath,
170172
"--entrypoint",
171173
entrypoint,
172174
"--output",
@@ -403,7 +405,7 @@ export const dtsServices = task({
403405
description: "Bundles typescript.d.ts",
404406
dependencies: [buildServices],
405407
run: async () => {
406-
if (needsUpdate("./built/local/typescript/tsconfig.tsbuildinfo", ["./built/local/typescript.d.ts", "./built/local/typescript.internal.d.ts"])) {
408+
if (needsUpdate(["./built/local/typescript/tsconfig.tsbuildinfo", dtsBundlerPath], ["./built/local/typescript.d.ts", "./built/local/typescript.internal.d.ts"])) {
407409
await runDtsBundler("./built/local/typescript/typescript.d.ts", "./built/local/typescript.d.ts");
408410
}
409411
},
@@ -526,6 +528,7 @@ export const lint = task({
526528
`${folder}/.eslintcache`,
527529
"--format",
528530
formatter,
531+
"--report-unused-disable-directives",
529532
];
530533

531534
if (cmdLineOptions.fix) {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ with any additional questions or comments.
4747

4848
## Roadmap
4949

50-
For details on our planned features and future direction please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).
50+
For details on our planned features and future direction, please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).

0 commit comments

Comments
 (0)