@gitkraken/core-gitlens 0.17.0 → 0.18.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/CHANGELOG.md CHANGED
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.18.0] - 2026-10-25
10
+
9
11
  ## [0.17.0] - 2026-10-25
10
12
 
11
13
  ### Added
@@ -956,7 +958,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
956
958
 
957
959
  - 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.
958
960
 
959
- [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.17.0...HEAD
961
+ [unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.18.0...HEAD
962
+ [0.18.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.17.0...gitkraken:releases/core/v0.18.0
960
963
  [0.17.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.16.5...gitkraken:releases/core/v0.17.0
961
964
  [0.16.5]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.16.4...gitkraken:releases/core/v0.16.5
962
965
  [0.16.4]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.16.3...gitkraken:releases/core/v0.16.4
@@ -191,6 +191,7 @@ export declare class Cache implements Disposable {
191
191
  get gitDir(): Map<RepoPath, GitDir>;
192
192
  get gitIgnore(): Map<RepoPath, GitIgnoreFilter>;
193
193
  get gitResults(): RepoPromiseCacheMap<RepoPath, GitResult>;
194
+ get ignoreConfigListing(): PromiseMap<RepoPath, string | undefined>;
194
195
  get initialCommitSha(): PromiseMap<RepoPath, string | undefined>;
195
196
  get lastFetched(): PromiseCache<RepoPath, number | undefined>;
196
197
  get leftRightCommitCount(): RepoPromiseCacheMap<string, LeftRightCommitCountResult | undefined>;
@@ -488,6 +489,12 @@ export declare class Cache implements Disposable {
488
489
  * before it.
489
490
  */
490
491
  getAheadOfBaseConfigListing(repoPath: string, factory: (commonPath: string, cacheable: CacheController, cancellation?: AbortSignal) => PromiseOrValue<string | undefined>, cancellation?: AbortSignal): Promise<string | undefined>;
492
+ /**
493
+ * One listing of the gitignore filter's config inputs for every checkout of a repository, which serves a checkout's
494
+ * filter while nothing makes config differ by checkout. Evicted hard, so a read after a change never joins one
495
+ * from before it.
496
+ */
497
+ getIgnoreConfigListing(repoPath: string, factory: (commonPath: string, cacheable: CacheController, cancellation?: AbortSignal) => PromiseOrValue<string | undefined>, cancellation?: AbortSignal): Promise<string | undefined>;
491
498
  getBranchMetadataMap(repoPath: string, factory: (commonPath: string) => PromiseOrValue<Map<string, BranchMetadata>>): Promise<Map<string, BranchMetadata>>;
492
499
  getDefaultBranchName(repoPath: string, remote: string, factory: (commonPath: string, cacheable: CacheController, cancellation?: AbortSignal) => PromiseOrValue<string | undefined>, cancellation?: AbortSignal): Promise<string | undefined>;
493
500
  /** The cached default branch for one `remote` key, without reading it; `undefined` when none is cached */
package/dist/git/cache.js CHANGED
@@ -73,6 +73,7 @@ const sharedCacheKeys = new Set(exhaustiveArray()([
73
73
  "emptyTreeSha",
74
74
  "gitResults",
75
75
  "gkConfigMap",
76
+ "ignoreConfigListing",
76
77
  "initialCommitSha",
77
78
  "lastFetched",
78
79
  "logShas",
@@ -121,6 +122,7 @@ function createEmptyCaches() {
121
122
  gitIgnore: void 0,
122
123
  gitResults: void 0,
123
124
  gkConfigMap: void 0,
125
+ ignoreConfigListing: void 0,
124
126
  initialCommitSha: void 0,
125
127
  lastFetched: void 0,
126
128
  logShas: void 0,
@@ -302,6 +304,9 @@ var Cache = class Cache {
302
304
  get gitResults() {
303
305
  return this._caches.gitResults ??= new RepoPromiseCacheMap({ capacity: 200 });
304
306
  }
307
+ get ignoreConfigListing() {
308
+ return this._caches.ignoreConfigListing ??= new PromiseMap();
309
+ }
305
310
  get initialCommitSha() {
306
311
  return this._caches.initialCommitSha ??= new PromiseMap();
307
312
  }
@@ -442,6 +447,7 @@ var Cache = class Cache {
442
447
  if (types.includes("branch")) {
443
448
  keysToClear.add("aheadOfBaseConfigKey");
444
449
  keysToClear.add("aheadOfBaseConfigListing");
450
+ keysToClear.add("ignoreConfigListing");
445
451
  keysToClear.add("baseBranchName");
446
452
  }
447
453
  if (!worktreeOnly && (types.includes("branch") || types.includes("worktrees"))) this.evictMergeTargetsOnCheckout(repoPath);
@@ -458,6 +464,7 @@ var Cache = class Cache {
458
464
  if (types.includes("config")) {
459
465
  keysToClear.add("aheadOfBaseConfigKey");
460
466
  keysToClear.add("aheadOfBaseConfigListing");
467
+ keysToClear.add("ignoreConfigListing");
461
468
  keysToClear.add("baseBranchName");
462
469
  keysToClear.add("configKeys");
463
470
  keysToClear.add("configPatterns");
@@ -517,7 +524,7 @@ var Cache = class Cache {
517
524
  else if (key === "aheadOfBaseConfigKey" && !worktreeOnly && (!types.length || types.includes("config"))) this.evictShared(key, repoPath, "evict");
518
525
  else if (sharedCacheKeys.has(key)) {
519
526
  if (!worktreeOnly) {
520
- const hardEvict = key === "aheadOfBaseConfigListing" || key === "gitResults" && (types.includes("config") || types.includes("branch"));
527
+ const hardEvict = key === "aheadOfBaseConfigListing" || key === "ignoreConfigListing" || key === "gitResults" && (types.includes("config") || types.includes("branch"));
521
528
  this.evictShared(key, repoPath, hardEvict ? "evict" : inFlight);
522
529
  }
523
530
  } else cache.delete(repoPath);
@@ -630,7 +637,10 @@ var Cache = class Cache {
630
637
  if (previousCommonPath != null && previousCommonPath !== commonPath) this.unregisterRepoPath(normalizedPath);
631
638
  if (previousCommonPath !== commonPath) {
632
639
  this._caches.aheadOfBaseConfigKey?.delete(normalizedPath);
633
- if (normalizedPath === commonPath) this._caches.aheadOfBaseConfigListing?.delete(commonPath);
640
+ if (normalizedPath === commonPath) {
641
+ this._caches.aheadOfBaseConfigListing?.delete(commonPath);
642
+ this._caches.ignoreConfigListing?.delete(commonPath);
643
+ }
634
644
  this._caches.gitResults?.delete(normalizedPath);
635
645
  }
636
646
  this._commonPathRegistry.set(normalizedPath, commonPath);
@@ -674,7 +684,7 @@ var Cache = class Cache {
674
684
  if (key === "gitResults" && isLastWorktree && repoPath !== commonPath) cache.delete(commonPath);
675
685
  continue;
676
686
  }
677
- if (key === "aheadOfBaseConfigListing") {
687
+ if (key === "aheadOfBaseConfigListing" || key === "ignoreConfigListing") {
678
688
  if (repoPath === commonPath || isLastWorktree) cache.delete(commonPath);
679
689
  continue;
680
690
  }
@@ -1188,6 +1198,14 @@ var Cache = class Cache {
1188
1198
  getAheadOfBaseConfigListing(repoPath, factory, cancellation) {
1189
1199
  return this.getSharedSimple(this.aheadOfBaseConfigListing, repoPath, factory, cancellation);
1190
1200
  }
1201
+ /**
1202
+ * One listing of the gitignore filter's config inputs for every checkout of a repository, which serves a checkout's
1203
+ * filter while nothing makes config differ by checkout. Evicted hard, so a read after a change never joins one
1204
+ * from before it.
1205
+ */
1206
+ getIgnoreConfigListing(repoPath, factory, cancellation) {
1207
+ return this.getSharedSimple(this.ignoreConfigListing, repoPath, factory, cancellation);
1208
+ }
1191
1209
  getBranchMetadataMap(repoPath, factory) {
1192
1210
  return this.getSharedSimple(this.branchMetadataMap, repoPath, factory);
1193
1211
  }