Skip to content

chore: build before test in the pre-commit hook - #326

Merged
kurkle merged 1 commit into
mainfrom
chore/pre-commit-hook-order
Nov 19, 2026
Merged

kurkle merged 1 commit into
mainfrom
chore/pre-commit-hook-order

Conversation

@kurkle

@kurkle kurkle commented Nov 19, 2026

Copy link
Copy Markdown
Owner

The previous pre-commit hook template ran lint, test, typecheck, build, docs. The tests load the built package from dist, so the hook was testing the previous build rather than the one being committed.

@kurkle/configs 1.8.2 ships a corrected template that follows the CI order: lint, typecheck, build, test, docs.

  • Lockfile moves @kurkle/configs from 1.8.1 to 1.8.2 (only that entry; package.json is unchanged, its ^1.5.1 range already allows it).
  • .githooks/pre-commit regenerated with kurkle-install-hooks --force. commit-msg is unchanged.

Verified from a clean state: with dist removed, sh .githooks/pre-commit exits 0 (typecheck does not depend on a prior build; build then test passes, 96 + 5 tests and 19 package checks).

No published code changes.

🤖 Generated with Claude Code

The previous hook template ran lint, test, typecheck, build, docs. The
tests load the built package from dist, so the hook was testing the
previous build rather than the one about to be committed.

@kurkle/configs 1.8.2 ships a corrected template that follows the CI
order: lint, typecheck, build, test, docs. Move the lockfile from 1.8.1
to 1.8.2 (the package.json range ^1.5.1 already allows it) and
regenerate the hook with kurkle-install-hooks --force. commit-msg is
unchanged.

Verified from a clean state: with dist removed, the new hook exits 0
(typecheck does not depend on a prior build; build then test passes).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying chartjs-plugin-gradient with  Cloudflare Pages  Cloudflare Pages

Latest commit: b8985f3
Status: ✅  Deploy successful!
Preview URL: https://5c263114.chartjs-plugin-gradient.pages.dev
Branch Preview URL: https://chore-pre-commit-hook-order.chartjs-plugin-gradient.pages.dev

View logs

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 12.7 kB

ℹ️ View Unchanged
Filename Size
dist/chartjs-plugin-gradient.cjs 3.63 kB
dist/chartjs-plugin-gradient.esm.js 3.47 kB
dist/chartjs-plugin-gradient.js 3.63 kB
dist/chartjs-plugin-gradient.min.js 2.02 kB

compressed-size-action

@kurkle
kurkle merged commit 4b89159 into main Nov 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant