Skip to content

Commit 449eb30

Browse files
committed
refactor(cli): rename isNewerThan to hasNewer for clarity
The function name `isNewerThan` was renamed to `hasNewer` to better reflect its purpose of checking if any files in the directory are newer than the given timestamp. This improves code readability and understanding.
1 parent 16a499b commit 449eb30

File tree

1 file changed

+2
-2
lines changed
  • packages/qwik/src/cli/check-client

1 file changed

+2
-2
lines changed

packages/qwik/src/cli/check-client/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function checkClientCommand(app: AppCommand, src: string, dist: string): P
3636
if (manifest === null) {
3737
await goBuild(app);
3838
} else {
39-
if (await isNewerThan(getSrcPath(src), manifest)) {
39+
if (await hasNewer(getSrcPath(src), manifest)) {
4040
await goBuild(app);
4141
}
4242
}
@@ -109,7 +109,7 @@ export async function clientDirExists(path: string): Promise<boolean> {
109109
* @returns {Promise<number>} Returns the latest mtime (Unix timestamp in milliseconds), or 0 if the
110110
* directory doesn't exist or is empty.
111111
*/
112-
export async function isNewerThan(srcPath: string, timestamp: number): Promise<boolean> {
112+
export async function hasNewer(srcPath: string, timestamp: number): Promise<boolean> {
113113
let returnValue = false;
114114
async function traverse(dir: string): Promise<void> {
115115
if (returnValue) {

0 commit comments

Comments
 (0)