feat/ts rewrite#5
Merged
Merged
Conversation
Owner
raghavpillai
commented
Nov 19, 2025
- Migrate gen-commit from Python to TypeScript
- Migrate project from Python to TypeScript/Bun
- Simplify diff handling and improve LLM wrapper options
- CI, package rename, publish config, README updates
- Update CI to install namespaced package tarball
- Remove Python CLI and helpers (gencommit.py, utils/config.py, utils/llm_wrapper.py) - Add Node/TypeScript CLI (src/cli.ts) implementing arg parsing, init, version, and commit flow - Introduce TypeScript utils: config.ts (zod validation), llm-wrapper.ts (ai SDK adapters), prompts.ts - Implement diff formatting, token estimation/truncation, retrying LLM calls, and safer git commit via spawnSync - Add config initialization template and improved config error handling (ConfigError) - Convert prompt templates to TS and wire LLM chat to generate structured commit messages - Remove Python package entry import (src/__init__.py) to reflect migration
- Replace Python project configuration (pyproject, requirements, uv.lock) with Node/Bun setup (package.json, bun.lock) - Introduce TypeScript build config (tsconfig.json) and Biome linter settings (biome.json) - Add .npmignore and overhaul .gitignore for JS/TS, Bun, IDE, and OS files - Add Bun lockfile and dependencies; remove many Python-specific files and scripts - Convert and update src code: TypeScript CLI tweaks (token/truncation, debug timing, config defaults, git commit execution commented) - Update LLM wrapper to new SDK factory APIs, set abort timeout and reasoningEffort - Remove legacy Python tests and utility scripts; clean up build/upload shell scripts
- Remove custom diff formatting and return raw git diff text - Support unstaged full-diff via '-a' flag (use git diff HEAD) - Remove MAX_LINE_LENGTH config/env usage and related parsing - Re-enable git commit execution error handling (spawnSync check) - Add provider-specific reasoningEffort options for OpenAI/Anthropic/Google in LLM wrapper - Update prompts and config schema to reflect removed MAX_LINE_LENGTH setting
- Add GitHub Actions CI workflow with test, security, and publish-test jobs - Remove .npmignore to include files via package.json files field - Rename package to @raghavp/gen-commit and bump version to 2.0.2 - Add publishConfig public access and adjust files list - Update README installation instructions and model examples - Remove Python install instructions and related config notes
- change npm global install pattern in CI from gen-commit-*.tgz to raghavp-gen-commit-*.tgz - ensure CI tests install and run the correct packaged CLI tarball
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.