@gitkraken/core-gitlens 0.9.8 → 0.10.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 (51) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/dist/git/errors.d.ts +7 -0
  3. package/dist/git/errors.js +14 -1
  4. package/dist/git/errors.js.map +1 -1
  5. package/dist/git/providers/status.d.ts +6 -1
  6. package/dist/git/run.types.d.ts +9 -4
  7. package/dist/git-cli/exec/git.js +36 -16
  8. package/dist/git-cli/exec/git.js.map +1 -1
  9. package/dist/git-cli/providers/diff.d.ts +5 -2
  10. package/dist/git-cli/providers/diff.js +21 -9
  11. package/dist/git-cli/providers/diff.js.map +1 -1
  12. package/dist/git-cli/providers/patch.js +5 -7
  13. package/dist/git-cli/providers/patch.js.map +1 -1
  14. package/dist/git-cli/providers/status.d.ts +0 -1
  15. package/dist/git-cli/providers/status.js +119 -142
  16. package/dist/git-cli/providers/status.js.map +1 -1
  17. package/dist/plus/git-github/providers/github/status.d.ts +0 -1
  18. package/dist/plus/git-github/providers/github/status.js.map +1 -1
  19. package/dist/plus/integrations/collectionMetadata.d.ts +7 -0
  20. package/dist/plus/integrations/collectionMetadata.js +11 -1
  21. package/dist/plus/integrations/collectionMetadata.js.map +1 -1
  22. package/dist/plus/integrations/models/issueReads.d.ts +5 -0
  23. package/dist/plus/integrations/models/issuesIntegration.d.ts +37 -1
  24. package/dist/plus/integrations/models/issuesIntegration.js +118 -2
  25. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  26. package/dist/plus/integrations/providers/jira-server.d.ts +8 -1
  27. package/dist/plus/integrations/providers/jira-server.js +90 -138
  28. package/dist/plus/integrations/providers/jira-server.js.map +1 -1
  29. package/dist/plus/integrations/providers/jira.d.ts +11 -1
  30. package/dist/plus/integrations/providers/jira.js +88 -122
  31. package/dist/plus/integrations/providers/jira.js.map +1 -1
  32. package/dist/plus/integrations/providers/linear.d.ts +22 -1
  33. package/dist/plus/integrations/providers/linear.js +84 -35
  34. package/dist/plus/integrations/providers/linear.js.map +1 -1
  35. package/dist/plus/integrations/providers/models.d.ts +5 -9
  36. package/dist/plus/integrations/providers/models.js.map +1 -1
  37. package/dist/plus/integrations/providers/providersApi.d.ts +24 -3
  38. package/dist/plus/integrations/providers/providersApi.js +56 -4
  39. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  40. package/dist/plus/integrations/providers/utils/jiraIssueDrains.d.ts +86 -0
  41. package/dist/plus/integrations/providers/utils/jiraIssueDrains.js +139 -0
  42. package/dist/plus/integrations/providers/utils/jiraIssueDrains.js.map +1 -0
  43. package/dist/plus/integrations/reads/issueTracker.js +20 -9
  44. package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
  45. package/dist/utils/cancellation.d.ts +4 -1
  46. package/dist/utils/cancellation.js +4 -2
  47. package/dist/utils/cancellation.js.map +1 -1
  48. package/dist/utils/env/node/exec.d.ts +5 -1
  49. package/dist/utils/env/node/exec.js +8 -5
  50. package/dist/utils/env/node/exec.js.map +1 -1
  51. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,32 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.10.0] - 2026-10-04
10
+
11
+ ### Added
12
+
13
+ - Adds `expectedExitCodes` to `Git.run`'s options: non-zero exit codes that are answers rather than failures, such as `1` from `git diff --quiet`, resolve as `exited` with that code in every `errors` mode, so a read can run with `errors: 'throw'` and still get its answer (git, git-cli)
14
+ - Adds `reason` (`'aborted'`, `'timeout'` or `'unknown'`) to `CancellationError` and `CancelledRunError`, read from how the process ended rather than estimated from its duration, so a consumer can tell a git timeout from a caller abort. A timeout is still a `CancellationError`, and the `reason` on a cancelled `completion` is now exact as well (utils, git, git-cli)
15
+ - Adds `getGitWarning` and `undefinedOnGitWarning` to the git errors module, for a caller that wants the old answer for a read that now rejects: `.catch(undefinedOnGitWarning)` resolves `undefined` when git reported a known warning (a folder that is no longer a repository, a bare repository) and rethrows any other failure, including a cancellation or timeout (git)
16
+
17
+ ### Changed
18
+
19
+ - **Breaking (git, git-cli)** — `status.getStatus`, `getUntrackedFiles`, `getConflictingFiles`, `hasConflictingFiles`, `getWorkingChangesState` and `hasWorkingChanges` reject when git fails, with a `GitError` carrying git's `stderr`, where they used to answer empty or `false`; an empty or `false` answer now always means git ran and found nothing. Cancellation still rejects with `CancellationError`. `hasWorkingChanges`'s `throwOnError` option is removed (it could not surface a git failure anyway), so catch the rejection where a fallback is wanted. `getStatus` rejects where it used to resolve `undefined` (a folder that is no longer a repository, a bare repository), while `getStatusForFile` and `getStatusForPath` still resolve `undefined` there. `diff.getDiffStatus` and `getChangedFilesCount` with `includeUntracked` still leave untracked files out when the listing fails, unless called with `errors: 'throw'`, which now rejects for it too
20
+
21
+ ### Fixed
22
+
23
+ - Fixes `hasWorkingChanges` reporting a repository with no commits as clean when it has staged or modified files: before the first commit it compares against the empty tree (git-cli)
24
+
25
+ ## [0.9.9] - 2026-10-04
26
+
27
+ ### Changed
28
+
29
+ - Changes a user-scoped `listIssueTrackerIssuesPage` read to search a tracker's projects together instead of draining each one ([#5902](https://github.com/gitkraken/vscode-gitlens/issues/5902)), so a page wide enough to order by recency across every project no longer costs a request per project, even one with none of the user's issues. Jira and Jira Data Center send one JQL per site (instance), user scope and relationship, up to 50 projects each; Linear sends one `getIssues` for every team, filtered to the viewer server-side. A search only serves its projects when it completes: an incomplete one, or one failing for a reason that may be one project's (e.g. a project deleted since discovery), is read project by project, so completeness, warnings and retry cursors stay per project as before. Reads of every assignee (`includeAllAssignees`) stay per project. The new `IssuesIntegration.getIssuesForProjectsWithTruncationResult` returns one result per project (plus/integrations)
30
+
31
+ ### Fixed
32
+
33
+ - Fixes Linear issues closed as duplicates being listed as open work, and Bitbucket Data Center pull request reads that ask for several states being refused (`state=ALL`), by bumping `@gitkraken/provider-apis` to 0.63.0. A multi-state Bitbucket Data Center read now returns its rows grouped by state rather than newest-first across states. The bump also lets Azure DevOps Server 2020 read and merge pull requests (its PR routes now use api-version 6.0) (plus/integrations)
34
+
9
35
  ## [0.9.8] - 2026-10-03
10
36
 
11
37
  ### Changed
@@ -533,7 +559,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
533
559
 
534
560
  - 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.
535
561
 
536
- [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.8...HEAD
562
+ [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.10.0...HEAD
563
+ [0.10.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.9...gitkraken:releases/core/v0.10.0
564
+ [0.9.9]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.8...gitkraken:releases/core/v0.9.9
537
565
  [0.9.8]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.7...gitkraken:releases/core/v0.9.8
538
566
  [0.9.7]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.6...gitkraken:releases/core/v0.9.7
539
567
  [0.9.6]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.5...gitkraken:releases/core/v0.9.6
@@ -32,6 +32,13 @@ export declare const GitWarnings: {
32
32
  readonly tipBehind: RegExp;
33
33
  };
34
34
  export type GitWarningKey = keyof typeof GitWarnings;
35
+ /** The {@link GitWarnings} entry a failure's message matches, if any */
36
+ export declare function getGitWarning(ex: unknown): GitWarningKey | undefined;
37
+ /**
38
+ * For a read's `.catch`: answers `undefined` for a {@link GitWarnings} failure (a folder that is no longer a repository,
39
+ * a bare repository) and rethrows any other, including a cancellation or timeout
40
+ */
41
+ export declare function undefinedOnGitWarning(ex: unknown): undefined;
35
42
  export interface GitCommandContext {
36
43
  readonly repoPath: string;
37
44
  readonly args: readonly (string | undefined)[];
@@ -38,6 +38,19 @@ const GitWarnings = {
38
38
  notAGitCommand: /'.+' is not a git command/i,
39
39
  tipBehind: /tip of your current branch is behind/i
40
40
  };
41
+ /** The {@link GitWarnings} entry a failure's message matches, if any */
42
+ function getGitWarning(ex) {
43
+ if (!(ex instanceof Error)) return void 0;
44
+ for (const [key, warning] of Object.entries(GitWarnings)) if (warning.test(ex.message)) return key;
45
+ }
46
+ /**
47
+ * For a read's `.catch`: answers `undefined` for a {@link GitWarnings} failure (a folder that is no longer a repository,
48
+ * a bare repository) and rethrows any other, including a cancellation or timeout
49
+ */
50
+ function undefinedOnGitWarning(ex) {
51
+ if (getGitWarning(ex) != null) return void 0;
52
+ throw ex;
53
+ }
41
54
  var GitCommandError = class GitCommandError extends Error {
42
55
  static is(ex) {
43
56
  return ex instanceof GitCommandError;
@@ -979,6 +992,6 @@ var SigningError = class SigningError extends GitCommandError {
979
992
  }
980
993
  };
981
994
  //#endregion
982
- export { ApplyPatchCommitError, AuthenticationError, AuthenticationErrorReason, BlameIgnoreRevsFileBadRevisionError, BlameIgnoreRevsFileError, BranchError, CheckoutError, CherryPickError, CommitError, FetchError, GitCommandError, GitSearchError, GitWarnings, MergeError, PausedOperationAbortError, PausedOperationContinueError, PullError, PushError, RebaseError, ReferenceUpdateError, RequestClientError, RequestNotFoundError, RequestRateLimitError, ResetError, RevertError, ShowError, SigningError, StashApplyError, StashPushError, TagError, WorkspaceUntrustedError, WorktreeCreateError, WorktreeDeleteError, getDeferredRequestFailure, reportRequestFailure };
995
+ export { ApplyPatchCommitError, AuthenticationError, AuthenticationErrorReason, BlameIgnoreRevsFileBadRevisionError, BlameIgnoreRevsFileError, BranchError, CheckoutError, CherryPickError, CommitError, FetchError, GitCommandError, GitSearchError, GitWarnings, MergeError, PausedOperationAbortError, PausedOperationContinueError, PullError, PushError, RebaseError, ReferenceUpdateError, RequestClientError, RequestNotFoundError, RequestRateLimitError, ResetError, RevertError, ShowError, SigningError, StashApplyError, StashPushError, TagError, WorkspaceUntrustedError, WorktreeCreateError, WorktreeDeleteError, getDeferredRequestFailure, getGitWarning, reportRequestFailure, undefinedOnGitWarning };
983
996
 
984
997
  //# sourceMappingURL=errors.js.map