Skip to content

Commit 086633f

Browse files
committed
Merge branch 'master' into nodeFactory-merge
2 parents ae7c638 + ba02f43 commit 086633f

File tree

6,961 files changed

+618933
-311146
lines changed

Some content is hidden

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

6,961 files changed

+618933
-311146
lines changed

Diff for: .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

Diff for: .eslintrc.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"@typescript-eslint/no-inferrable-types": "error",
2727
"@typescript-eslint/no-misused-new": "error",
2828
"@typescript-eslint/no-this-alias": "error",
29+
30+
"no-unused-expressions": "off",
31+
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
32+
2933
"@typescript-eslint/prefer-for-of": "error",
3034
"@typescript-eslint/prefer-function-type": "error",
3135
"@typescript-eslint/prefer-namespace-keyword": "error",
@@ -36,6 +40,13 @@
3640
"semi": "off",
3741
"@typescript-eslint/semi": "error",
3842

43+
"space-before-function-paren": "off",
44+
"@typescript-eslint/space-before-function-paren": ["error", {
45+
"asyncArrow": "always",
46+
"anonymous": "always",
47+
"named": "never"
48+
}],
49+
3950
"@typescript-eslint/triple-slash-reference": "error",
4051
"@typescript-eslint/type-annotation-spacing": "error",
4152
"@typescript-eslint/unified-signatures": "error",
@@ -54,6 +65,7 @@
5465
"simple-indent": "error",
5566
"debug-assert": "error",
5667
"no-keywords": "error",
68+
"one-namespace-per-file": "error",
5769

5870
// eslint-plugin-import
5971
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
@@ -96,7 +108,6 @@
96108
"no-trailing-spaces": "error",
97109
"no-undef-init": "error",
98110
"no-unsafe-finally": "error",
99-
"no-unused-expressions": ["error", { "allowTernary": true }],
100111
"no-unused-labels": "error",
101112
"no-var": "error",
102113
"object-shorthand": "error",

Diff for: .github/ISSUE_TEMPLATE/config.yml

+18-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1+
---
12
blank_issues_enabled: false
2-
contact_links:
3-
- name: Question
4-
url: https://stackoverflow.com/questions/tagged/typescript
5-
about: Please ask and answer questions here.
6-
- name: TypeScript FAQ
7-
url: https://github.com/microsoft/TypeScript/wiki/FAQ
8-
about: Please check the FAQ before filing new issues
3+
contact_links:
4+
-
5+
about: "Please ask and answer usage questions on Stack Overflow."
6+
name: Question
7+
url: "https://stackoverflow.com/questions/tagged/typescript"
8+
-
9+
about: "Alternatively, you can use the TypeScript Community Discord."
10+
name: Chat
11+
url: "https://discord.gg/typescript"
12+
-
13+
about: "Please check the FAQ before filing new issues"
14+
name: "TypeScript FAQ"
15+
url: "https://github.com/microsoft/TypeScript/wiki/FAQ"
16+
-
17+
about: "Please raise issues about the site on its own repo."
18+
name: Website
19+
url: "https://github.com/microsoft/TypeScript-Website/issues/new"

Diff for: .github/pr_owners.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sandersn
2+
elibarzilay
3+
weswigham
4+
andrewbranch
5+
RyanCavanaugh
6+
sheetalkamat
7+
orta
8+
rbuckton

Diff for: .github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

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

2121
steps:
2222
- uses: actions/checkout@v1
@@ -35,3 +35,7 @@ jobs:
3535
npm install
3636
npm update
3737
npm test
38+
39+
- name: Validate the browser can import TypeScript
40+
run: gulp test-browser-integration
41+

Diff for: .github/workflows/new-release-branch.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: New Release Branch
2+
3+
on:
4+
repository_dispatch:
5+
types: new-release-branch
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Use node version 12.x
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12.x
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 5
19+
- run: |
20+
git checkout -b ${{ github.event.client_payload.branch_name }}
21+
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
22+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
23+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
24+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
25+
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
27+
gulp LKG
28+
npm test
29+
git diff
30+
git add package.json
31+
git add src/compiler/corePublic.ts
32+
git add tests/baselines/reference/api/typescript.d.ts
33+
git add tests/baselines/reference/api/tsserverlibrary.d.ts
34+
git add ./lib
35+
git config user.email "[email protected]"
36+
git config user.name "TypeScript Bot"
37+
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
38+
git push --set-upstream origin ${{ github.event.client_payload.branch_name }}

Diff for: .github/workflows/nightly.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 7 * * *'
6+
repository_dispatch:
7+
types: publish-nightly
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Use node version 12
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 12
19+
registry-url: https://registry.npmjs.org/
20+
- name: Setup and publish nightly
21+
run: |
22+
npm whoami
23+
npm i
24+
gulp configure-nightly
25+
gulp LKG
26+
gulp runtests-parallel
27+
gulp clean
28+
npm publish --tag next
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
31+
CI: true
32+

Diff for: .github/workflows/release-branch-artifact.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Create Releasable Package Drop
2+
3+
on:
4+
push:
5+
branches:
6+
- release-*
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Use node version 12
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
- name: Remove existing TypeScript
19+
run: |
20+
npm uninstall typescript --no-save
21+
npm uninstall tslint --no-save
22+
- name: npm install and test
23+
run: |
24+
npm install
25+
npm update
26+
npm test
27+
env:
28+
CI: true
29+
- name: Validate the browser can import TypeScript
30+
run: gulp test-browser-integration
31+
- name: LKG, clean, and pack
32+
run: |
33+
gulp LKG
34+
gulp clean
35+
npm pack ./
36+
mv typescript-*.tgz typescript.tgz
37+
env:
38+
CI: true
39+
- name: Upload built tarfile
40+
uses: actions/upload-artifact@v1
41+
with:
42+
name: tgz
43+
path: typescript.tgz
44+

Diff for: .github/workflows/set-version.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Set branch version
2+
3+
on:
4+
repository_dispatch:
5+
types: set-version
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Use node version 12.x
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12.x
16+
- uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.client_payload.branch_name }}
19+
# notably, this is essentially the same script as `new-release-branch.yaml` (with fewer inputs), but it assumes the branch already exists
20+
# do note that executing the transform below will prevent the `configurePrerelease` script from running on the source, as it makes the
21+
# `version` identifier no longer match the regex it uses
22+
# required client_payload members:
23+
# branch_name - the target branch
24+
# package_version - the full version string (eg, `3.9.1-rc` or `3.9.2`)
25+
# core_major_minor - the major.minor pair associated with the desired package_version (eg, `3.9` for `3.9.3`)
26+
- run: |
27+
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
28+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
29+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
30+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
31+
sed -i -e 's/const version = .*;/const version = "${{ github.event.client_payload.package_version }}" as string;/g' src/compiler/corePublic.ts
32+
npm install
33+
gulp LKG
34+
npm test
35+
git diff
36+
git add package.json
37+
git add src/compiler/corePublic.ts
38+
git add tests/baselines/reference/api/typescript.d.ts
39+
git add tests/baselines/reference/api/tsserverlibrary.d.ts
40+
git add ./lib
41+
git config user.email "[email protected]"
42+
git config user.name "TypeScript Bot"
43+
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
44+
git push

Diff for: .github/workflows/sync-branch.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync branch with master
2+
3+
on:
4+
repository_dispatch:
5+
types: sync-branch
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Use node version 12.x
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12.x
16+
- uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.client_payload.branch_name }}
19+
# This does a test post-merge and only pushes the result if the test succeeds
20+
# required client_payload members:
21+
# branch_name - the target branch
22+
- run: |
23+
git config user.email "[email protected]"
24+
git config user.name "TypeScript Bot"
25+
git fetch origin master
26+
git merge master --no-ff
27+
npm install
28+
npm test
29+
git push

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ scripts/processDiagnosticMessages.js
5353
scripts/produceLKG.js
5454
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
5555
scripts/generateLocalizedDiagnosticMessages.js
56+
scripts/request-pr-review.js
5657
scripts/*.js.map
5758
scripts/typings/
5859
coverage/
@@ -90,6 +91,7 @@ tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
9091
tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
9192
tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
9293
tests/cases/user/create-react-app/create-react-app
94+
tests/cases/user/fp-ts/fp-ts
9395
tests/cases/user/webpack/webpack
9496
tests/cases/user/puppeteer/puppeteer
9597
tests/cases/user/axios-src/axios-src

Diff for: .vscode/extensions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
3-
"dbaeumer.vscode-eslint"
3+
"dbaeumer.vscode-eslint",
4+
"rbuckton.tsserver-live-reload"
45
],
56

67
"unwantedRecommendations": [

Diff for: .vscode/launch.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"sourceMaps": true,
4545
"smartStep": true,
46-
"preLaunchTask": "tests",
46+
"preLaunchTask": "gulp: tests",
4747
"console": "integratedTerminal",
4848
"outFiles": [
4949
"${workspaceRoot}/built/local/run.js"

Diff for: .vscode/tasks.json

+27-16
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,42 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"type": "shell",
8-
"identifier": "local",
7+
"type": "gulp",
98
"label": "gulp: local",
10-
"command": "gulp",
11-
"args": ["local"],
12-
"group": { "kind": "build", "isDefault": true },
13-
"problemMatcher": ["$gulp-tsc"]
9+
"task": "local",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
},
14+
"problemMatcher": [
15+
"$tsc"
16+
]
1417
},
1518
{
16-
"type": "shell",
17-
"identifier": "tsc",
19+
"type": "gulp",
1820
"label": "gulp: tsc",
19-
"command": "gulp",
20-
"args": ["tsc"],
21+
"task": "tsc",
2122
"group": "build",
22-
"problemMatcher": ["$gulp-tsc"]
23+
"problemMatcher": [
24+
"$tsc"
25+
]
2326
},
2427
{
25-
"type": "shell",
26-
"identifier": "tests",
28+
"type": "gulp",
2729
"label": "gulp: tests",
28-
"command": "gulp",
29-
"args": ["tests"],
30+
"task": "tests",
3031
"group": "build",
31-
"problemMatcher": ["$tsc"]
32+
"problemMatcher": [
33+
"$tsc"
34+
]
35+
},
36+
{
37+
"type": "gulp",
38+
"task": "services",
39+
"label": "gulp: services",
40+
"problemMatcher": [
41+
"$tsc"
42+
],
3243
}
3344
]
3445
}

0 commit comments

Comments
 (0)