Skip to content

Commit a533180

Browse files
committed
refactor: Cleanups
1 parent fe004e2 commit a533180

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

packages/project/lib/ui5Framework/_frameworkPaths.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
33
import {promisify} from "node:util";
44

55
// Directory name for framework packages within ui5DataDir
6-
export const FRAMEWORK_DIR_NAME = "framework";
6+
const FRAMEWORK_DIR_NAME = "framework";
77

88
// Lockfile staleness threshold — must match the value used by AbstractInstaller#_synchronize
99
export const LOCK_STALE_MS = 60000;

packages/project/lib/ui5Framework/cache.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import fs from "node:fs/promises";
22
import path from "node:path";
33
import {promisify} from "node:util";
44
import {
5-
FRAMEWORK_DIR_NAME,
65
LOCK_STALE_MS,
76
CLEANUP_LOCK_NAME,
87
getFrameworkDir,
@@ -86,7 +85,7 @@ export async function getCacheInfo(ui5DataDir) {
8685
return null;
8786
}
8887
return {
89-
path: FRAMEWORK_DIR_NAME,
88+
path: "framework",
9089
libraryCount: stats.libraries,
9190
versionCount: stats.versions,
9291
};
@@ -133,7 +132,6 @@ export async function cleanCache(ui5DataDir) {
133132
const lockDir = getFrameworkLockDir(ui5DataDir);
134133
const lockPath = path.join(lockDir, CLEANUP_LOCK_NAME);
135134

136-
// Ensure the locks directory exists before acquiring our lock
137135
await fs.mkdir(lockDir, {recursive: true});
138136

139137
const {default: lockfile} = await import("lockfile");
@@ -168,7 +166,7 @@ export async function cleanCache(ui5DataDir) {
168166
}
169167

170168
return {
171-
path: FRAMEWORK_DIR_NAME,
169+
path: "framework",
172170
libraryCount: stats.libraries,
173171
versionCount: stats.versions,
174172
};

0 commit comments

Comments
 (0)