Skip to content

Commit 4214548

Browse files
committed
Merge branch 'master' into fix36031
# Conflicts: # src/compiler/debug.ts
2 parents d187ca7 + 634d514 commit 4214548

File tree

1,534 files changed

+96666
-28512
lines changed

Some content is hidden

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

1,534 files changed

+96666
-28512
lines changed

.eslintrc.json

+11-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",
@@ -97,7 +108,6 @@
97108
"no-trailing-spaces": "error",
98109
"no-undef-init": "error",
99110
"no-unsafe-finally": "error",
100-
"no-unused-expressions": ["error", { "allowTernary": true }],
101111
"no-unused-labels": "error",
102112
"no-var": "error",
103113
"object-shorthand": "error",

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ jobs:
3535
npm install
3636
npm update
3737
npm test
38+
- name: Validate the browser can import TypeScript
39+
run: gulp test-browser-integration
40+
+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 }}

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

.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

.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

0 commit comments

Comments
 (0)