From 157f90c1f4bf3ed91225c6103ce0c89c3f70cf07 Mon Sep 17 00:00:00 2001 From: jimcody1995 Date: Sun, 5 Jul 2026 07:32:19 +0200 Subject: [PATCH] fix(signals): classify scss and less source maps as generated Sass/Less bundlers emit .scss.map/.less.map siblings; slop already treated .css.map as generated but missed these spellings, so they were miscounted as substantive source in classifyChangedFile. Co-authored-by: Cursor --- src/signals/path-matchers.ts | 2 +- test/unit/path-matchers.test.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/signals/path-matchers.ts b/src/signals/path-matchers.ts index 6a62739a3e..aa5467ef8a 100644 --- a/src/signals/path-matchers.ts +++ b/src/signals/path-matchers.ts @@ -65,7 +65,7 @@ function isGeneratedFileFrom(parts: NormalizedPath): boolean { // Source maps for every first-class JS/TS bundle extension. `.mjs`/`.cjs` are already // recognized code extensions (isCodeFile), so their bundlers' `.mjs.map` / `.cjs.map` // maps are generated output too — the same as `.js.map`. - /\.(js|jsx|mjs|cjs|ts|tsx|mts|cts|vue|svelte|astro|css)\.map$/.test(norm) || + /\.(js|jsx|mjs|cjs|ts|tsx|mts|cts|vue|svelte|astro|scss|less|css)\.map$/.test(norm) || base === "worker-configuration.d.ts" ); } diff --git a/test/unit/path-matchers.test.ts b/test/unit/path-matchers.test.ts index 7ab5bffcd2..750185e4ae 100644 --- a/test/unit/path-matchers.test.ts +++ b/test/unit/path-matchers.test.ts @@ -50,6 +50,8 @@ describe("isGeneratedFile", () => { "dist/App.vue.map", "dist/Card.svelte.map", "dist/page.astro.map", + "dist/styles.scss.map", + "dist/theme.less.map", ]) { expect(isGeneratedFile(path)).toBe(true); }