Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/scripts/clean-release-changelog.mts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function splitReleaseSectionIntoChunks(
const entries: CategorizedEntry[] = [];
let category: string | undefined;
let currentEntry: string[] = [];
const endEntry = () => {
const endEntry = (): void => {
if (category && currentEntry.length > 0) {
entries.push({ category, text: currentEntry.join('\n').trimEnd() });
}
Expand All @@ -179,7 +179,7 @@ export function splitReleaseSectionIntoChunks(
let chunkEntries = new Map<string, string[]>();
let chunkEntryCount = 0;
let chunkPrNumbers: string[] = [];
const addChunk = () => {
const addChunk = (): void => {
if (chunkEntryCount === 0) {
return;
}
Expand Down Expand Up @@ -291,7 +291,7 @@ function getCategorizedBlocks(
const blocks = new Map<string, string[]>();
let category: string | undefined;
let categoryEntries: string[] = [];
const addCategory = () => {
const addCategory = (): void => {
if (!category) {
return;
}
Expand Down Expand Up @@ -382,7 +382,7 @@ export function validateReplacement(
const categoryNames = new Set<string>();
let category: string | undefined;
let categoryEntryCount = 0;
const endCategory = () => {
const endCategory = (): void => {
if (category && categoryEntryCount === 0) {
throw new Error(`Category ${category} must not be empty`);
}
Expand Down Expand Up @@ -525,7 +525,7 @@ export async function requestGhApiWithRetry(
request: GhApiRequest = executeGhApi,
sleep?: (milliseconds: number) => Promise<void>,
): Promise<string> {
return await retry(async () => request(argumentsList), {
return await retry(async () => await request(argumentsList), {
delayMilliseconds: GH_API_RETRY_DELAY_MS,
maxAttempts: GH_API_MAX_ATTEMPTS,
onRetry: ({ attempt, delayMilliseconds }) => {
Expand Down Expand Up @@ -763,7 +763,7 @@ export async function requestCleanRoomRewrite({
],
};

return retry(
return await retry(
async () => {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), timeoutMs);
Expand Down Expand Up @@ -839,7 +839,7 @@ export async function requestValidatedRewrite(
prNumbers: readonly string[],
maxAttempts = MAX_VALIDATION_ATTEMPTS,
): Promise<string> {
return retry(
return await retry(
async () => {
const section = await requestCleanRoomRewrite(options);
try {
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/update-release-changelog-baseline.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
} from './release-section.mts';
import {
compareSemver,
type ReleaseBranch,
selectHighestLowerVersion,
} from './release-version-utils.mts';
import type { ReleaseBranch } from './release-version-utils.mts';

const RELEASE_LINK_REFERENCE = /^\[(\d+\.\d+\.\d+)\]: /u;

Expand Down
15 changes: 8 additions & 7 deletions .github/scripts/update-release-changelog.mts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ import {
restoreGeneratedCategories,
splitLines,
} from './release-section.mts';
import type { ReleaseBranch } from './release-version-utils.mts';
import { compareSemver, parseReleaseBranch } from './release-version-utils.mts';
import { getEnvironmentWithoutAiKey } from './shared/environment.mts';
import { writeReport } from './shared/report.mts';
import {
removeNewerReleases,
selectChangelogBaseline,
type ChangelogBaseline,
} from './update-release-changelog-baseline.mts';
import type { ChangelogBaseline } from './update-release-changelog-baseline.mts';

type ProofreadingStatus = 'succeeded' | 'failed' | 'no-new-prs' | 'unchanged';

Expand Down Expand Up @@ -373,7 +374,7 @@ function getStableVersions(): string[] {
*
* @returns The parsed release branches.
*/
function getReleaseBranches() {
function getReleaseBranches(): ReleaseBranch[] {
// strip=3 drops `refs/remotes/origin/`, leaving `release/X.Y.Z`.
return capture('git', [
'for-each-ref',
Expand Down Expand Up @@ -2066,12 +2067,12 @@ function main(): void {
);
}

const readChangelog = () => readFileSync('CHANGELOG.md', 'utf8');
const writeChangelog = (content: string) =>
const readChangelog = (): string => readFileSync('CHANGELOG.md', 'utf8');
const writeChangelog = (content: string): void =>
writeFileSync('CHANGELOG.md', content);
const readCurrentReleaseSection = () =>
const readCurrentReleaseSection = (): string =>
extractReleaseSection(readChangelog(), version).section;
const writeCurrentReleaseSection = (section: string) =>
const writeCurrentReleaseSection = (section: string): void =>
writeChangelog(replaceReleaseSection(readChangelog(), version, section));

const authorEmail =
Expand Down Expand Up @@ -2344,7 +2345,7 @@ function main(): void {
}
runChangelogValidation(proofreading, version);

const assertSourcesUnchanged = () => {
const assertSourcesUnchanged = (): void => {
try {
assertRemoteRefUnchanged({
ref: `origin/${releaseBranch}`,
Expand Down
17 changes: 0 additions & 17 deletions oxlint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@
},
"node/no-sync": {
"count": 4
},
"typescript/explicit-function-return-type": {
"count": 4
},
"typescript/return-await": {
"count": 3
}
},
".github/scripts/create-flaky-test-report.mjs": {
Expand Down Expand Up @@ -278,23 +272,12 @@
"count": 3
}
},
".github/scripts/update-release-changelog-baseline.mts": {
"import/consistent-type-specifier-style": {
"count": 1
}
},
".github/scripts/update-release-changelog.mts": {
"import/consistent-type-specifier-style": {
"count": 1
},
"node/no-process-env": {
"count": 12
},
"node/no-sync": {
"count": 17
},
"typescript/explicit-function-return-type": {
"count": 6
}
},
".github/scripts/update-release-sheet.mjs": {
Expand Down
Loading