Skip to content

Commit

Permalink
Merge branch 'master' into better-signature-identity-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham committed Dec 15, 2020
2 parents e14c58e + b9f372e commit 3037443
Show file tree
Hide file tree
Showing 7,870 changed files with 965,617 additions and 595,598 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ yarn-error.log
.parallelperf.*
.failed-tests
TEST-results.xml
package-lock.json
tests
.vscode
.git
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/built/local/**
/tests/**
/lib/**
/src/lib/*.generated.d.ts
/src/lib/*.generated.d.ts
25 changes: 19 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,27 @@
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",

"camelcase": "off",
"@typescript-eslint/camelcase": ["error", { "properties": "never", "allow": ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"] }],
"brace-style": "off",
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],

"@typescript-eslint/naming-convention": [
"error",
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
{ "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 } },
{ "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 } },
{ "selector": "function", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$", "match": false } },
{ "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "enumMember", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "property", "format": null }
],

"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/interface-name-prefix": "error",

"no-duplicate-imports": "off",
"@typescript-eslint/no-duplicate-imports": "error",

"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-this-alias": "error",
Expand Down Expand Up @@ -77,7 +92,6 @@
"jsdoc/check-alignment": "error",

// eslint
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"constructor-super": "error",
"curly": ["error", "multi-line"],
"dot-notation": "error",
Expand All @@ -86,7 +100,6 @@
"new-parens": "error",
"no-caller": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": "error",
"no-eval": "error",
"no-extra-bind": "error",
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨
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!
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ contact_links:
name: "TypeScript FAQ"
url: "https://github.com/microsoft/TypeScript/wiki/FAQ"
-
about: "Please raise issues about the site on it's own repo."
about: "Please raise issues about the site on its own repo."
name: Website
url: "https://github.com/microsoft/TypeScript-Website/issues/new"
4 changes: 4 additions & 0 deletions .github/codeql/codeql-configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name : CodeQL Configuration

paths:
- './src'
5 changes: 5 additions & 0 deletions .github/pr_owners.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ RyanCavanaugh
sheetalkamat
orta
rbuckton
ahejlsberg
amcasey
jessetrinity
minestarks
uniqueiniquity
18 changes: 18 additions & 0 deletions .github/tsc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "tsc",
"pattern": [
{
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),(\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
]
}
]
}
29 changes: 29 additions & 0 deletions .github/workflows/accept-baselines-fix-lints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Accept Baselines and Fix Lints

on:
workflow_dispatch: {}

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: Configure Git, Run Tests, Update Baselines, Apply Fixes
run: |
git config user.email "[email protected]"
git config user.name "TypeScript Bot"
npm install
gulp runtests-parallel --ci --fix || true
gulp baseline-accept
git add ./src
git add ./tests/baselines/reference
git diff --cached
git commit -m "Update Baselines and/or Applied Lint Fixes"
git push
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Use node version ${{ matrix.node-version }}
Expand All @@ -30,11 +30,21 @@ jobs:
run: |
npm uninstall typescript --no-save
npm uninstall tslint --no-save
- name: npm install and test
run: |
npm install
npm update
npm test
- run: npm ci

# Re: https://github.com/actions/setup-node/pull/125
- name: Register Problem Matcher for TSC
run: echo "##[add-matcher].github/tsc.json"

- name: Tests
run: npm test -- --no-lint

- name: Linter
run: npm run lint:ci

- name: Adding playwright
run: npm install --no-save --no-package-lock playwright

- name: Validate the browser can import TypeScript
run: gulp test-browser-integration

54 changes: 54 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "Code scanning - action"

on:
push:
pull_request:
schedule:
- cron: '0 19 * * 0'

jobs:
CodeQL-Build:

# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
config-file: ./.github/codeql/codeql-configuration.yml
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 2 additions & 2 deletions .github/workflows/new-release-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
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
npm ci
gulp LKG
npm test
git diff
Expand All @@ -32,7 +32,7 @@ jobs:
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.email "typescriptbot@microsoft.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 }}
4 changes: 3 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Publish Nightly
on:
schedule:
- cron: '0 7 * * *'
# enable users to manually trigger with workflow_dispatch
workflow_dispatch: {}
repository_dispatch:
types: publish-nightly

Expand All @@ -20,7 +22,7 @@ jobs:
- name: Setup and publish nightly
run: |
npm whoami
npm i
npm ci
gulp configure-nightly
gulp LKG
gulp runtests-parallel
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-branch-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ jobs:
npm uninstall tslint --no-save
- name: npm install and test
run: |
npm install
npm update
npm ci
npm test
env:
CI: true
- name: Adding playwright
run: npm install --no-save --no-package-lock playwright
- name: Validate the browser can import TypeScript
run: gulp test-browser-integration
- name: LKG, clean, and pack
Expand All @@ -41,4 +42,3 @@ jobs:
with:
name: tgz
path: typescript.tgz

4 changes: 2 additions & 2 deletions .github/workflows/set-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
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
npm ci
gulp LKG
npm test
git diff
Expand All @@ -38,7 +38,7 @@ jobs:
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.email "typescriptbot@microsoft.com"
git config user.name "TypeScript Bot"
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
git push
14 changes: 10 additions & 4 deletions .github/workflows/sync-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Sync branch with master
on:
repository_dispatch:
types: sync-branch
workflow_dispatch:
inputs:
branch_name:
description: 'Target Branch Name'
required: true

jobs:
build:
Expand All @@ -15,15 +20,16 @@ jobs:
node-version: 12.x
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.branch_name }}
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
fetch-depth: 0
# 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.email "typescriptbot@microsoft.com"
git config user.name "TypeScript Bot"
git fetch origin master
git merge master --no-ff
npm install
git merge origin/master --no-ff
npm ci
npm test
git push
23 changes: 23 additions & 0 deletions .github/workflows/twoslash-repros.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Twoslash Code Sample Repros

on:
push:
branches:
- orta-twoslash-repros
schedule:
- cron: '0 8 * * *'
repository_dispatch:
types: run-twoslash-repros

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Use node
uses: actions/setup-node@v1
- run: |
npm init -y
npm install --save typescript@next
- uses: microsoft/TypeScript-Twoslash-Repro-Action@master
with:
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
Loading

0 comments on commit 3037443

Please sign in to comment.