Skip to content

Commit 88a7ded

Browse files
committed
Merge branch 'main' into debug-module
2 parents 99969b2 + 3c63740 commit 88a7ded

File tree

464 files changed

+3512
-1604
lines changed

Some content is hidden

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

464 files changed

+3512
-1604
lines changed

.github/workflow-resources/.lsifrc.json

-6
This file was deleted.

.github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,14 @@ jobs:
5757
- run: npm ci
5858

5959
- name: Tests
60+
id: test
6061
# run tests, but lint separately
6162
run: npm run test -- --no-lint --bundle=${{ matrix.bundle }}
6263

64+
- name: Print baseline diff on failure
65+
if: ${{ failure() && steps.test.conclusion == 'failure' }}
66+
run: git diff --diff-filter=AM --no-index -- ./tests/baselines/reference ./tests/baselines/local
67+
6368
lint:
6469
runs-on: ubuntu-latest
6570

.github/workflows/create-cherry-pick-pr.yml

+44-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,35 @@ jobs:
9292
await exec.exec("git", ["config", "user.name", "TypeScript Bot"]);
9393
await exec.exec("git", ["switch", "--detach", `origin/${TARGET_BRANCH}`]);
9494
await exec.exec("git", ["switch", "-c", pickBranch]);
95-
await exec.exec("git", ["cherry-pick", "-m", "1", pr.data.merge_commit_sha]);
95+
96+
let updatedBaselinesMessage = "";
97+
try {
98+
await exec.exec("git", ["cherry-pick", "-m", "1", pr.data.merge_commit_sha]);
99+
} catch (e) {
100+
console.log(e);
101+
102+
// The cherry-pick failed. If all of the conflicts are in tests/baselines,
103+
// try to run the tests and accept the new baselines.
104+
105+
await exec.exec("git", ["add", "tests/baselines"]);
106+
// This will fail if any other files were modified.
107+
await exec.exec("git", ["-c", "core.editor=true", "cherry-pick", "--continue"]);
108+
109+
await exec.exec("npm", ["ci"]);
110+
111+
try {
112+
await exec.exec("npm", ["test", "--", "--no-lint"]);
113+
} catch {
114+
// Expected to fail.
115+
}
116+
117+
await exec.exec("npx", ["hereby", "baseline-accept"]);
118+
await exec.exec("git", ["add", "tests/baselines"]);
119+
await exec.exec("git", ["commit", "-m", "Update baselines"]);
120+
121+
updatedBaselinesMessage = " This involved updating baselines; please check the diff.";
122+
}
123+
96124
await exec.exec("git", ["push", "--force", "--set-upstream", "origin", pickBranch]);
97125
98126
const existingPulls = await github.rest.pulls.list({
@@ -106,7 +134,7 @@ jobs:
106134
if (existingPulls.data.length === 0) {
107135
console.log(`No existing PRs found for ${pickBranch}`);
108136
109-
const body = `This cherry-pick was triggered by a request on #${PR}.\n\nPlease review the diff and merge if no changes are unexpected.`;
137+
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}`;
110138
111139
const newPr = await github.rest.pulls.create({
112140
owner: context.repo.owner,
@@ -115,11 +143,23 @@ jobs:
115143
head: pickBranch,
116144
title,
117145
body,
146+
});
147+
148+
await github.rest.issues.addAssignees({
149+
owner: context.repo.owner,
150+
repo: context.repo.repo,
151+
issue_number: newPr.data.number,
118152
assignees: ["DanielRosenwasser"],
153+
});
154+
155+
await github.rest.pulls.requestReviewers({
156+
owner: context.repo.owner,
157+
repo: context.repo.repo,
158+
pull_number: newPr.data.number,
119159
reviewers: ["DanielRosenwasser", REQUESTING_USER],
120160
});
121161
122-
commentBody = `I've created #${newPr.data.number} for you.`;
162+
commentBody = `I've created #${newPr.data.number} for you.${updatedBaselinesMessage}`;
123163
}
124164
else {
125165
const existing = existingPulls.data[0];
@@ -132,7 +172,7 @@ jobs:
132172
title,
133173
});
134174
135-
commentBody = `I've updated #${existing.number} for you.`;
175+
commentBody = `I've updated #${existing.number} for you.${updatedBaselinesMessage}`;
136176
}
137177
138178
return commentBody;

.github/workflows/rich-navigation.yml

-40
This file was deleted.

0 commit comments

Comments
 (0)