fix(@angular/build): invalidate cached SCSS errors when source files are corrected by maruthang · Pull Request #32924 · angular/angular-cli

@maruthang

…are corrected

Normalize the file path in MemoryLoadResultCache.invalidate() to match
how watch file paths are stored in put(). Without normalization, paths
produced by fileURLToPath() or path.join() during Sass error reporting
may use different separators than the normalized paths stored as keys in
#fileDependencies. This mismatch caused the invalidation lookup to fail,
leaving stale error results in the load cache after fixing an SCSS
partial. The fix ensures the path is normalized before the lookup so the
correct cache entries are cleared and the next rebuild picks up the fix.

Fixes angular#32744

gemini-code-assist[bot]

… constants

Extract inline string literals used across the two new SCSS error-cache
recovery tests into named constants (SCSS_AQUA, SCSS_BROKEN, CSS_AQUA,
CSS_BLUE) to reduce duplication and improve readability.
…tants

Move duplicated 'color: aqua' and 'color: blue' assertion strings
into CSS_AQUA and CSS_BLUE constants for improved maintainability.