Skip to content

Commit 71afc1b

Browse files
Merge remote-tracking branch 'remotes/origin/main' into isolated-declarations-unity
2 parents f60c1a7 + 3fca8c8 commit 71afc1b

File tree

4,659 files changed

+205613
-278293
lines changed

Some content is hidden

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

4,659 files changed

+205613
-278293
lines changed

.dprint.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
],
5757
// Note: if adding new languages, make sure settings.template.json is updated too.
5858
"plugins": [
59-
"https://plugins.dprint.dev/typescript-0.88.8.wasm",
59+
"https://plugins.dprint.dev/typescript-0.88.9.wasm",
6060
"https://plugins.dprint.dev/json-0.19.1.wasm",
61-
"https://plugins.dprint.dev/prettier-0.32.1.json@19aa403ef0862ba8c41164e3dc6f84c0b7a66c2b11e42726b23dd25e6302ada9"
61+
"https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40"
6262
]
6363
}
File renamed without changes.

.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: 12 additions & 11 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,13 +71,13 @@ 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
7778
- run: npm ci
7879

79-
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
80+
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
8081
with:
8182
path: ~/.cache/dprint
8283
key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }}
@@ -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@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
49+
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
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@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
59+
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
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@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
73+
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6

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

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Create cherry pick PR
22

33
on:
4-
repository_dispatch:
5-
types: [create-cherry-pick-pr]
64
workflow_dispatch:
75
inputs:
86
pr:
@@ -13,10 +11,26 @@ on:
1311
description: Target branch to cherry-pick to
1412
required: true
1513
type: string
14+
15+
# Inputs provided by the bot
16+
distinct_id:
17+
description: '(bot) A distinct ID'
18+
required: false
19+
default: ''
20+
source_issue:
21+
description: '(bot) The issue that triggered this workflow'
22+
required: false
23+
default: ''
1624
requesting_user:
17-
description: User who requested the cherry-pick
18-
required: true
19-
type: string
25+
description: '(bot) The user who requested this workflow'
26+
required: false
27+
default: ''
28+
status_comment:
29+
description: '(bot) The comment to update with the status of this workflow'
30+
required: false
31+
default: ''
32+
33+
run-name: ${{ github.workflow }}${{ inputs.distinct_id && format(' (bot run {0})', inputs.distinct_id) || '' }}
2034

2135
permissions:
2236
contents: read
@@ -40,15 +54,27 @@ jobs:
4054
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
4155

4256
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
57+
id: open-pr
4358
env:
44-
PR: ${{ inputs.pr || github.event.client_payload.pr }}
45-
TARGET_BRANCH: ${{ inputs.target_branch || github.event.client_payload.target_branch }}
46-
REQUESTING_USER: ${{ inputs.requesting_user || github.event.client_payload.requesting_user }}
59+
PR: ${{ inputs.pr }}
60+
TARGET_BRANCH: ${{ inputs.target_branch }}
61+
DISTINCT_ID: ${{ inputs.distinct_id }}
62+
SOURCE_ISSUE: ${{ inputs.source_issue }}
63+
REQUESTING_USER: ${{ inputs.requesting_user }}
64+
STATUS_COMMENT: ${{ inputs.status_comment }}
4765
with:
4866
retries: 3
4967
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
68+
result-encoding: string
5069
script: |
51-
const { PR, TARGET_BRANCH, REQUESTING_USER } = process.env;
70+
const {
71+
PR,
72+
TARGET_BRANCH,
73+
DISTINCT_ID,
74+
SOURCE_ISSUE,
75+
REQUESTING_USER,
76+
STATUS_COMMENT,
77+
} = process.env;
5278
5379
const pr = await github.rest.pulls.get({
5480
owner: context.repo.owner,
@@ -75,6 +101,8 @@ jobs:
75101
head: `${context.repo.owner}:${pickBranch}`,
76102
});
77103
104+
let commentBody;
105+
78106
if (existingPulls.data.length === 0) {
79107
console.log(`No existing PRs found for ${pickBranch}`);
80108
@@ -91,12 +119,7 @@ jobs:
91119
reviewers: ["DanielRosenwasser", REQUESTING_USER],
92120
});
93121
94-
await github.rest.issues.createComment({
95-
owner: context.repo.owner,
96-
repo: context.repo.repo,
97-
issue_number: +PR,
98-
body: `Hey @${REQUESTING_USER}, I've created #${newPr.data.number} for you.`,
99-
});
122+
commentBody = `I've created #${newPr.data.number} for you.`;
100123
}
101124
else {
102125
const existing = existingPulls.data[0];
@@ -109,23 +132,18 @@ jobs:
109132
title,
110133
});
111134
112-
await github.rest.issues.createComment({
113-
owner: context.repo.owner,
114-
repo: context.repo.repo,
115-
issue_number: +PR,
116-
body: `Hey @${REQUESTING_USER}, I've updated #${existing.number} for you.`,
117-
});
135+
commentBody = `I've updated #${existing.number} for you.`;
118136
}
119137
120-
- run: |
121-
MESSAGE="Hey @$REQUESTING_USER, I was unable to cherry-pick this PR."
122-
MESSAGE+=$'\n\n'
123-
MESSAGE+="Check the logs at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
138+
return commentBody;
124139
125-
gh pr comment "$PR" --repo ${{ github.repository }} --body "$MESSAGE"
126-
if: ${{ failure() }}
127-
env:
128-
PR: ${{ inputs.pr || github.event.client_payload.pr }}
129-
TARGET_BRANCH: ${{ inputs.target_branch || github.event.client_payload.target_branch }}
130-
REQUESTING_USER: ${{ inputs.requesting_user || github.event.client_payload.requesting_user }}
131-
GH_TOKEN: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
140+
- uses: microsoft/typescript-bot-test-triggerer/.github/actions/post-workflow-result@master
141+
if: ${{ !cancelled() && inputs.distinct_id }}
142+
with:
143+
success_comment: ${{ steps.open-pr.outputs.result }}
144+
failure_comment: 'I was unable to cherry-pick this PR.'
145+
github_token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
146+
distinct_id: ${{ inputs.distinct_id }}
147+
source_issue: ${{ inputs.source_issue }}
148+
requesting_user: ${{ inputs.requesting_user }}
149+
status_comment: ${{ inputs.status_comment }}

.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}}

0 commit comments

Comments
 (0)