Skip to content

Add Claude Code hook to auto-package dist/ on source edits#171

Merged
noahd1 merged 1 commit into
mainfrom
nd/pre-commit-hook
Mar 10, 2026
Merged

Add Claude Code hook to auto-package dist/ on source edits#171
noahd1 merged 1 commit into
mainfrom
nd/pre-commit-hook

Conversation

@noahd1
Copy link
Copy Markdown
Member

@noahd1 noahd1 commented Mar 10, 2026

Summary

  • Adds a Claude Code PostToolUse hook that automatically runs npm run package in the appropriate workspace (coverage, fmt, or install) whenever source files are edited
  • Changes to packages/shared/ trigger repackaging of all three workspaces since they all depend on it
  • Hook is committed to .claude/settings.json so all contributors get it automatically

Test plan

  • Verified hook triggers on editing coverage/src/index.ts — ran npm run package in coverage workspace
  • Verified hook triggers on reverting the edit — ran package again
  • Verify hook triggers correctly for fmt/ and install/ workspace edits
  • Verify packages/shared/ edits trigger all three workspaces

🤖 Generated with Claude Code

Adds a PostToolUse hook that automatically runs `npm run package` in the
appropriate workspace whenever Claude edits source files, keeping the
committed dist/ bundles in sync with source code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@qltysh
Copy link
Copy Markdown
Contributor

qltysh Bot commented Mar 10, 2026

Qlty

Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@noahd1 noahd1 merged commit 7d2645a into main Mar 10, 2026
9 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