@gitkraken/core-gitlens 0.7.1 → 0.8.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.
Files changed (188) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/dist/git/cache.d.ts +18 -5
  3. package/dist/git/cache.js +26 -8
  4. package/dist/git/cache.js.map +1 -1
  5. package/dist/git/context.d.ts +5 -1
  6. package/dist/git/context.js.map +1 -1
  7. package/dist/git/errors.d.ts +28 -1
  8. package/dist/git/errors.js +45 -1
  9. package/dist/git/errors.js.map +1 -1
  10. package/dist/git/providers/branches.d.ts +5 -1
  11. package/dist/git/providers/commits.d.ts +24 -1
  12. package/dist/git/providers/config.d.ts +7 -1
  13. package/dist/git/providers/operations.d.ts +6 -0
  14. package/dist/git/providers/provider.d.ts +17 -0
  15. package/dist/git/providers/refs.d.ts +38 -3
  16. package/dist/git/providers/revision.d.ts +5 -1
  17. package/dist/git/providers/staging.d.ts +12 -0
  18. package/dist/git/providers/worktrees.d.ts +23 -3
  19. package/dist/git/run.types.d.ts +6 -0
  20. package/dist/git-cli/cliGitProvider.d.ts +17 -1
  21. package/dist/git-cli/cliGitProvider.js +37 -1
  22. package/dist/git-cli/cliGitProvider.js.map +1 -1
  23. package/dist/git-cli/exec/git.d.ts +12 -2
  24. package/dist/git-cli/exec/git.js +48 -17
  25. package/dist/git-cli/exec/git.js.map +1 -1
  26. package/dist/git-cli/exec/gitQueue.d.ts +4 -1
  27. package/dist/git-cli/exec/gitQueue.js +1 -1
  28. package/dist/git-cli/exec/gitQueue.js.map +1 -1
  29. package/dist/git-cli/providers/branches.d.ts +10 -1
  30. package/dist/git-cli/providers/branches.js +15 -8
  31. package/dist/git-cli/providers/branches.js.map +1 -1
  32. package/dist/git-cli/providers/commits.d.ts +23 -1
  33. package/dist/git-cli/providers/commits.js +57 -8
  34. package/dist/git-cli/providers/commits.js.map +1 -1
  35. package/dist/git-cli/providers/config.js +4 -3
  36. package/dist/git-cli/providers/config.js.map +1 -1
  37. package/dist/git-cli/providers/operations.d.ts +1 -0
  38. package/dist/git-cli/providers/operations.js +39 -3
  39. package/dist/git-cli/providers/operations.js.map +1 -1
  40. package/dist/git-cli/providers/patch.js +20 -41
  41. package/dist/git-cli/providers/patch.js.map +1 -1
  42. package/dist/git-cli/providers/pausedOperations.js +2 -2
  43. package/dist/git-cli/providers/pausedOperations.js.map +1 -1
  44. package/dist/git-cli/providers/refs.d.ts +15 -3
  45. package/dist/git-cli/providers/refs.js +115 -10
  46. package/dist/git-cli/providers/refs.js.map +1 -1
  47. package/dist/git-cli/providers/revision.d.ts +3 -1
  48. package/dist/git-cli/providers/revision.js +9 -5
  49. package/dist/git-cli/providers/revision.js.map +1 -1
  50. package/dist/git-cli/providers/staging.d.ts +8 -0
  51. package/dist/git-cli/providers/staging.js +59 -7
  52. package/dist/git-cli/providers/staging.js.map +1 -1
  53. package/dist/git-cli/providers/worktrees.d.ts +31 -2
  54. package/dist/git-cli/providers/worktrees.js +75 -7
  55. package/dist/git-cli/providers/worktrees.js.map +1 -1
  56. package/dist/ipc/discovery.js +1 -1
  57. package/dist/plus/agents/providers/claudeCodeTranscript.js +6 -6
  58. package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
  59. package/dist/plus/ai/providers/openAICompatibleProviderBase.js +1 -1
  60. package/dist/plus/git-github/api/github.d.ts +64 -3
  61. package/dist/plus/git-github/api/github.js +237 -24
  62. package/dist/plus/git-github/api/github.js.map +1 -1
  63. package/dist/plus/git-github/providers/github/branches.d.ts +3 -1
  64. package/dist/plus/git-github/providers/github/branches.js +2 -1
  65. package/dist/plus/git-github/providers/github/branches.js.map +1 -1
  66. package/dist/plus/git-github/providers/github/refs.d.ts +10 -3
  67. package/dist/plus/git-github/providers/github/refs.js +4 -4
  68. package/dist/plus/git-github/providers/github/refs.js.map +1 -1
  69. package/dist/plus/git-github/providers/github/revision.d.ts +3 -1
  70. package/dist/plus/git-github/providers/github/revision.js +1 -1
  71. package/dist/plus/git-github/providers/github/revision.js.map +1 -1
  72. package/dist/plus/integrations/collectionMetadata.d.ts +48 -3
  73. package/dist/plus/integrations/collectionMetadata.js +138 -8
  74. package/dist/plus/integrations/collectionMetadata.js.map +1 -1
  75. package/dist/plus/integrations/errors.d.ts +3 -1
  76. package/dist/plus/integrations/errors.js +7 -3
  77. package/dist/plus/integrations/errors.js.map +1 -1
  78. package/dist/plus/integrations/index.d.ts +6 -3
  79. package/dist/plus/integrations/index.js.map +1 -1
  80. package/dist/plus/integrations/integrationService.d.ts +36 -10
  81. package/dist/plus/integrations/integrationService.js +16 -3
  82. package/dist/plus/integrations/integrationService.js.map +1 -1
  83. package/dist/plus/integrations/manager.d.ts +107 -37
  84. package/dist/plus/integrations/models/gitHostIntegration.d.ts +129 -14
  85. package/dist/plus/integrations/models/gitHostIntegration.js +142 -18
  86. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  87. package/dist/plus/integrations/models/integration.d.ts +117 -11
  88. package/dist/plus/integrations/models/integration.js +175 -13
  89. package/dist/plus/integrations/models/integration.js.map +1 -1
  90. package/dist/plus/integrations/models/issuesIntegration.d.ts +18 -5
  91. package/dist/plus/integrations/models/issuesIntegration.js +42 -10
  92. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  93. package/dist/plus/integrations/providers/azure/azure.d.ts +1 -1
  94. package/dist/plus/integrations/providers/azure/azure.js +14 -18
  95. package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
  96. package/dist/plus/integrations/providers/azure/models.d.ts +29 -0
  97. package/dist/plus/integrations/providers/azure/models.js +112 -1
  98. package/dist/plus/integrations/providers/azure/models.js.map +1 -1
  99. package/dist/plus/integrations/providers/azureDevOps.d.ts +73 -3
  100. package/dist/plus/integrations/providers/azureDevOps.js +117 -3
  101. package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
  102. package/dist/plus/integrations/providers/azureDevOpsServer.js +2 -1
  103. package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
  104. package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +61 -0
  105. package/dist/plus/integrations/providers/bitbucket/bitbucket.js +165 -23
  106. package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
  107. package/dist/plus/integrations/providers/bitbucket/models.d.ts +6 -1
  108. package/dist/plus/integrations/providers/bitbucket/models.js +4 -3
  109. package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
  110. package/dist/plus/integrations/providers/bitbucket-server/pullRequestSearch.js +2 -2
  111. package/dist/plus/integrations/providers/bitbucket-server/pullRequestSearch.js.map +1 -1
  112. package/dist/plus/integrations/providers/bitbucket-server.d.ts +48 -2
  113. package/dist/plus/integrations/providers/bitbucket-server.js +51 -1
  114. package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
  115. package/dist/plus/integrations/providers/bitbucket.d.ts +45 -2
  116. package/dist/plus/integrations/providers/bitbucket.js +41 -2
  117. package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
  118. package/dist/plus/integrations/providers/github.d.ts +49 -5
  119. package/dist/plus/integrations/providers/github.js +102 -7
  120. package/dist/plus/integrations/providers/github.js.map +1 -1
  121. package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +35 -0
  122. package/dist/plus/integrations/providers/gitlab/gitlab.js +132 -15
  123. package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
  124. package/dist/plus/integrations/providers/gitlab/models.d.ts +1 -0
  125. package/dist/plus/integrations/providers/gitlab/models.js +1 -1
  126. package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
  127. package/dist/plus/integrations/providers/gitlab.d.ts +49 -2
  128. package/dist/plus/integrations/providers/gitlab.js +80 -4
  129. package/dist/plus/integrations/providers/gitlab.js.map +1 -1
  130. package/dist/plus/integrations/providers/jira-server.d.ts +3 -3
  131. package/dist/plus/integrations/providers/jira-server.js +5 -8
  132. package/dist/plus/integrations/providers/jira-server.js.map +1 -1
  133. package/dist/plus/integrations/providers/jira.d.ts +9 -0
  134. package/dist/plus/integrations/providers/jira.js +13 -1
  135. package/dist/plus/integrations/providers/jira.js.map +1 -1
  136. package/dist/plus/integrations/providers/linear.js +1 -1
  137. package/dist/plus/integrations/providers/models.d.ts +13 -2
  138. package/dist/plus/integrations/providers/models.js +11 -1
  139. package/dist/plus/integrations/providers/models.js.map +1 -1
  140. package/dist/plus/integrations/providers/providerErrors.d.ts +9 -1
  141. package/dist/plus/integrations/providers/providerErrors.js +10 -1
  142. package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
  143. package/dist/plus/integrations/providers/providersApi.d.ts +60 -1
  144. package/dist/plus/integrations/providers/providersApi.js +137 -2
  145. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  146. package/dist/plus/integrations/providers/utils/providerPaging.d.ts +42 -0
  147. package/dist/plus/integrations/providers/utils/providerPaging.js +58 -1
  148. package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
  149. package/dist/plus/integrations/providers/utils.d.ts +1 -1
  150. package/dist/plus/integrations/reads/broaden.js +1 -1
  151. package/dist/plus/integrations/reads/context.d.ts +1 -1
  152. package/dist/plus/integrations/reads/counts.js +1 -1
  153. package/dist/plus/integrations/reads/currentAccount.d.ts +35 -0
  154. package/dist/plus/integrations/reads/currentAccount.js +46 -0
  155. package/dist/plus/integrations/reads/currentAccount.js.map +1 -0
  156. package/dist/plus/integrations/reads/drains.d.ts +5 -2
  157. package/dist/plus/integrations/reads/drains.js +8 -4
  158. package/dist/plus/integrations/reads/drains.js.map +1 -1
  159. package/dist/plus/integrations/reads/hierarchy.js +1 -1
  160. package/dist/plus/integrations/reads/hierarchy.utils.js +1 -1
  161. package/dist/plus/integrations/reads/issueBatch.d.ts +72 -12
  162. package/dist/plus/integrations/reads/issueBatch.js +193 -48
  163. package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
  164. package/dist/plus/integrations/reads/issueTracker.js +1 -1
  165. package/dist/plus/integrations/reads/issues.js +1 -1
  166. package/dist/plus/integrations/reads/pullRequestBatch.d.ts +57 -0
  167. package/dist/plus/integrations/reads/pullRequestBatch.js +80 -0
  168. package/dist/plus/integrations/reads/pullRequestBatch.js.map +1 -0
  169. package/dist/plus/integrations/reads/pullRequestBranches.d.ts +58 -0
  170. package/dist/plus/integrations/reads/pullRequestBranches.js +111 -0
  171. package/dist/plus/integrations/reads/pullRequestBranches.js.map +1 -0
  172. package/dist/plus/integrations/reads/pullRequests.js +3 -3
  173. package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
  174. package/dist/plus/integrations/reads/resolveRepository.js +1 -1
  175. package/dist/plus/integrations/reads/sweeps.js +4 -4
  176. package/dist/plus/integrations/reads/sweeps.js.map +1 -1
  177. package/dist/plus/integrations/results.d.ts +87 -6
  178. package/dist/plus/integrations/results.js +9 -2
  179. package/dist/plus/integrations/results.js.map +1 -1
  180. package/dist/utils/env/node/exec.js +3 -3
  181. package/dist/utils/env/node/exec.js.map +1 -1
  182. package/docs/integrations.md +175 -35
  183. package/docs/kepler-git-write-api-parity.md +239 -0
  184. package/docs/kepler-read-api-parity.md +75 -28
  185. package/package.json +1 -1
  186. package/dist/plus/integrations/reads/trackerIssue.d.ts +0 -33
  187. package/dist/plus/integrations/reads/trackerIssue.js +0 -60
  188. package/dist/plus/integrations/reads/trackerIssue.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,51 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.8.0] - 2026-09-27
10
+
11
+ ### Added
12
+
13
+ - Adds compare-and-swap reference updates and a reference delete, so a consumer can move a ref only if it still points where it last saw it. `refs.updateReference(repoPath, ref, sha, { expected })` passes git's own old-value check (`update-ref <ref> <new> <old>`) when `expected` is a sha, and the empty old value — git's spelling of "must not exist yet" — when it is `'absent'`; `refs.deleteReference(repoPath, ref, { expected })` is the `update-ref -d --no-deref` form — it deletes a symbolic ref itself, never the ref it points to, and refuses `HEAD` — and deletes a local branch the way `git branch -d` leaves things apart from its merged check: refused while checked out in any worktree, with its `branch.<name>` config section and GitLens's per-branch metadata removed alongside. Both throw a typed `ReferenceUpdateError` (`conflict`, `invalidRef`, `invalidObject`, `notFound`, `checkedOut`) and fire the cache and repository hooks a branch, remote-tracking, tag or `HEAD` move fires; a ref in another namespace announces nothing, since nothing core caches can observe it. A cancelled call rejects as `CancellationError`, never `ReferenceUpdateError`, so a host serving `@gitkraken/sync-tools`' compare-and-swap `updateRef` op can tell a refusal from a cancellation (git, git-cli)
14
+ - Adds `worktrees.pruneWorktrees(repoPath, { expire })` and `worktrees.lockWorktree(repoPath, path, { reason })`, the `git worktree prune` and `worktree lock --reason` forms beside the existing `unlockWorktree`, both firing the worktree hooks, and a prune unregistering the worktrees it removed from the cache as `deleteWorktree` does; and gives `createWorktree` and `deleteWorktree` a trailing `runOptions`, so a large worktree's checkout or removal can run without the default per-command timeout and can be cancelled. The thrown `WorktreeDeleteError` keeps git's raw output on `original` for a consumer that classifies a platform-specific failure itself (git, git-cli)
15
+ - Adds `staging.clean(repoPath, { paths, directories, force, ignored })` — `git clean` — the one way to discard untracked files, which `ops.restore` cannot do (git, git-cli)
16
+ - Adds `provider.notifyChanged(repoPath, changes, { cache })` for a consumer that ran a mutation through the raw `git.run` escape hatch. Core invalidates its caches inside its own typed mutators only, so a raw rebase, clean or ref write left every typed read serving the pre-mutation answer until a file watcher's debounce caught up — or forever with no watcher. This clears the named caches (all by default) and fires the same `cache.onReset` / `repository.onChanged` hooks a typed mutator would, so the host's listeners run too; a consumer no longer has to classify git verbs itself to know what to invalidate (git, git-cli)
17
+ - Adds `branch.<name>.remote`, `branch.<name>.merge` and `core.hooksPath` to the documented `GitConfigKeys`, so `config.getConfig` / `setConfig` read and write a branch's upstream pair (including one whose remote ref does not exist yet, which `--set-upstream-to` refuses) and the hooks directory. Writing either upstream key also resets the cached branch list, which reports the upstream (git, git-cli)
18
+ - Adds `fastForward: 'only'` to `ops.pull` (`--ff-only`), spelled as `ops.merge` spells it, with a refused fast-forward reported as `PullError` reason `noFastForward` (as `FetchError` names it) instead of falling through to `other`; a `branch` checked out nowhere is fast-forwarded by fetching `<upstream>:<branch>` rather than only fetching, without `--update-head-ok` so git still refuses a branch that turns out to be checked out. A pull of a branch with no upstream is now `PullError` reason `noUpstream` (git, git-cli)
19
+ - Adds `commits.createCommitFromTree(repoPath, tree, { parents, message, author, committer, sign, source })`, a `commit-tree` with any number of parents and an explicit identity, for a consumer assembling merge commits or replaying commits under their original author. It is now the one path that writes a commit object: the patch sub-provider's commits go through it, and with `sign` it reports a signing failure as `SigningError` and fires the signing hooks, as the patch path did (git, git-cli)
20
+ - Adds `provider.init(path, { defaultBranch, bare })` beside `clone` (git, git-cli)
21
+ - Adds `force` to `refs.validateReference`, `refs.getReference`, `branches.getBranch` and `revision.resolveRevision`, for a read that must reflect a change core was not told about, such as a ref another process moved. A forced read skips the cached answer, never joins a read that started before it, and stores its fresh answer for later reads; `getBranch({ force })` first evicts the branch cascade a branch move clears (git, git-cli, plus/git-github)
22
+ - Documents the decisions above, and what was deliberately left on the raw escape hatch, in `docs/kepler-git-write-api-parity.md`, the write-path sibling of the read-API parity record (core)
23
+ - Adds `getPullRequestsBatch`, which resolves pull requests by coordinate — `(owner, repo, number)`, plus `project` on Azure DevOps — in any state (open, closed or merged). It is the pull request counterpart of `getIssuesBatch`. Until now the manager had only list, search, count and sweep reads for pull requests, so finding one meant scanning its repository's most recently updated pull requests and matching the URL, and an older merged pull request could be neither found nor proven gone. `pullRequest: undefined` means proven absent and is safe to cache; a target whose read failed returns no item and sets `fetchFailed`, while the other targets still answer. On GitHub and GitHub Enterprise, a target GitHub refuses on its own — e.g. in an org enforcing SAML SSO the token isn't authorized for — fails only that target, with GitHub's own message. Rows carry the same fields as the list reads' rows, except on Bitbucket Cloud, where provider-apis has no single pull request read: those rows come from GitLens' own REST read instead and lack `commentsCount`, `isDraft` and the clone URLs. On GitLab, a miss the confirming read then contradicts fails the target rather than answering with the confirming read's own, differently-identified row. Every git host is supported: GitHub and GitHub Enterprise resolve up to 25 targets per request, while GitLab, Bitbucket, Bitbucket Data Center and Azure DevOps cost one request per target. A GitLab miss costs a second request, because provider-apis' GitLab read reports a reply carrying only GraphQL errors the same way as a missing merge request. An Azure DevOps miss is trusted only when Azure itself says the pull request, repository or project doesn't exist, so a 404 from a misconfigured server path is a failure rather than an absence. The read is uncached and does not go through `IntegrationCacheProvider.getPullRequest`, so the caller's cache is the only one holding the answer (plus/integrations, plus/git-github)
24
+ - Adds `getPullRequestsForBranches`, which finds, for each branch, every pull request whose head is that branch, in any state (open, closed or merged), most recently updated first, up to 10 per branch. A target names the repository the pull requests are opened against, the branch's short name and, for a branch in a fork, `headOwner`; a `headOwner` equal to the target's owner means the base repository, so a caller can pass the owner of whichever remote the branch was pushed to. Until now a consumer found a local branch's pull requests by matching the account-wide sweeps, which hold only pull requests the user authored, is assigned or reviews — so a teammate's pull request from the user's branch never correlated — and a cold consumer paid for a whole sweep before it could show one. This read carries no relationship to the user. It matches on the head branch name rather than looking the branch up, so a merged pull request whose branch was since deleted is still found. It also matches the head repository — the base repository itself, or the fork `headOwner` owns — so a `main` in the base repository never claims every fork's `main`. An empty list without `truncated` is a proven none, safe to cache, and a missing base repository reads as one; `truncated` means more may match than were returned; a target whose read failed returns no item and sets `fetchFailed`, while the other targets still answer. GitHub and GitHub Enterprise answer up to 25 branches per request, fetching up to 10 full pull requests each, through the new `GitHubApi.getPullRequestsForBranches`; GitLab, Bitbucket, Bitbucket Data Center and Azure DevOps cost one request per branch, since provider-apis has no source-branch filter on any host and each answers from GitLens' own branch query. On GitLab and Azure DevOps that query only finds the matching numbers, which are then resolved through `getPullRequestsBatch`'s own read, typically 0–1 per branch at that read's cost, so a pull request comes back identical — `url` and `authoredByMe` included — whichever of the two reads found it; one it can't check fails its whole branch rather than leaving a partial list. Rows carry the list reads' fields on GitHub, GitHub Enterprise and Bitbucket Data Center and the by-id read's fields on Bitbucket Cloud. Bitbucket asks for every state explicitly, since it answers only open pull requests otherwise. Bitbucket Data Center and Azure DevOps serve branches in the base repository only and refuse a `headOwner` naming another owner: Data Center finds a branch's pull requests only through the repository the branch lives in, and an Azure DevOps fork shares its organization, so neither can find a fork by its owner. Azure DevOps also requires `project`, and trusts a missing repository only on Azure's own not-found body. The read is uncached and does not go through `IntegrationCacheProvider.getPullRequestForBranch`, so the caller's cache is the only one holding the answer (plus/integrations, plus/git-github)
25
+ - Adds `getCurrentAccount`, answering who a git host connection is signed in as, on demand. Until now the account was knowable only as a side effect of some other read resolving it. It goes through the host-supplied `IntegrationManagerCacheProvider.getCurrentAccount` cache rather than adding a second one. `account` is never absent without a warning: no session, a failed request, or an issue tracker, which has only a per-resource account and refuses (plus/integrations)
26
+ - Adds GitLab (including self-managed) and Azure DevOps (including Server) to `getIssuesBatch`'s coordinate form, which served only GitHub and GitHub Enterprise, so a consumer no longer walks a scoped issue list for them, where a miss could never be proven. A coordinate target gains an optional `project`: Azure DevOps requires it, since work items belong to the project, and ignores `repo`; a call with a target missing it is refused. Each target costs one request, and rows are converted exactly as the repository-scoped `listIssuesPage` converts them, except that an Azure DevOps row has no `project`, which only the account-wide list fills from project discovery. A GitLab issue is proven absent only when GitLab answers a null project or issue, and a miss costs a second request to confirm it, because provider-apis reports a reply carrying only GraphQL errors the same way; any error, a 404 or an empty response fails the target. An Azure DevOps work item is proven absent only when Azure's own 404 body says so — `WorkItemUnauthorizedAccessException` (TF401232, which Azure uses both for a missing work item and for one this connection cannot read) or `ProjectDoesNotExistWithNameException`. An HTML 404, a 410, any other `typeKey`, or any other failure fails the target. Bitbucket and Bitbucket Data Center have no issues and still refuse (plus/integrations)
27
+
28
+ ### Changed
29
+
30
+ - **Breaking (git, git-cli)** — `refs.updateReference` now THROWS on failure instead of logging and resolving. A ref writer whose failures are invisible by default is the bug, not a mode to opt out of; no caller in this repository relied on the old behavior. Its signature is now `(repoPath, ref, sha, options?, cancellation?)`
31
+ - Every staging mutation (`stageFile(s)`, `stageDirectory`, `stageAll`, `unstage*`, `removeFile(s)`) now fires `cache.onReset('status', 'diff', 'tracking')` and the `index` repository change, except when it targets a temporary index, which is not the repository's. Before this the sub-provider fired nothing, so a consumer that staged through the typed API and then read the status could be answered from the index as it stood before the stage (git-cli)
32
+ - Raises the git process queue's default `maxConcurrent` from 7 to 20, the default of GitLens' own `advanced.git.maxConcurrentProcesses`, so a consumer that configures nothing no longer runs with a third of the concurrency GitLens uses (git-cli)
33
+ - Core now clears its own caches and pending git commands whenever it announces a write through `cache.onReset`, rather than leaving that to each host's handler. A host with no handler kept serving pre-write reads after every typed write, and one that forwarded to `Cache.clearCaches` could still hand a caller that arrived after the write a read, or a git run, that started before it, because `clearCaches` keeps sharing an entry that is still in flight. A write now hard-evicts through the new `Cache.evictCaches`; clears from a file watcher keep sharing in-flight reads. A handler that forwards to `clearCaches` keeps working and is now redundant (git, git-cli)
34
+ - **Breaking (git, git-cli, plus/git-github)** — `refs.validateReference` takes an options object in place of its `relativePath` parameter, `validateReference(repoPath, ref, { relativePath, force }, cancellation)`, and `branches.getBranch` / `refs.getReference` take `options` before `cancellation`. A caller passing a relative path or a cancellation positionally must move it
35
+ - **Breaking (git, git-cli)** — `commits.createUnreachableCommitFromTree(repoPath, tree, parent, message)` is removed in favor of `createCommitFromTree(repoPath, tree, { parents: [parent], message })`, which writes the same commit object
36
+ - **Breaking (plus/integrations)** — Changes `getIssuesBatch` to resolve Jira Cloud, Jira Data Center and Linear issues too, and removes `getTrackerIssue` and `TrackerIssueResult`, which it replaces. A tracker call takes tracker targets, `{ key, resourceId, resourceUrl?, identifier }`, in place of `(owner, repo, number)` coordinates, with the guarantees `getTrackerIssue` gave: `issue: undefined` is a proven absence, a failed read returns no item and sets `fetchFailed`, `resourceId` is trusted and triggers no resource discovery, Jira Cloud requires `resourceUrl`, Trello refuses, and a Jira Data Center call is refused unless `domain` or a configured `connectionId` names its host. A call carrying the other target form is refused whole. Migrate `getTrackerIssue({ providerId, resourceId, resourceUrl, key, connectionId, domain })` to `getIssuesBatch({ providerId, connectionId, domain, targets: [{ key: '…', resourceId, resourceUrl, identifier: key }] })`, where `domain` is needed only for Jira Data Center. Issues now have one identity read, as pull requests do with `getPullRequestsBatch`; a key asked of several resources is answered in one call, one target per resource, rather than one call per resource; and failures are isolated per target within it, so a failing target drops only itself and a call costs the integration at most one strike toward its disconnect budget. Like the other batch reads it is uncached, where `getTrackerIssue` went through `IntegrationCacheProvider.getIssue`, so the caller's cache is the only one holding the answer. `IssueBatchTarget` and `IssueBatchResult` are now exported (plus/integrations)
37
+
38
+ ### Fixed
39
+
40
+ - Fixes a git command that never started because its cancellation had already fired — the signal was aborted when the call was made, or while the command waited in the queue — rejecting as a `GitError` instead of a `CancellationError`. A typed mutator took that as git refusing the operation and reported a failure of its own, such as a `ReferenceUpdateError` with no reason, where its caller expected a cancellation. An `errors: 'ignore'` run still reports it as `failed`/`unstarted` (git-cli)
41
+ - Fixes a git command given an empty stdin waiting for input until the command timeout killed it. The spawn path only closed git's stdin for a non-empty value, so `patch.createEmptyInitialCommit`, which hashes the empty tree from an empty stdin, failed this way every time, and a commit given an empty message hung for the full timeout instead of being refused (utils, git-cli)
42
+ - Fixes concurrent git runs with the same arguments but a different per-call `env` sharing one result. The executor's in-flight dedup keyed on the command line and ignored the environment, so a run against a temporary index (`GIT_INDEX_FILE`) or with config injected through `GIT_CONFIG_*` could be handed another run's answer. A run with a per-call `env` is now never shared, as one with stdin already wasn't (git-cli)
43
+ - **Breaking (plus/integrations, plus/git-github)** — Fixes `getIssuesBatch` failing every target in its request when one target refuses on its own — e.g. an org enforcing SAML SSO the token isn't authorized for. GitHub answers that case with HTTP 200: the other aliases' data, plus a FORBIDDEN error scoped to the one alias that refused. The read classified the first error in the response and threw for the whole batch, which also ran the integration's auth handling — expiring a cloud session or adding a disconnect strike — for a token that had, in fact, worked. An error whose `path[0]` names one of the read's own generated aliases is now scoped to that alias's target: NOT_FOUND still reads as a PROVEN ABSENCE, anything else fails only that target with GitHub's own message, and the other targets in the request still answer. An error with no `path`, or naming something the read never asked for — rate limits, bad credentials, query-cost errors — still fails the whole request exactly as before. `getIssuesBatch` (on `GitHubApi`, published) now returns one `PromiseSettledResult` per coordinate instead of a plain array — `rejected` for a failed target, `fulfilled` with `undefined` for a proven absence — so a consumer reading the old plain-array return must switch to `.status`/`.value`/`.reason`. An issue that can't be mapped, or a response carrying no data at all, now fails instead of reading as absent, since a false absence would be cached. `getIssuesBatchResult` and the GitHub batch hook behind it change the same way in `plus/integrations`, but `GitHostIntegration` is reachable through neither `index.js` nor `lite.js`, so that side is not a published break (plus/integrations, plus/git-github)
44
+ - Fixes three ways `getIssuesBatch` on GitHub and GitHub Enterprise could misreport a target. A call with no session on the primary connection was reported as the host not supporting the read; it is now a connection warning. More than 25 targets were sent as one integration call per 25, so a batch that failed outright spent one strike toward disconnecting per 25 targets; the whole call is now one integration call and spends at most one. A target with a blank `owner` or `repo` went upstream and came back as a missing repository, a proven absence a caller would cache, and a `number` that isn't a positive integer failed every other target in its request; both now refuse the call, as `getPullRequestsBatch` does. A `number` above 2147483647 — GitHub's GraphQL `Int` is 32-bit — raised a variable-coercion error with no `path`, also failing every other target; it now refuses the call too, on GitHub and GitHub Enterprise only (plus/integrations)
45
+ - Fixes `PullRequestShape.authoredByMe` always being `false` for GitHub and GitHub Enterprise pull requests from the account-wide pull request reads and the sweeps. GitLens' own GitHub GraphQL reads key a pull request's people by their login, while the current account's `id` is GitHub's numeric database id, so an id-only comparison never matched on that path. Authorship now also matches when the two logins agree (plus/integrations)
46
+ - Fixes the batch reads — `getIssuesBatch`, `getPullRequestsBatch` and `getPullRequestsForBranches` — treating a batch whose every target was refused by its own scope as a dead token ([#5890](https://github.com/gitkraken/vscode-gitlens/issues/5890)), e.g. targets all in an Azure DevOps organization that blocks third-party OAuth apps or doesn't accept this PAT, which expired a cloud session or added a disconnect strike. The credential is now confirmed first, with the same cached check the account-wide reads use, and the session is left alone when it passes. A refused target's `auth` warning now carries the `scope` its target names — the Azure DevOps organization and project, the repository on other git hosts, or the tracker's resource — and a `cause` where the provider names one, including when other targets answered (plus/integrations)
47
+
48
+ ## [0.7.2] - 2026-09-25
49
+
50
+ ### Fixed
51
+
52
+ - Fixes a `ProviderWarning` from a scoped authentication failure being indistinguishable from an account-wide one ([#5890](https://github.com/gitkraken/vscode-gitlens/issues/5890)). A fan-out read that records a failure against one organization, project or repository (for example an Azure DevOps organization with third-party OAuth access disabled answering its project discovery with a 401) produced the same `{ kind: 'auth', isAuth: true }` warning as a dead token, with the scope only in the English `message`, so a consumer could only prompt to reconnect, which can never fix it. Warnings derived from a structured scope failure now carry an optional `scope` (the new `ProviderWarningScope`: `resourceId`, `projectId`, `repositoryId`) naming the part of the read that failed. `kind` and `isAuth` are unchanged, and an absent `scope` still means account-wide or unattributed, so existing consumers keep their behavior. Azure DevOps, Bitbucket and Jira Cloud serve discovery from a per-token cache, where a revoked token would reach only the scopes still requested and look like one scope's refusal. Bitbucket Data Center's repo-scoped pull request read, an SDK fan-out with no request to the connection first, has the same shape. When a read's only authentication failures are scoped, these providers now confirm the credential with one uncached check (at most once a minute for a credential that passed it), and a refused credential fails the read as a connection failure instead, so a scoped `auth` warning means the credential itself was accepted. A refusal the provider pins on the credential, like Bitbucket's or Jira Cloud's for a token missing required OAuth scopes, which a reconnect fixes, is published unscoped too, once for the connection, while the scopes that answered keep their results. Such a warning now also says why the scope refused, through an optional `cause` (the new `ProviderWarningCause` and `ProviderWarningCauseReason`): `reason` is `oauth-app-not-allowed` (the organization's "Third-party application access via OAuth" policy is off, which is the default for new Azure DevOps organizations), `access-denied` or `conditional-access` (`VS403463`), with the provider's `code` and, for the OAuth policy, a `remedyUrl` to the organization's policy page, so a consumer can recommend the fix rather than a reconnect that could never heal it. It is named only once the credential is confirmed, because Azure DevOps answers a disallowed OAuth app with the same bare `401` as an expired token, and only Azure DevOps names causes today. A scope failure's `message` now also carries the provider's own explanation, or the error its response raised (a page reduced to its status), instead of the generic "credentials are either invalid or expired", which said the opposite of a scope refusing a sound credential. Failures of two scopes also stay two warnings rather than relying on their messages differing (plus/integrations)
53
+
9
54
  ## [0.7.1] - 2026-09-24
10
55
 
11
56
  ### Added
@@ -372,7 +417,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
372
417
 
373
418
  - Initial release. Bundles `@gitlens/utils`, `@gitlens/git`, `@gitlens/git-cli`, `@gitlens/ai`, and `@gitlens/git-github` into a single core npm package with subpath exports.
374
419
 
375
- [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.7.1...HEAD
420
+ [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.8.0...HEAD
421
+ [0.8.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.7.2...gitkraken:releases/core/v0.8.0
422
+ [0.7.2]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.7.1...gitkraken:releases/core/v0.7.2
376
423
  [0.7.1]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.7.0...gitkraken:releases/core/v0.7.1
377
424
  [0.7.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.6.0...gitkraken:releases/core/v0.7.0
378
425
  [0.6.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.5.116...gitkraken:releases/core/v0.6.0
@@ -124,13 +124,26 @@ export declare class Cache implements Disposable {
124
124
  get trackedPaths(): RepoPromiseCacheMap<string, [string, string] | false>;
125
125
  get worktrees(): PromiseMap<RepoPath, GitWorktree[]>;
126
126
  clearCaches(repoPath: string | undefined, ...types: CachedGitTypes[]): void;
127
+ /**
128
+ * Hard-evicts the same cache keys {@link clearCaches} would clear for `repoPath`, but a shared
129
+ * (commonPath-keyed) entry that is still in flight is deleted outright instead of soft-invalidated —
130
+ * a caller after this call never joins a read that started before it. Use for a forced read/write
131
+ * that must not be answered from pre-change work; `clearCaches` remains the right call whenever
132
+ * letting an in-flight read complete and share its answer with new callers is fine.
133
+ */
134
+ evictCaches(repoPath: string, ...types: CachedGitTypes[]): void;
135
+ private clearCachesCore;
127
136
  /**
128
137
  * Evicts a single shared (commonPath-keyed) cache entry for `repoPath` and its sibling worktrees.
129
- * Prefers `invalidate` where supported so in-flight work is shared across new callers and
130
- * self-evicts on settle rather than spawning a duplicate factory. `invalidate` does the right
131
- * thing per-entry: entries with a `CacheController` (created via `getOrCreate`) are marked
132
- * invalidated; entries without one (created via plain `.set()`, e.g. per-worktree mapper results)
133
- * are hard-deleted. Caches that don't support `invalidate` fall back to `delete`.
138
+ * When `inFlight` is `'share'` (the default), prefers `invalidate` where supported so in-flight work
139
+ * is shared across new callers and self-evicts on settle rather than spawning a duplicate factory.
140
+ * `invalidate` does the right thing per-entry: entries with a `CacheController` (created via
141
+ * `getOrCreate`) are marked invalidated; entries without one (created via plain `.set()`, e.g.
142
+ * per-worktree mapper results) are hard-deleted. Caches that don't support `invalidate` fall back to
143
+ * `delete`.
144
+ *
145
+ * When `inFlight` is `'evict'`, always hard-deletes regardless of `invalidate` support — a new caller
146
+ * must never join a read that started before this eviction (see {@link evictCaches}).
134
147
  */
135
148
  private evictShared;
136
149
  /**
package/dist/git/cache.js CHANGED
@@ -334,6 +334,19 @@ var Cache = class Cache {
334
334
  return this._caches.worktrees ??= new PromiseMap();
335
335
  }
336
336
  clearCaches(repoPath, ...types) {
337
+ this.clearCachesCore("share", repoPath, ...types);
338
+ }
339
+ /**
340
+ * Hard-evicts the same cache keys {@link clearCaches} would clear for `repoPath`, but a shared
341
+ * (commonPath-keyed) entry that is still in flight is deleted outright instead of soft-invalidated —
342
+ * a caller after this call never joins a read that started before it. Use for a forced read/write
343
+ * that must not be answered from pre-change work; `clearCaches` remains the right call whenever
344
+ * letting an in-flight read complete and share its answer with new callers is fine.
345
+ */
346
+ evictCaches(repoPath, ...types) {
347
+ this.clearCachesCore("evict", repoPath, ...types);
348
+ }
349
+ clearCachesCore(inFlight, repoPath, ...types) {
337
350
  const keysToClear = /* @__PURE__ */ new Set();
338
351
  if (!types.length) {
339
352
  for (const key of Object.keys(this._caches)) keysToClear.add(key);
@@ -407,6 +420,7 @@ var Cache = class Cache {
407
420
  keysToClear.add("refTips");
408
421
  keysToClear.add("commit");
409
422
  keysToClear.add("commitCount");
423
+ keysToClear.add("resolvedRevisions");
410
424
  }
411
425
  if (types.includes("tracking")) {
412
426
  keysToClear.add("fileExistence");
@@ -419,23 +433,27 @@ var Cache = class Cache {
419
433
  const cache = this._caches[key];
420
434
  if (cache == null) continue;
421
435
  if (repoPath == null) cache.clear();
422
- else if (sharedCacheKeys.has(key)) this.evictShared(key, repoPath);
436
+ else if (sharedCacheKeys.has(key)) this.evictShared(key, repoPath, inFlight);
423
437
  else cache.delete(repoPath);
424
438
  }
425
439
  }
426
440
  /**
427
441
  * Evicts a single shared (commonPath-keyed) cache entry for `repoPath` and its sibling worktrees.
428
- * Prefers `invalidate` where supported so in-flight work is shared across new callers and
429
- * self-evicts on settle rather than spawning a duplicate factory. `invalidate` does the right
430
- * thing per-entry: entries with a `CacheController` (created via `getOrCreate`) are marked
431
- * invalidated; entries without one (created via plain `.set()`, e.g. per-worktree mapper results)
432
- * are hard-deleted. Caches that don't support `invalidate` fall back to `delete`.
442
+ * When `inFlight` is `'share'` (the default), prefers `invalidate` where supported so in-flight work
443
+ * is shared across new callers and self-evicts on settle rather than spawning a duplicate factory.
444
+ * `invalidate` does the right thing per-entry: entries with a `CacheController` (created via
445
+ * `getOrCreate`) are marked invalidated; entries without one (created via plain `.set()`, e.g.
446
+ * per-worktree mapper results) are hard-deleted. Caches that don't support `invalidate` fall back to
447
+ * `delete`.
448
+ *
449
+ * When `inFlight` is `'evict'`, always hard-deletes regardless of `invalidate` support — a new caller
450
+ * must never join a read that started before this eviction (see {@link evictCaches}).
433
451
  */
434
- evictShared(key, repoPath) {
452
+ evictShared(key, repoPath, inFlight = "share") {
435
453
  const cache = this._caches[key];
436
454
  if (cache == null) return;
437
455
  const commonPath = this.getCommonPath(repoPath);
438
- const invalidate = cache.invalidate;
456
+ const invalidate = inFlight === "share" ? cache.invalidate : void 0;
439
457
  if (typeof invalidate === "function") {
440
458
  invalidate.call(cache, commonPath);
441
459
  for (const worktreePath of this.getWorktreePaths(commonPath)) {