Conversation
|
🤖 Code Review · #projects-dev-ai for questions ✅ Complete - 5 findings 📋 History✅ 5 findings |
e4b6a6f to
20075f2
Compare
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
Coverage report
Test suite run success3822 tests passing in 1464 suites. Report generated by 🧪jest coverage report action from 9384aee |
dmerand
left a comment
There was a problem hiding this comment.
I'm aligned with this approach. AI pair review found some bugs worth double-checking.
Review assisted by pair-review
There was a problem hiding this comment.
(Ref Line 152) 🐛 Bug: The progressUpdater parameter is still declared in the GitCloneOptions interface but is no longer used in the implementation (removed at line 160). This is a silent breaking change - callers can pass this parameter expecting progress updates, but it will be ignored without any error or warning. While no code in the codebase currently uses this parameter, it's still part of the public API contract.
Suggestion: Either remove the parameter from the interface to accurately reflect the implementation, or add a deprecation notice:
| /** @deprecated Progress updates are no longer supported after removing simple-git dependency */ | |
| progressUpdater?: (statusString: string) => void |
Alternatively, implement progress tracking using execa's stdio events, or remove it entirely with a migration note.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Preserve exitCode in gitCommand when wrapping errors in AbortError - Use null byte delimiter in getLatestGitCommit to handle multiline bodies - Narrow error handling in checkIfIgnoredInGitRepository (exitCode === 1) - Narrow error handling in insideGitDirectory (exitCode === 128) - Narrow error handling in getLatestTag (exitCode === 128) - Remove unused progressUpdater from GitCloneOptions interface - Add error message matcher to latestTag test assertion Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0b402f3 to
9384aee
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/git.d.ts@@ -1,5 +1,13 @@
import { AbortError } from './error.js';
-import { DefaultLogFields, ListLogLine } from 'simple-git';
+export interface GitLogEntry {
+ hash: string;
+ date: string;
+ message: string;
+ refs: string;
+ body: string;
+ author_name: string;
+ author_email: string;
+}
/**
* Initialize a git repository at the given directory.
*
@@ -40,14 +48,12 @@ export declare function addToGitIgnore(root: string, entry: string): void;
*
* @param repoUrl - The URL of the repository to clone.
* @param destination - The directory where the repository will be cloned.
- * @param progressUpdater - A function that will be called with the progress of the clone.
* @param shallow - Whether to clone the repository shallowly.
* @param latestTag - Whether to clone the latest tag instead of the default branch.
*/
export interface GitCloneOptions {
repoUrl: string;
destination: string;
- progressUpdater?: (statusString: string) => void;
shallow?: boolean;
latestTag?: boolean;
}
@@ -64,7 +70,7 @@ export declare function downloadGitRepository(cloneOptions: GitCloneOptions): Pr
* @param directory - The directory of the git repository.
* @returns The latest commit of the repository.
*/
-export declare function getLatestGitCommit(directory?: string): Promise<DefaultLogFields & ListLogLine>;
+export declare function getLatestGitCommit(directory?: string): Promise<GitLogEntry>;
/**
* Add all files to the git index from the given directory.
*
|
dmerand
left a comment
There was a problem hiding this comment.
Thanks for the changes! Tophat LGTM.

WHY are these changes introduced?
This change removes the dependency on the
simple-gitlibrary and replaces it with directgitcommand execution usingexeca. This PR is part of an assertion I believe to be true: with the rise of agentic development and parallel rise of supply chain attacks, external dependencies have become less valuable and higher risk. We should be looking at our dependencies with a critical eye and removing ones that don't have a very clear value proposition.Testing