Skip to content

Install cli post cloning in npm - #1438

Merged
Saga4 merged 1 commit into
mainfrom
install_with_clone
Feb 10, 2026
Merged

Saga4 merged 1 commit into
mainfrom
install_with_clone

Conversation

@Saga4

@Saga4 Saga4 commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@claude

claude Bot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Prek Checks

✅ All checks pass — ruff check and ruff format both passed with no issues.

Mypy

⚠️ 60 no-untyped-def errors in tests/test_languages/test_treesitter_utils.py — all are missing return type annotations on test methods. This is a pre-existing pattern across the entire file (same style on main branch), not introduced by this PR. No action needed.

Code Review

No critical issues found. Summary of changes:

packages/codeflash/scripts/postinstall.js — Changes install strategy to prefer GitHub clone over PyPI:

  • Adds hasGit() helper to check for git availability
  • Modifies installCodeflash() to first try git+https://github.com/codeflash-ai/codeflash.git, falling back to PyPI
  • Removes old local-source fallback (tried to install from local pyproject.toml)
  • The hardcoded GitHub URL avoids injection risks. Shell quoting for uvBin is consistent with existing patterns.

tests/test_languages/test_treesitter_utils.py — Adds 10 new tests for export const arrow function patterns in TypeScript:

  • All 10 new tests pass ✅ (53/53 total)
  • Tests cover: basic export const, optional params, generics, export detection, default exports, multiple exports, implicit return, async, and non-exported const patterns
  • All tested API methods (is_function_exported, find_functions, has_return_statement) verified to exist on TreeSitterAnalyzer

Test Coverage

File Status Notes
packages/codeflash/scripts/postinstall.js N/A JavaScript file — not covered by Python test suite
tests/test_languages/test_treesitter_utils.py ✅ Test file 10 new tests added, all passing

No production Python files were modified in this PR, so there is no Python coverage delta to measure. The new tests exercise codeflash/languages/treesitter_utils.py (TreeSitterAnalyzer, FunctionNode, ImportInfo) which improves coverage of that module.


Last updated: 2026-02-10

@Saga4
Saga4 merged commit 1ad9c6a into main Feb 10, 2026
24 of 26 checks passed
@Saga4
Saga4 deleted the install_with_clone branch February 10, 2026 19:56
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