Skip to main content

verify

Fails when a file fg-dist writes no longer says what is true, and names the command that puts it right.

pnpm dist verify

Each of these is written from something else, and goes stale when that moves without it — and nothing notices by looking: a stale version in a readme reads exactly like a current one.

ok     Readme.md
stale  pnpm-workspace.yaml  does not override every module to its checkout
                            Run `pnpm dist overrides`.
ok     turbo.json

What it checks

In a module, the readme: its version and release section, from its own package.json.

In a distribution:

FileWritten fromPut right with
The readmeits version, and each module's version and pinreadme
pnpm-workspace.yamlthe modules it shipsoverrides
turbo.jsonthe organization's policy, when it has onepolicy setup
—what it extends, when it extends onecheck says

Only what the distribution can fix. Its modules' readmes are checked in their own CI: at a pinned commit, one could only be changed by moving the pin.

In CI

workflows gives every module, and the distribution, .github/workflows/verify.yml, which runs this on each pull request. Make its Generated files job a required status check on main, or it only advises.

A distribution's readme says whether each pin is at a release, which takes the modules' tags, so its workflow checks them out with their history. That is also why it can go stale from outside: a module tagging the very commit the distribution pins turns "unreleased, after v1.2.0" into "v1.3.0". The commands that move a pin — bump, fork, contribute, unfork, inherit, add-module, extract — rewrite the distribution's readme as they go, so this is the rare case, and pnpm dist readme is the fix.

Exit codes

0everything is current
1something is stale, or could not be read