Skip to content

Fix isomorphic-git internals imports#3667

Draft
adamziel wants to merge 2 commits into
trunkfrom
fix/isomorphic-git-internals-types
Draft

Fix isomorphic-git internals imports#3667
adamziel wants to merge 2 commits into
trunkfrom
fix/isomorphic-git-internals-types

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

@adamziel adamziel commented May 22, 2026

What it does

Replaces the storage sparse checkout implementation with public isomorphic-git APIs for ref discovery, pack indexing, and object reads. Removes the private isomorphic-git/src/* imports, deletes the declaration shim, and avoids vendoring isomorphic-git internals.

Rationale

The previous approach depended on private isomorphic-git internals and copied a large internal implementation into the storage package. Using the supported public APIs keeps this code lower-maintenance while preserving the sparse checkout behavior needed by Playground.

Implementation

  • Uses listServerRefs, init, indexPack, and readObject from isomorphic-git.
  • Keeps small local pkt-line/upload-pack helpers for the partial clone object requests.
  • Keeps a small direct .git/index writer in git-create-dotgit-directory.ts so it no longer imports private GitIndex.
  • Preserves withObjects: true output for .git consumers: packfiles, objects, and fileOids.
  • Preserves GitAuthenticationError mapping for 401 and 403 responses.

Testing

Ran:

npm exec nx test playground-storage
npm exec nx lint playground-storage
npm exec nx build playground-storage

@adamziel adamziel force-pushed the fix/isomorphic-git-internals-types branch from 29f356d to a963088 Compare May 22, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant