Skip to content

Commit 337136a

Browse files
committed
Rename CommandCacheRecord -> OutputCache
1 parent a9baab8 commit 337136a

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/cli/output-cache.ts‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type CommandCacheKeyOutputMap = {
2323
/**
2424
* The type of the command cache that is persisted to disk.
2525
*/
26-
export interface CommandCacheRecord<K extends CommandCacheKey> {
26+
export interface OutputCache<K extends CommandCacheKey> {
2727
cmd: string;
2828
entries: Map<K, CommandCacheKeyOutputMap[K]>;
2929
}
@@ -109,7 +109,7 @@ export function getCachedCodeQlVersion(
109109
return undefined;
110110
}
111111
if (
112-
!isCommandCacheRecord(persisted) ||
112+
!isOutputCache(persisted) ||
113113
(cmd !== undefined && persisted.cmd !== cmd)
114114
) {
115115
return undefined;
@@ -139,15 +139,11 @@ function isVersionInfo(x: unknown): x is VersionInfo {
139139
}
140140

141141
/**
142-
* Determines whether a value is a `CommandCacheRecord` object.
142+
* Determines whether a value is a `OutputCache` object.
143143
* @param x The value to test
144144
*/
145-
function isCommandCacheRecord(
146-
x: unknown,
147-
): x is CommandCacheRecord<CommandCacheKey.Version> {
148-
const candidate = x as Partial<
149-
CommandCacheRecord<CommandCacheKey.Version>
150-
> | null;
145+
function isOutputCache(x: unknown): x is OutputCache<CommandCacheKey.Version> {
146+
const candidate = x as Partial<OutputCache<CommandCacheKey.Version>> | null;
151147
return (
152148
typeof candidate === "object" &&
153149
candidate !== null &&

0 commit comments

Comments
 (0)