Catch outdated catalogs to the left of CI#221
Catch outdated catalogs to the left of CI#221thashepherd wants to merge 2 commits intostorybookjs:mainfrom
Conversation
|
✅ Deploy Preview for storybook-mcp-self-host-example canceled.
|
There was a problem hiding this comment.
Pull request overview
Adds local guardrails to catch “outdated Storybook catalog” drift before CI by introducing git hooks, a bump:catalog helper script, and updating the dependency-check E2E error message; also bumps the Storybook catalog versions to satisfy the new checks.
Changes:
- Add Husky-managed
pre-commit(lint-staged) andpre-push(taze fail-on-outdated) hooks. - Add
pnpm bump:catalogscript (taze-based) and adjust formatting scripts to support lint-staged file arguments. - Update internal Storybook dependency-check test messaging and bump Storybook-related catalog versions/lockfiles.
Reviewed changes
Copilot reviewed 5 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Bumps Storybook catalog entries to 10.4.0-alpha.10. |
| pnpm-lock.yaml | Adds Husky/lint-staged to root dev deps; lockfile updates. |
| packages/addon-mcp/pnpm-lock.yaml | Propagates Storybook catalog bump to package lockfile. |
| eval/pnpm-lock.yaml | Propagates Storybook catalog bump to eval lockfile. |
| apps/internal-storybook/pnpm-lock.yaml | Propagates Storybook catalog bump to internal Storybook lockfile. |
| package.json | Adds bump:catalog, Husky/lint-staged config, and adjusts format scripts. |
| apps/internal-storybook/tests/check-deps.e2e.test.ts | Updates failure instructions to pnpm bump:catalog. |
| .husky/pre-commit | Runs lint-staged on commit. |
| .husky/pre-push | Runs taze outdated check on push. |
Files not reviewed (4)
- apps/internal-storybook/pnpm-lock.yaml: Language not supported
- eval/pnpm-lock.yaml: Language not supported
- packages/addon-mcp/pnpm-lock.yaml: Language not supported
- pnpm-lock.yaml: Language not supported
* pre-commit runs lint-staged (oxfmt + oxlint on staged files) * pre-push runs taze --fail-on-outdated, catching Storybook catalog drift before CI does * `pnpm bump:catalog` refreshes the Storybook catalog from @next via taze; the include filter contains `pnpm` to dodge antfu-collective/taze#260 * check-deps.e2e.test.ts error message now points at the new script instead of a hand-rolled sed * format/format:check drop the `.` arg so lint-staged can pass staged file paths through cleanly Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4db0349 to
27b4286
Compare
Summary
Many of these failures are due to catalogs being out of date:
Easy to catch; I added a pre-push hook to catch outdated catalogs and a
bump:catalogscript that usestazeto automate the fix.I don't believe that this change requires a changeset. Claude's PR summary follows.
Details
pre-commitruns lint-staged (oxfmt + oxlint on staged files);pre-pushrunstaze --fail-on-outdatedagainst the Storybook catalog and blocks pushes when it''s stale.pnpm bump:catalog— wrapstazeto refresh@storybook/*+storybook+eslint-plugin-storybookto their@nextversions inpnpm-workspace.yaml, then runspnpm install.apps/internal-storybook/tests/check-deps.e2e.test.tsfailure message to suggestpnpm bump:cataloginstead of the old hand-rolledsedrecipe.10.4.0-alpha.8→10.4.0-alpha.10(separate commit) so the new pre-push hook is satisfied..arg fromformat/format:checkso lint-staged can pass staged file paths through cleanly.Why
apps/internal-storybook/tests/check-deps.e2e.test.tshas been red onmainfor several builds because the Storybook@nexttrain advances faster than someone manually edits the catalog. Until now there was no in-repo command for fixing it. This adds a fix command and an earlier feedback loop so devs see drift before CI does.Notes
Human again here. I found a small bug in
tazewhile setting this up and created an issue, antfu-collective/taze#260. It's the reason why we have to useinstead of
Test plan
check-deps.e2e.test.tspass).tsfile and runninggit committriggers pre-commit auto-format / lint