refactor: extract shared VCS infrastructure - #1005
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR extracts provider-neutral VCS infrastructure into a new private
Confidence Score: 4/5The PR appears safe to merge after correcting the non-blocking Node compatibility claim in the private VCS package. The extraction and provider rewiring are internally consistent, but the new package advertises Node support despite exporting Bun-dependent runtime implementations and only testing type resolution. Files Needing Attention: packages/hunk-vcs/package.json, packages/hunk-vcs/src/async-process.ts, packages/hunk-vcs/src/source.ts Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
ExtensionAPI["hunkdiff/extension contract"]
VCS["@hunk/vcs helper leaves"]
Git["Bundled Git provider"]
JJ["Bundled Jujutsu provider"]
Sapling["Bundled Sapling provider"]
Compat["packages/hunk/src/lib compatibility exports"]
Core["Hunk core callers"]
Git --> ExtensionAPI
JJ --> ExtensionAPI
Sapling --> ExtensionAPI
Git --> VCS
JJ --> VCS
Sapling --> VCS
Compat --> VCS
Core --> Compat
Prompt To Fix All With AI### Issue 1
packages/hunk-vcs/package.json:36
**Node Support Is Misstated**
This package declares support for Node 22+, but its exported runtime modules use Bun-only APIs such as `Bun.spawn` and `Bun.file`, and the exports point directly to TypeScript source. A Node consumer can therefore meet the stated engine requirement but fail when loading or invoking these helpers. Please remove the Node engine claim or provide and test a Node-compatible implementation.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "refactor: extract shared VCS infrastruct..." | Re-trigger Greptile |
| }, | ||
| "engines": { | ||
| "bun": ">=1.3.14", | ||
| "node": ">=22" |
There was a problem hiding this comment.
This package declares support for Node 22+, but its exported runtime modules use Bun-only APIs such as Bun.spawn and Bun.file, and the exports point directly to TypeScript source. A Node consumer can therefore meet the stated engine requirement but fail when loading or invoking these helpers. Please remove the Node engine claim or provide and test a Node-compatible implementation.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk-vcs/package.json
Line: 36
Comment:
**Node Support Is Misstated**
This package declares support for Node 22+, but its exported runtime modules use Bun-only APIs such as `Bun.spawn` and `Bun.file`, and the exports point directly to TypeScript source. A Node consumer can therefore meet the stated engine requirement but fail when loading or invoking these helpers. Please remove the Node engine claim or provide and test a Node-compatible implementation.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
@hunk/vcsworkspace underpackages/hunk-vcshunkdiff/extensioncontractValidation
This is PR 1 of 4 in Phase 2. It intentionally does not extract a provider or change activation behavior.
This PR description was generated by Pi using GPT-5.6 Sol