Skip to content

Commit 6c6c62b

Browse files
committed
refactor: rename dependency check cache
1 parent 1bcffc5 commit 6c6c62b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/modules/utils.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function getIncludePaths(fromFilename?: string, base: string[] = []) {
3333
];
3434
}
3535

36-
const cachedResult: Record<string, boolean> = {};
36+
const depCheckCache: Record<string, boolean> = {};
3737

3838
/**
3939
* Checks if a package is installed.
@@ -43,8 +43,8 @@ const cachedResult: Record<string, boolean> = {};
4343
* @returns boolean
4444
*/
4545
export async function hasDepInstalled(dep: string) {
46-
if (cachedResult[dep] != null) {
47-
return cachedResult[dep];
46+
if (depCheckCache[dep] != null) {
47+
return depCheckCache[dep];
4848
}
4949

5050
let result = false;
@@ -57,7 +57,7 @@ export async function hasDepInstalled(dep: string) {
5757
result = false;
5858
}
5959

60-
return (cachedResult[dep] = result);
60+
return (depCheckCache[dep] = result);
6161
}
6262

6363
const REMOTE_SRC_PATTERN = /^(https?:)?\/\//;

0 commit comments

Comments
 (0)