Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(scripts): one command checks what the branch changed #22767

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/22767/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 6 changed files with 40 additions and 2 deletions (loading 3).

x
0 of 6 viewed, 6 left
5 additions and 1 deletion.github/scripts/ci-changes.cjsModified
View file
@@ -5,6 +5,8 @@
// node ci-changes.cjs --paths <file> --full run every Linux job, gate only the macOS lint
// node ci-changes.cjs changed paths unknown: run everything
//
+// scripts/check-changed.ts requires the same decisions so local runs match CI.
+//
// Every changed path maps to workspace packages, which then pull in their
// dependents from package.json. A path this file does not recognize runs
// everything, so a new root file or directory can only cost minutes.
@@ -201,4 +203,6 @@
for (const [key, value] of Object.entries(outputs)) console.log(`${key}=${value}`);
​
-main();
+module.exports = { readWorkspace, decide };
+​
+if (require.main === module) main();
27 additions and 0 deletions.github/scripts/ci-changes.d.ctsAdded
View file
@@ -0,0 +1,27 @@
+interface WorkspacePackage {
+ readonly name: string;
+ readonly dir: string;
+ readonly hasTest: boolean;
+ readonly deps: ReadonlyArray<string>;
+}
+​
+export function readWorkspace(): Array<WorkspacePackage>;
+​