Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/microsoft/TypeScript into…
Browse files Browse the repository at this point in the history
… ts-expect-error
  • Loading branch information
orta committed Mar 3, 2020
2 parents eb5610a + 3046a54 commit 7a5ef8a
Show file tree
Hide file tree
Showing 3,891 changed files with 254,646 additions and 118,469 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 11 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-this-alias": "error",

"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],

"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
Expand All @@ -36,6 +40,13 @@
"semi": "off",
"@typescript-eslint/semi": "error",

"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": ["error", {
"asyncArrow": "always",
"anonymous": "always",
"named": "never"
}],

"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
Expand Down Expand Up @@ -97,7 +108,6 @@
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": ["error", { "allowTernary": true }],
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "error",
Expand Down
28 changes: 18 additions & 10 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
---
blank_issues_enabled: false
contact_links:
- name: Question
url: https://stackoverflow.com/questions/tagged/typescript
about: Please ask and answer questions here.
- name: TypeScript FAQ
url: https://github.com/microsoft/TypeScript/wiki/FAQ
about: Please check the FAQ before filing new issues
- name: Website
url: https://github.com/microsoft/TypeScript-Website/issues/new
about: Please raise issues about the site on it's own repo.
contact_links:
-
about: "Please ask and answer usage questions on Stack Overflow."
name: Question
url: "https://stackoverflow.com/questions/tagged/typescript"
-
about: "Alternatively, you can use the TypeScript Community Discord."
name: Chat
url: "https://discord.gg/typescript"
-
about: "Please check the FAQ before filing new issues"
name: "TypeScript FAQ"
url: "https://github.com/microsoft/TypeScript/wiki/FAQ"
-
about: "Please raise issues about the site on it's own repo."
name: Website
url: "https://github.com/microsoft/TypeScript-Website/issues/new"
8 changes: 8 additions & 0 deletions .github/pr_owners.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sandersn
elibarzilay
weswigham
andrewbranch
RyanCavanaugh
sheetalkamat
orta
rbuckton
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ jobs:
npm install
npm update
npm test
- name: Validate the browser can import TypeScript
run: gulp test-browser-integration

38 changes: 38 additions & 0 deletions .github/workflows/new-release-branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: New Release Branch

on:
repository_dispatch:
types: new-release-branch

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Use node version 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/checkout@v2
with:
fetch-depth: 5
- run: |
git checkout -b ${{ github.event.client_payload.branch_name }}
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
sed -i -e 's/const version = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts
npm install
gulp LKG
npm test
git diff
git add package.json
git add src/compiler/corePublic.ts
git add tests/baselines/reference/api/typescript.d.ts
git add tests/baselines/reference/api/tsserverlibrary.d.ts
git add ./lib
git config user.email "ts_bot@rcavanaugh.com"
git config user.name "TypeScript Bot"
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
git push --set-upstream origin ${{ github.event.client_payload.branch_name }}
32 changes: 32 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Nightly

on:
schedule:
- cron: '0 7 * * *'
repository_dispatch:
types: publish-nightly

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use node version 12
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Setup and publish nightly
run: |
npm whoami
npm i
gulp configure-nightly
gulp LKG
gulp runtests-parallel
gulp clean
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
CI: true

44 changes: 44 additions & 0 deletions .github/workflows/release-branch-artifact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Create Releasable Package Drop

on:
push:
branches:
- release-*

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use node version 12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Remove existing TypeScript
run: |
npm uninstall typescript --no-save
npm uninstall tslint --no-save
- name: npm install and test
run: |
npm install
npm update
npm test
env:
CI: true
- name: Validate the browser can import TypeScript
run: gulp test-browser-integration
- name: LKG, clean, and pack
run: |
gulp LKG
gulp clean
npm pack ./
mv typescript-*.tgz typescript.tgz
env:
CI: true
- name: Upload built tarfile
uses: actions/upload-artifact@v1
with:
name: tgz
path: typescript.tgz

44 changes: 44 additions & 0 deletions .github/workflows/set-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Set branch version

on:
repository_dispatch:
types: set-version

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Use node version 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.branch_name }}
# notably, this is essentially the same script as `new-release-branch.yaml` (with fewer inputs), but it assumes the branch already exists
# do note that executing the transform below will prevent the `configurePrerelease` script from running on the source, as it makes the
# `version` identifier no longer match the regex it uses
# required client_payload members:
# branch_name - the target branch
# package_version - the full version string (eg, `3.9.1-rc` or `3.9.2`)
# core_major_minor - the major.minor pair associated with the desired package_version (eg, `3.9` for `3.9.3`)
- run: |
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
sed -i -e 's/const version = .*;/const version = "${{ github.event.client_payload.package_version }}" as string;/g' src/compiler/corePublic.ts
npm install
gulp LKG
npm test
git diff
git add package.json
git add src/compiler/corePublic.ts
git add tests/baselines/reference/api/typescript.d.ts
git add tests/baselines/reference/api/tsserverlibrary.d.ts
git add ./lib
git config user.email "ts_bot@rcavanaugh.com"
git config user.name "TypeScript Bot"
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
git push
29 changes: 29 additions & 0 deletions .github/workflows/sync-branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Sync branch with master

on:
repository_dispatch:
types: sync-branch

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Use node version 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.branch_name }}
# This does a test post-merge and only pushes the result if the test succeeds
# required client_payload members:
# branch_name - the target branch
- run: |
git config user.email "ts_bot@rcavanaugh.com"
git config user.name "TypeScript Bot"
git fetch origin master
git merge master --no-ff
npm install
npm test
git push
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"rbuckton.tsserver-live-reload"
],

"unwantedRecommendations": [
Expand Down
Loading

0 comments on commit 7a5ef8a

Please sign in to comment.