Skip to content

Commit

Permalink
Merge branch 'master' into fix36031
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/compiler/debug.ts
  • Loading branch information
rbuckton committed Feb 28, 2020
2 parents d187ca7 + 634d514 commit 4214548
Show file tree
Hide file tree
Showing 1,534 changed files with 96,666 additions and 28,512 deletions.
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
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 "[email protected]"
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 "[email protected]"
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 "[email protected]"
git config user.name "TypeScript Bot"
git fetch origin master
git merge master --no-ff
npm install
npm test
git push
Loading

0 comments on commit 4214548

Please sign in to comment.