Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	tests/baselines/reference/arrayDestructuringInSwitch1.types
#	tests/baselines/reference/arraySlice.types
#	tests/baselines/reference/bestChoiceType.types
#	tests/baselines/reference/bivariantInferences.types
#	tests/baselines/reference/callsOnComplexSignatures.types
#	tests/baselines/reference/contextualOverloadListFromArrayUnion.types
#	tests/baselines/reference/controlFlowArrayErrors.types
#	tests/baselines/reference/sliceResultCast.types
#	tests/baselines/reference/typeParameterExtendingUnion1.types
#	tests/baselines/reference/typeParameterExtendingUnion2.types
#	tests/baselines/reference/typeParameterLeak.types
#	tests/baselines/reference/unionOfArraysFilterCall.types
#	tests/baselines/reference/unionOfClassCalls.types
  • Loading branch information
RyanCavanaugh committed Mar 29, 2024
2 parents 126f1bc + 278b4f9 commit 8291654
Show file tree
Hide file tree
Showing 12,635 changed files with 606,237 additions and 7,949 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"trailingCommas": "never"
},
"excludes": [
"**/.git",
"**/node_modules",
"**/*-lock.json",
"coverage/**",
Expand Down
48 changes: 44 additions & 4 deletions .github/workflows/create-cherry-pick-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,35 @@ jobs:
await exec.exec("git", ["config", "user.name", "TypeScript Bot"]);
await exec.exec("git", ["switch", "--detach", `origin/${TARGET_BRANCH}`]);
await exec.exec("git", ["switch", "-c", pickBranch]);
await exec.exec("git", ["cherry-pick", "-m", "1", pr.data.merge_commit_sha]);
let updatedBaselinesMessage = "";
try {
await exec.exec("git", ["cherry-pick", "-m", "1", pr.data.merge_commit_sha]);
} catch (e) {
console.log(e);
// The cherry-pick failed. If all of the conflicts are in tests/baselines,
// try to run the tests and accept the new baselines.
await exec.exec("git", ["add", "tests/baselines"]);
// This will fail if any other files were modified.
await exec.exec("git", ["-c", "core.editor=true", "cherry-pick", "--continue"]);
await exec.exec("npm", ["ci"]);
try {
await exec.exec("npm", ["test", "--", "--no-lint"]);
} catch {
// Expected to fail.
}
await exec.exec("npx", ["hereby", "baseline-accept"]);
await exec.exec("git", ["add", "tests/baselines"]);
await exec.exec("git", ["commit", "-m", "Update baselines"]);
updatedBaselinesMessage = " This involved updating baselines; please check the diff.";
}
await exec.exec("git", ["push", "--force", "--set-upstream", "origin", pickBranch]);
const existingPulls = await github.rest.pulls.list({
Expand All @@ -106,7 +134,7 @@ jobs:
if (existingPulls.data.length === 0) {
console.log(`No existing PRs found for ${pickBranch}`);
const body = `This cherry-pick was triggered by a request on #${PR}.\n\nPlease review the diff and merge if no changes are unexpected.`;
const body = `This cherry-pick was triggered by a request on #${PR}.\n\nPlease review the diff and merge if no changes are unexpected.${updatedBaselinesMessage}`;
const newPr = await github.rest.pulls.create({
owner: context.repo.owner,
Expand All @@ -115,11 +143,23 @@ jobs:
head: pickBranch,
title,
body,
});
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: newPr.data.number,
assignees: ["DanielRosenwasser"],
});
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: newPr.data.number,
reviewers: ["DanielRosenwasser", REQUESTING_USER],
});
commentBody = `I've created #${newPr.data.number} for you.`;
commentBody = `I've created #${newPr.data.number} for you.${updatedBaselinesMessage}`;
}
else {
const existing = existingPulls.data[0];
Expand All @@ -132,7 +172,7 @@ jobs:
title,
});
commentBody = `I've updated #${existing.number} for you.`;
commentBody = `I've updated #${existing.number} for you.${updatedBaselinesMessage}`;
}
return commentBody;
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/insiders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,27 @@ defaults:
shell: bash

jobs:
build:
test:
runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- run: |
npm --version
# corepack enable npm
npm install -g $(jq -r '.packageManager' < package.json)
npm --version
- name: Test insiders
run: |
npm ci
npx hereby configure-insiders
npm test
publish:
needs: test

runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'

Expand All @@ -36,8 +56,6 @@ jobs:
npm ci
npx hereby configure-insiders
npx hereby LKG
npx hereby runtests-parallel
npx hereby clean
npm publish --tag insiders
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
23 changes: 20 additions & 3 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,26 @@ defaults:
shell: bash

jobs:
build:
test:
runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- run: |
npm --version
# corepack enable npm
npm install -g $(jq -r '.packageManager' < package.json)
npm --version
- name: Setup and publish nightly
run: |
npm ci
npx hereby configure-nightly
npm test
publish:
needs: [test]
runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'

Expand All @@ -37,8 +56,6 @@ jobs:
npm ci
npx hereby configure-nightly
npx hereby LKG
npx hereby runtests-parallel
npx hereby clean
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tests/baselines/rwc/*
tests/baselines/reference/projectOutput/*
tests/baselines/local/projectOutput/*
tests/baselines/reference/testresults.tap
tests/baselines/symlinks/*
tests/services/baselines/prototyping/local/*
tests/services/browser/typescriptServices.js
src/harness/*.js
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![GitHub Actions CI](https://github.com/microsoft/TypeScript/workflows/CI/badge.svg)](https://github.com/microsoft/TypeScript/actions?query=workflow%3ACI)
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)


[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
Expand Down
26 changes: 24 additions & 2 deletions azure-pipelines.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ extends:
- stage: buildStage
displayName: Build Stage
jobs:
- job: build
displayName: Build
- job: test
displayName: Test
steps:
- checkout: self
clean: true
Expand All @@ -52,6 +52,28 @@ extends:
- script: 'npm test'
displayName: 'npm test'

- job: build
displayName: Build
dependsOn: test
steps:
- checkout: self
clean: true
fetchDepth: 1
fetchTags: false

- task: NodeTool@0
inputs:
versionSpec: 20.x
displayName: 'Install Node'

- script: |
npm install -g `node -e 'console.log(JSON.parse(fs.readFileSync("package.json", "utf8")).packageManager)'`
npm --version
displayName: 'Install packageManager from package.json'
- script: npm ci
displayName: 'npm ci'

- script: |
npx hereby LKG
npx hereby clean
Expand Down

0 comments on commit 8291654

Please sign in to comment.