type-git 0.3.0-beta.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  Type-safe Git wrapper library with LFS support, progress tracking, and abort control for Node.js/Deno/Bun.
4
4
 
5
- (To be honest, I wrote the entire code with Claude Code. But it works appropriately.)
5
+ Typed inputs are checked against supported output contracts, with runtime validation for JavaScript callers.
6
+
7
+ **Upgrading:** [0.4.0 migration guide](docs/migrations/0.4.0.md).
6
8
 
7
9
  **[Documentation](https://ash-r1.github.io/type-git/)** | **[API Reference](https://ash-r1.github.io/type-git/api/readme/)**
8
10
 
@@ -19,7 +21,7 @@ Type-safe Git wrapper library with LFS support, progress tracking, and abort con
19
21
 
20
22
  ## Design Philosophy
21
23
 
22
- This library wraps Git CLI (and optionally libgit2) with a focus on:
24
+ This library wraps Git CLI with a focus on:
23
25
 
24
26
  1. **Output Contract Safety**: Typed APIs only expose operations where stdout format is guaranteed
25
27
  2. **Repository Context**: Separates `Git` (non-repo operations) from `Repo` (repo operations)
@@ -45,7 +47,7 @@ This library wraps Git CLI (and optionally libgit2) with a focus on:
45
47
  ## Installation
46
48
 
47
49
  ```bash
48
- npm install type-git@beta
50
+ npm install type-git
49
51
  ```
50
52
 
51
53
  ## Usage
@@ -112,11 +114,10 @@ const git = await TypeGit.create();
112
114
  // Clone a repository with progress tracking
113
115
  const repo = await git.clone('https://github.com/user/repo.git', '/path/to/clone', {
114
116
  onProgress: (progress) => {
115
- if (progress.kind === 'git') {
116
- console.log(`${progress.phase}: ${progress.message}`);
117
- } else if (progress.kind === 'lfs') {
118
- console.log(`LFS ${progress.direction}: ${progress.bytesSoFar}/${progress.bytesTotal}`);
119
- }
117
+ console.log(`${progress.phase}: ${progress.message}`);
118
+ },
119
+ onLfsProgress: (progress) => {
120
+ console.log(`LFS ${progress.direction}: ${progress.bytesSoFar}/${progress.bytesTotal}`);
120
121
  },
121
122
  });
122
123
 
@@ -192,24 +193,24 @@ src/
192
193
  │ ├── node/ # Node.js adapter
193
194
  │ ├── bun/ # Bun adapter
194
195
  │ └── deno/ # Deno adapter
195
- ├── cli/ # CLI command builders
196
- ├── lfs/ # LFS-specific logic
197
- ├── parsers/ # Output parsers
198
- └── utils/ # Utilities
196
+ ├── impl/ # Git and repository operations
197
+ ├── runner/ # Command execution, progress, and errors
198
+ ├── parsers/ # Machine-output parsers
199
+ └── internal/ # Shared clients, transport, config, and LFS helpers
199
200
  ```
200
201
 
201
202
  ## Development Status
202
203
 
203
- type-git 0.3.0 is in **beta** and ready for evaluation in real applications. The
204
- public API is taking shape, but compatibility is not yet guaranteed. Breaking
205
- changes during beta will be documented in the changelog; pin an exact version if
206
- your application needs controlled upgrades. Install with `npm install type-git@beta`.
204
+ 0.4.0 strengthens typed output contracts and rejects conflicting options before execution.
205
+ See the [migration guide](docs/migrations/0.4.0.md) for breaking changes and API boundaries.
206
+ The public API is still evolving; pin an exact version for controlled upgrades.
207
+ Some flags require newer Git versions; LFS JSON queries require a compatible Git LFS installation.
207
208
 
208
209
  ### Validation scope
209
210
 
210
211
  - **Node.js**: Unit and real-Git integration tests run in CI on Linux and Windows
211
212
  with Node.js 20, 22, and 24. A separate job checks legacy Git 2.25 compatibility.
212
- - **Bun and Deno**: Adapter and basic repository-operation smoke tests run on Linux.
213
+ - **Bun and Deno**: Adapter smoke tests and a shared repository contract suite run on Linux.
213
214
  Their test coverage is narrower than Node.js; cross-runtime behavior still needs
214
215
  more real-application feedback.
215
216
  - **Package distribution**: CI installs the npm tarball and checks ESM, CommonJS,