Repository navigation
ref(lint): Run the repo check scripts from one runner - #3952
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a77d64d. Configure here.
|
440 screenshot changes — 0 changed · 440 added · 0 removed |
BYK
left a comment
There was a problem hiding this comment.
Ideally these would come from a common core and are run in parallel in workers so we don't repeat the same file walking logic etc.
| - scripts/release-artifacts*.mjs | ||
| - scripts/publish-github-release*.mjs |
There was a problem hiding this comment.
While we are here, let's clean up this list as I think most of these files no longer exist
There was a problem hiding this comment.
I checked the release filter on main: every entry still matches a tracked file. That includes scripts/release-artifacts.mjs and scripts/publish-github-release.mjs, which the two globs match. The only cleanup I see is turning those two globs into exact paths.
…3973) Follow-up to #3952. That PR still kept a hand-written CHECKS list in the runner, so each new check had to be added in two places. It also read files synchronously, so a check could not overlap its file I/O. **Check discovery.** `scripts/check.mjs` no longer keeps a CHECKS list. Every `scripts/check-<name>.mjs` is a check named `<name>`. With no name, the runner runs every check except the ones whose module exports `lint = false`, each with a comment that says where it runs instead: - `ast-grep-ignores`: `ast-grep:lint` runs it after the scan. - `dashboard-bundle-size`, `package-types`, `release-config`: CI runs them in their own jobs. Each worker now runs its check's `scripts/check-<name>.test.mjs` before the check, so the tests run in parallel too. A failing test shows under that check's `FAIL` line. The `package.json` `*:check` entries pass the file name. The `pnpm` script names stay the same, so nothing that calls them changes: `migration-metadata:check` runs `drizzle-migrations`, `dashboard-style:check` runs `dashboard-styles`, and `release:check` runs `release-config`. Only a direct `node scripts/check.mjs <name>` call has to use the file name now. **Async reads.** `readRepoFiles` reads with `fs.promises.readFile`, at most 64 files at a time, and keeps the order. File length now reads through it too. `mapBounded` moved to `scripts/lib/map-bounded.mjs`, so the runner and the reader share it. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Acdada5c589dc375265165b968649b09b --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Acdada5c589dc375265165b968649b09b) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Acdada5c589dc375265165b968649b09b/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>

Each root check script had its own
node --test … && node …chain inpackage.json, andpnpm lintlisted a dozen of them one by one. Every new check added more of the same wiring.scripts/check.mjsnow owns that wiring:node scripts/check.mjs <name>…runs each named check: first itsscripts/check-<file>.test.mjstests, then itsscripts/check-<file>.mjsscript. It stops at the first failure.pnpm lintneeds, with their tests in onenode --testrun.migration-locksstill runssquawkafter its script.scripts/check-*.mjsfile has no entry, so a new check gets wired here or not at all.Every
pnpm <name>:checkentry stays and calls the runner, so the check names inAGENTS.md, lint-staged, and CI still work.pnpm lintstarts withnode scripts/check.mjs, andast-grep:lintends withnode scripts/check.mjs ast-grep-ignores. The CI release paths include the runner, becauserelease:checknow goes through it.No check script or its logic changes. The
packages/juniorcheck scripts keep their ownpackage.jsonentries.Related: #3680, #3612.
via @BYK.
--
View Session [Sentry]