Skip to content

Commit 3037443

Browse files
committed
Merge branch 'master' into better-signature-identity-checks
2 parents e14c58e + b9f372e commit 3037443

File tree

7,870 files changed

+965617
-595598
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,870 files changed

+965617
-595598
lines changed

.dockerignore

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ yarn-error.log
4343
.parallelperf.*
4444
.failed-tests
4545
TEST-results.xml
46-
package-lock.json
4746
tests
4847
.vscode
4948
.git

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/built/local/**
22
/tests/**
33
/lib/**
4-
/src/lib/*.generated.d.ts
4+
/src/lib/*.generated.d.ts

.eslintrc.json

+19-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,27 @@
1717
"@typescript-eslint/adjacent-overload-signatures": "error",
1818
"@typescript-eslint/array-type": "error",
1919

20-
"camelcase": "off",
21-
"@typescript-eslint/camelcase": ["error", { "properties": "never", "allow": ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"] }],
20+
"brace-style": "off",
21+
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
22+
23+
"@typescript-eslint/naming-convention": [
24+
"error",
25+
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
26+
{ "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false }, "filter": { "regex": "^I(Arguments|TextWriter|O([A-Z][a-z]+[A-Za-z]*)?)$", "match": false } },
27+
{ "selector": "variable", "format": ["camelCase", "PascalCase", "UPPER_CASE"], "leadingUnderscore": "allow", "filter": { "regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
28+
{ "selector": "function", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
29+
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$", "match": false } },
30+
{ "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
31+
{ "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
32+
{ "selector": "enumMember", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
33+
{ "selector": "property", "format": null }
34+
],
2235

23-
"@typescript-eslint/class-name-casing": "error",
2436
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
25-
"@typescript-eslint/interface-name-prefix": "error",
37+
38+
"no-duplicate-imports": "off",
39+
"@typescript-eslint/no-duplicate-imports": "error",
40+
2641
"@typescript-eslint/no-inferrable-types": "error",
2742
"@typescript-eslint/no-misused-new": "error",
2843
"@typescript-eslint/no-this-alias": "error",
@@ -77,7 +92,6 @@
7792
"jsdoc/check-alignment": "error",
7893

7994
// eslint
80-
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
8195
"constructor-super": "error",
8296
"curly": ["error", "multi-line"],
8397
"dot-notation": "error",
@@ -86,7 +100,6 @@
86100
"new-parens": "error",
87101
"no-caller": "error",
88102
"no-duplicate-case": "error",
89-
"no-duplicate-imports": "error",
90103
"no-empty": "error",
91104
"no-eval": "error",
92105
"no-extra-bind": "error",

.github/ISSUE_TEMPLATE/Bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77

88
---
99

10-
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
10+
<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨
1111
1212
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
1313

.github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ contact_links:
1414
name: "TypeScript FAQ"
1515
url: "https://github.com/microsoft/TypeScript/wiki/FAQ"
1616
-
17-
about: "Please raise issues about the site on it's own repo."
17+
about: "Please raise issues about the site on its own repo."
1818
name: Website
1919
url: "https://github.com/microsoft/TypeScript-Website/issues/new"
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name : CodeQL Configuration
2+
3+
paths:
4+
- './src'

.github/pr_owners.txt

+5
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ RyanCavanaugh
66
sheetalkamat
77
orta
88
rbuckton
9+
ahejlsberg
10+
amcasey
11+
jessetrinity
12+
minestarks
13+
uniqueiniquity

.github/tsc.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "tsc",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),(\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"severity": 4,
12+
"code": 5,
13+
"message": 6
14+
}
15+
]
16+
}
17+
]
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Accept Baselines and Fix Lints
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Use node version 12
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
registry-url: https://registry.npmjs.org/
17+
18+
- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
19+
run: |
20+
git config user.email "[email protected]"
21+
git config user.name "TypeScript Bot"
22+
npm install
23+
gulp runtests-parallel --ci --fix || true
24+
gulp baseline-accept
25+
git add ./src
26+
git add ./tests/baselines/reference
27+
git diff --cached
28+
git commit -m "Update Baselines and/or Applied Lint Fixes"
29+
git push

.github/workflows/ci.yml

+18-8
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [8.x, 10.x, 12.x]
19+
node-version: [10.x, 12.x, 14.x]
2020

2121
steps:
22-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v2
2323
with:
2424
fetch-depth: 5
2525
- name: Use node version ${{ matrix.node-version }}
@@ -30,11 +30,21 @@ jobs:
3030
run: |
3131
npm uninstall typescript --no-save
3232
npm uninstall tslint --no-save
33-
- name: npm install and test
34-
run: |
35-
npm install
36-
npm update
37-
npm test
33+
- run: npm ci
34+
35+
# Re: https://github.com/actions/setup-node/pull/125
36+
- name: Register Problem Matcher for TSC
37+
run: echo "##[add-matcher].github/tsc.json"
38+
39+
- name: Tests
40+
run: npm test -- --no-lint
41+
42+
- name: Linter
43+
run: npm run lint:ci
44+
45+
- name: Adding playwright
46+
run: npm install --no-save --no-package-lock playwright
47+
3848
- name: Validate the browser can import TypeScript
3949
run: gulp test-browser-integration
40-
50+

.github/workflows/codeql.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 19 * * 0'
8+
9+
jobs:
10+
CodeQL-Build:
11+
12+
# CodeQL runs on ubuntu-latest and windows-latest
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
with:
19+
# We must fetch at least the immediate parents so that if this is
20+
# a pull request then we can checkout the head.
21+
fetch-depth: 2
22+
23+
# If this run was triggered by a pull request event, then checkout
24+
# the head of the pull request instead of the merge commit.
25+
- run: git checkout HEAD^2
26+
if: ${{ github.event_name == 'pull_request' }}
27+
28+
# Initializes the CodeQL tools for scanning.
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v1
31+
with:
32+
config-file: ./.github/codeql/codeql-configuration.yml
33+
# Override language selection by uncommenting this and choosing your languages
34+
# with:
35+
# languages: go, javascript, csharp, python, cpp, java
36+
37+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
38+
# If this step fails, then you should remove it and run the build manually (see below)
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@v1
41+
42+
# ℹ️ Command-line programs to run using the OS shell.
43+
# 📚 https://git.io/JvXDl
44+
45+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
46+
# and modify them (or add more) to build your code if your project
47+
# uses a compiled language
48+
49+
#- run: |
50+
# make bootstrap
51+
# make release
52+
53+
- name: Perform CodeQL Analysis
54+
uses: github/codeql-action/analyze@v1

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
2424
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
2525
sed -i -e 's/const version = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts
26-
npm install
26+
npm ci
2727
gulp LKG
2828
npm test
2929
git diff
@@ -32,7 +32,7 @@ jobs:
3232
git add tests/baselines/reference/api/typescript.d.ts
3333
git add tests/baselines/reference/api/tsserverlibrary.d.ts
3434
git add ./lib
35-
git config user.email "ts_bot@rcavanaugh.com"
35+
git config user.email "typescriptbot@microsoft.com"
3636
git config user.name "TypeScript Bot"
3737
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
3838
git push --set-upstream origin ${{ github.event.client_payload.branch_name }}

.github/workflows/nightly.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Publish Nightly
33
on:
44
schedule:
55
- cron: '0 7 * * *'
6+
# enable users to manually trigger with workflow_dispatch
7+
workflow_dispatch: {}
68
repository_dispatch:
79
types: publish-nightly
810

@@ -20,7 +22,7 @@ jobs:
2022
- name: Setup and publish nightly
2123
run: |
2224
npm whoami
23-
npm i
25+
npm ci
2426
gulp configure-nightly
2527
gulp LKG
2628
gulp runtests-parallel

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ jobs:
2121
npm uninstall tslint --no-save
2222
- name: npm install and test
2323
run: |
24-
npm install
25-
npm update
24+
npm ci
2625
npm test
2726
env:
2827
CI: true
28+
- name: Adding playwright
29+
run: npm install --no-save --no-package-lock playwright
2930
- name: Validate the browser can import TypeScript
3031
run: gulp test-browser-integration
3132
- name: LKG, clean, and pack
@@ -41,4 +42,3 @@ jobs:
4142
with:
4243
name: tgz
4344
path: typescript.tgz
44-

.github/workflows/set-version.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
3030
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
3131
sed -i -e 's/const version = .*;/const version = "${{ github.event.client_payload.package_version }}" as string;/g' src/compiler/corePublic.ts
32-
npm install
32+
npm ci
3333
gulp LKG
3434
npm test
3535
git diff
@@ -38,7 +38,7 @@ jobs:
3838
git add tests/baselines/reference/api/typescript.d.ts
3939
git add tests/baselines/reference/api/tsserverlibrary.d.ts
4040
git add ./lib
41-
git config user.email "ts_bot@rcavanaugh.com"
41+
git config user.email "typescriptbot@microsoft.com"
4242
git config user.name "TypeScript Bot"
4343
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
4444
git push

.github/workflows/sync-branch.yaml

+10-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Sync branch with master
33
on:
44
repository_dispatch:
55
types: sync-branch
6+
workflow_dispatch:
7+
inputs:
8+
branch_name:
9+
description: 'Target Branch Name'
10+
required: true
611

712
jobs:
813
build:
@@ -15,15 +20,16 @@ jobs:
1520
node-version: 12.x
1621
- uses: actions/checkout@v2
1722
with:
18-
ref: ${{ github.event.client_payload.branch_name }}
23+
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
24+
fetch-depth: 0
1925
# This does a test post-merge and only pushes the result if the test succeeds
2026
# required client_payload members:
2127
# branch_name - the target branch
2228
- run: |
23-
git config user.email "ts_bot@rcavanaugh.com"
29+
git config user.email "typescriptbot@microsoft.com"
2430
git config user.name "TypeScript Bot"
2531
git fetch origin master
26-
git merge master --no-ff
27-
npm install
32+
git merge origin/master --no-ff
33+
npm ci
2834
npm test
2935
git push
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Twoslash Code Sample Repros
2+
3+
on:
4+
push:
5+
branches:
6+
- orta-twoslash-repros
7+
schedule:
8+
- cron: '0 8 * * *'
9+
repository_dispatch:
10+
types: run-twoslash-repros
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Use node
17+
uses: actions/setup-node@v1
18+
- run: |
19+
npm init -y
20+
npm install --save typescript@next
21+
- uses: microsoft/TypeScript-Twoslash-Repro-Action@master
22+
with:
23+
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)