Skip to content

Execute TypeScript hooks directly with ts-node#5

Merged
timoconnellaus merged 1 commit intomasterfrom
feature/cli-setup
Jul 9, 2025
Merged

Execute TypeScript hooks directly with ts-node#5
timoconnellaus merged 1 commit intomasterfrom
feature/cli-setup

Conversation

@timoconnellaus
Copy link
Owner

Summary

  • Removes TypeScript compilation step - hooks are now executed directly as TypeScript files
  • Adds ts-node as a dependency to enable direct TypeScript execution
  • Updates CLI to generate commands using npx ts-node instead of referencing compiled JavaScript files

Benefits

  • Simpler development experience - no need to compile before running hooks
  • No intermediate JavaScript files in .hooks/ directory
  • Faster iteration when developing hooks
  • Better debugging experience with TypeScript source maps

Test plan

  • Updated all existing tests to verify direct TypeScript execution
  • Added comprehensive test coverage for all hook types
  • Tested with both project and local hook files
  • Verified settings.json generation uses correct ts-node commands
  • Tested interactive init command works with ts-node

🤖 Generated with Claude Code

- Remove TypeScript compilation step
- Execute .ts hook files directly using ts-node
- Add ts-node as a dependency
- Update CLI to generate commands using npx ts-node
- Update settings.json generation to use TypeScript files
- Update CLAUDE.md documentation to reflect direct execution
- Add comprehensive test coverage for all hooks

This change simplifies the development experience by eliminating the compilation
step and allowing developers to work directly with TypeScript files.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@timoconnellaus timoconnellaus merged commit 9b507c9 into master Jul 9, 2025
1 check 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