Skip to content

refactor: replace simple-git with tinyexec#950

Merged
antfu merged 2 commits intomainfrom
antfu/replace-simple-git
Mar 17, 2026
Merged

refactor: replace simple-git with tinyexec#950
antfu merged 2 commits intomainfrom
antfu/replace-simple-git

Conversation

@antfu
Copy link
Member

@antfu antfu commented Mar 17, 2026

Replace the simple-git dependency with inline git commands via tinyexec. This removes an unnecessary dependency and aligns with the project's existing tinyexec usage across devtools and devtools-kit.

The three git operations (branch, rev-parse, status) are now inlined in generateAnalyzeBuildName() using tinyexec's subprocess API, with proper error handling and stdout parsing.

Changes:

  • Inline git commands via tinyexec in packages/devtools/src/server-rpc/analyze-build.ts
  • Remove simple-git from dependencies and pnpm catalog
  • Reduces dependency count and bundle size

🤖 Generated with Claude Code

Replace the simple-git dependency with inline git commands via tinyexec to reduce dependencies and align with the project's existing tinyexec usage after the execa migration.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 17, 2026

Deploying nuxt-devtools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5680ae4
Status:🚫  Build failed.

View logs

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d84bbb27-29c6-4411-a609-8897b34ba845

📥 Commits

Reviewing files that changed from the base of the PR and between 56b8c97 and 5680ae4.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • packages/devtools/package.json
  • packages/devtools/src/server-rpc/analyze-build.ts
  • pnpm-workspace.yaml

📝 Walkthrough

Walkthrough

The pull request removes the simple-git dependency from the project and replaces its usage with a new internal git() helper function that executes Git commands via tinyexec. Three files are modified: the dependency is removed from packages/devtools/package.json and pnpm-workspace.yaml, and packages/devtools/src/server-rpc/analyze-build.ts is updated to use the new git wrapper instead of the simple-git API. The logic for generating build names based on branch name, commit SHA, and repository state remains functionally equivalent.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch antfu/replace-simple-git
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@antfu antfu merged commit 52d8312 into main Mar 17, 2026
3 of 5 checks passed
@antfu antfu deleted the antfu/replace-simple-git branch March 17, 2026 04:50
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