Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(scripts): check:changed finishes in about 10 s #23581

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

Showing 4 changed files with 159 additions and 25 deletions (loading 2).

x
0 of 4 viewed, 4 left
5 additions and 0 deletionsdocs/operations/development.mdModified
View file
@@ -160,6 +160,11 @@
compares against the merge base with `origin/main`, or with a ref you pass. CI still runs the full
test suites and the jobs the summary lists, so a local pass does not promise a green CI run.
​
+The steps run side by side, so a run takes about as long as its slowest step, usually knip's
+exports pass at about 10 s. When the files are exactly those of the last passing run, it prints that
+run's summary instead of running again. Any change to a file, the install, or a generated file runs
+the checks again.
+​
While you iterate, run single checks:
​
```sh
154 additions and 25 deletionsscripts/check-changed.tsModified
View file
@@ -10,7 +10,10 @@
//
// Uncommitted and untracked files count. Affected packages come from
// .github/scripts/ci-changes.cjs, the same mapping CI uses to gate its jobs.
+// The steps run side by side; each prints its output when it finishes. A
+// rerun on exactly the files of the last passing run prints that run's summary.
import * as NodeChildProcess from "node:child_process";
+import * as NodeCrypto from "node:crypto";
import * as NodeFS from "node:fs";
import * as NodeOS from "node:os";
import * as NodePath from "node:path";
@@ -19,8 +22,13 @@
const root = NodePath.resolve(import.meta.dirname, "..");