Skip to content

Commit 6386e92

Browse files
committed
fixup! fix(@angular/build): invalidate watched files regardless of Windows drive letter casing
1 parent 6f8e3ba commit 6386e92

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

‎packages/angular/build/src/tools/esbuild/bundler-context.ts‎

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -511,33 +511,21 @@ export class BundlerContext {
511511
return false;
512512
}
513513

514-
let candidateFiles: ReadonlySet<string>;
514+
let candidateFiles: ReadonlySet<string> | undefined;
515515
if (files instanceof Set) {
516-
let isCandidateReady = true;
516+
candidateFiles = files;
517517
for (const file of files) {
518518
if (
519519
file !== canonicalizePath(normalize(file)) ||
520520
(!isAbsolute(file) && !files.has(this.#normalizeWatchFile(file)))
521521
) {
522-
isCandidateReady = false;
522+
candidateFiles = undefined;
523523
break;
524524
}
525525
}
526+
}
526527

527-
if (isCandidateReady) {
528-
candidateFiles = files;
529-
} else {
530-
const normalizedFiles = new Set<string>();
531-
for (const file of files) {
532-
const normalized = canonicalizePath(normalize(file));
533-
normalizedFiles.add(normalized);
534-
if (!isAbsolute(normalized)) {
535-
normalizedFiles.add(this.#normalizeWatchFile(normalized));
536-
}
537-
}
538-
candidateFiles = normalizedFiles;
539-
}
540-
} else {
528+
if (!candidateFiles) {
541529
const normalizedFiles = new Set<string>();
542530
for (const file of files) {
543531
const normalized = canonicalizePath(normalize(file));

0 commit comments

Comments
 (0)