git-chopstick-core 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/package.json +3 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,130 @@
1
+ # Changelog
2
+
3
+ ## [0.1.6] — 2026-06-13
4
+
5
+ ### Fixed
6
+ - **CHANGELOG.md included in package**: Added `CHANGELOG.md` to the `files` array in `package.json` so consumers can read release notes from the installed package.
7
+
8
+ ---
9
+
10
+ ## [0.1.5] — 2026-06-13
11
+
12
+ ### Added
13
+ - **Progress reporting**: Real `parse()` methods on all progress parsers (Checkout, Fetch, Pull, Push, Clone). Progress callbacks now receive percentage updates during long-running operations.
14
+ - **`getCurrentBranch(path)`**: New helper in `rev-parse.ts` that returns the current branch name or `undefined` for detached HEAD.
15
+ - **Integration tests**: 10 tests covering repository type detection, branch lookup, status parsing, commit history, branch CRUD, createCommit, and non-repo error handling. Run with `npm test`.
16
+ - **Migration guide**: Added `docs/exec-to-git-migration.md` documenting the transition from `exec()` to `git()` with before/after examples.
17
+
18
+ ### Changed
19
+ - **`exec()` removed from public API**: `exec()` is now an internal function used only by `core.ts`. Use `git()` instead — it's a strict superset with error handling, typed error codes, `successExitCodes`, and hook support.
20
+ - **README**: Updated architecture diagram (progress 🟢), consumption patterns (no `exec`), known limitations (progress now real, tests now exist).
21
+
22
+ ### Fixed
23
+ - **RevertProgressParser**: Now returns proper `IGitOutput | null` type.
24
+
25
+ ---
26
+
27
+ ## [0.1.4] — 2026-06-13
28
+
29
+ ### Added
30
+ - **Public exec API**: Exported `exec`, `spawnGit`, `parseError`, `parseBadConfigValueErrorInfo`, `ExecError` from the git barrel for low-level Git execution.
31
+ - **Repository.id default**: `Repository` constructor `id` parameter now defaults to `0` — no longer requires a placeholder value.
32
+ - **Consumption patterns**: Documented 4 import patterns in README: root barrel, git subpath, models only, and granular subpath imports.
33
+ - **Status section**: Added pre-1.0 status note with TypeScript 5.7+ compatibility to README.
34
+
35
+ ### Changed
36
+ - **TypeScript strictness**: Enabled `noUnusedLocals` and `noUnusedParameters` in `tsconfig.json` to catch dead code. Fixed 5 newly detected unused variables.
37
+ - **prepublishOnly**: Now runs `npm run typecheck && npm run build` to prevent shipping type-broken packages.
38
+ - **README**: Removed stale "Not Published on npm" section (package is published).
39
+
40
+ ### Fixed
41
+ - **Unused variables**: Fixed 5 TS6133 errors caught by new strict settings in `apply.ts`, `environment.ts`, `gitignore.ts`, `progress/revert.ts`.
42
+
43
+ ---
44
+
45
+ ## [0.1.3] — 2026-06-13
46
+
47
+ ### Changed
48
+ - **Build pipeline**: Added `clean` script; `build` now runs `npm run clean && tsc` for deterministic fresh builds.
49
+ - **Exports**: Switched `exports` map from raw `./src/*.ts` to compiled `./dist/*.js` / `./dist/*.d.ts` with explicit directory barrel entries.
50
+ - **Package files**: Reduced npm package size to only `dist/` (removed `src/` from `files`).
51
+ - **Peer dependencies**: Moved `@types/node` and `@types/byline` from `dependencies`/`devDependencies` to optional `peerDependencies` to avoid version conflicts with consumers.
52
+ - **`.npmignore`**: Added as safety net alongside `"files": ["dist"]`.
53
+
54
+ ### Fixed
55
+ - **TypeScript compilation**: Resolved 10 TS6133 errors (unused variables) across `fatal-error.ts`, `progress/`, and `status-parser.ts`.
56
+ - **Missing type declarations**: Added `@types/byline` to fix TS7016.
57
+ - **Buffer type mismatch**: Fixed TS2345 in `exec.ts` for `Buffer.concat()` compatibility with newer `@types/node`.
58
+
59
+ ### Cleanup
60
+ - **Removed GitHub Desktop branding**: Renamed Desktop-branded symbols in `stash.ts` (`DesktopStashEntryMarker` → `StashEntryMarker`, etc.). Stripped 13 unused feature flags. Updated comments in 9 source files.
61
+
62
+ ### Documentation
63
+ - **README**: Added Known Limitations section, full API reference table, error handling guide, updated architecture diagram.
64
+ - **Examples**: Created `examples/branch-operations.ts` and `examples/create-commit.ts`. Updated imports to use `'../src/index.js'`.
65
+ - **CHANGELOG.md**: Created with full version history since 0.1.0.
66
+
67
+ ---
68
+
69
+ ## [0.1.2] — 2026-06-13
70
+
71
+ ### Added
72
+ - **Public API expansion**: `src/index.ts` now exports all 40+ git operations and all domain models through barrel files.
73
+ - **New barrel file**: `src/models/index.ts` with explicit type-only re-exports (handles naming conflicts like `ComputedAction` and `SubmoduleStatus`).
74
+ - **Missing git operations**: Added `add`, `cherry-pick`, `clean`, `lfs`, `merge-tree`, `reorder`, `squash`, `stage`, `stash`, `update-index`, `worktree-include` to the git barrel.
75
+ - **Documentation**: Rewrote README with full API reference, usage examples, and architecture docs.
76
+ - **Examples**: Added branch operations and commit creation examples.
77
+
78
+ ### Changed
79
+ - **ESM imports**: Added `.js` extensions to all 150+ relative imports across 71 source files for full Node.js ESM compatibility.
80
+ - **Git barrel** (`src/git/index.ts`): Expanded from 35 to 46 module exports with `.js` extensions.
81
+
82
+ ### Fixed
83
+ - **Runtime crash**: Fixed `localStorage.getItem('git-trace')` → `process.env.GIT_TRACE ?? '0'` in `authentication.ts` which was blocking all remote operations (push, pull, fetch, clone) in Node.js/Bun.
84
+
85
+ ### Build
86
+ - **tsconfig.json**: Added `outDir: "dist"` and `rootDir: "src"` settings.
87
+ - **package.json**: Added deep import paths via `"./*"` export pattern, `types` field, and build/prepublish scripts.
88
+
89
+ ---
90
+
91
+ ## [0.1.1] — 2026-06-07
92
+
93
+ ### Added
94
+ - Initial public release extracted from GitHub Desktop.
95
+ - Git operations: status, commit, log, branch, merge, rebase, push, pull, fetch, stash, cherry-pick, reset, diff, and more.
96
+ - Domain models: Repository, Commit, Branch, Status, Diff, StashEntry, Merge, Rebase, and more.
97
+ - Authentication support for HTTPS and SSH.
98
+ - LFS support stubs.
99
+ - Proxy resolution.
100
+ - Submodule support.
101
+
102
+ ### Notes
103
+ - This is a fork of [desktop/desktop](https://github.com/desktop/desktop)'s Git backend, extracted and adapted as a standalone library.
104
+ - Several subsystems are stubbed: progress callbacks, hook interception, and the LFS trampoline environment.
105
+
106
+ ---
107
+
108
+ ## [0.1.0] — 2026-06-07
109
+
110
+ ### Added
111
+ - Initial setup: package scaffolding, tsconfig, and project structure.
112
+ - Core Git execution layer (`git/exec.ts`, `git/core.ts`, `git/spawn.ts`).
113
+ - Authentication, proxy resolution, and environment helpers.
114
+ - MIT license.
115
+
116
+ ---
117
+
118
+ [0.1.4]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.4
119
+ [0.1.3]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.3
120
+ [0.1.2]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.2
121
+ [0.1.1]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.1
122
+ [0.1.0]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.0
123
+ [0.1.6]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.6
124
+ [0.1.5]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.5
125
+ [0.1.4]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.4
126
+ [0.1.3]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.3
127
+ [0.1.2]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.2
128
+ [0.1.1]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.1
129
+ [0.1.0]: https://github.com/parkiyong/git-chopstick-core/releases/tag/v0.1.0
130
+ [Unreleased]: https://github.com/parkiyong/git-chopstick-core/compare/v0.1.5...HEAD
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-chopstick-core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -31,7 +31,8 @@
31
31
  }
32
32
  },
33
33
  "files": [
34
- "dist"
34
+ "dist",
35
+ "CHANGELOG.md"
35
36
  ],
36
37
  "description": "Git backend library extracted from GitHub Desktop",
37
38
  "scripts": {