From 0eed1ba9fb434c86bc62113dcef4b5db5fedd8cd Mon Sep 17 00:00:00 2001 From: jimcody1995 Date: Sun, 5 Jul 2026 09:35:28 +0200 Subject: [PATCH] fix(signals): classify Sass source maps as generated Sass bundlers emit .sass.map siblings; slop already treated .scss.map and .less.map as generated but missed .sass.map, so machine output was miscounted as substantive source in classifyChangedFile. Co-authored-by: Cursor --- src/signals/path-matchers.ts | 2 +- test/unit/path-matchers.test.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/signals/path-matchers.ts b/src/signals/path-matchers.ts index 5f80b6d09e..589bec77c5 100644 --- a/src/signals/path-matchers.ts +++ b/src/signals/path-matchers.ts @@ -66,7 +66,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|mdx|scss|less|css)\.map$/.test(norm) || + /\.(js|jsx|mjs|cjs|ts|tsx|mts|cts|vue|svelte|astro|mdx|scss|sass|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 45d6967abf..50b5b793ca 100644 --- a/test/unit/path-matchers.test.ts +++ b/test/unit/path-matchers.test.ts @@ -38,7 +38,7 @@ describe("isGeneratedFile", () => { } }); - it("matches source maps for every first-class JS/TS, MDX, and front-end framework extension", () => { + it("matches source maps for every first-class JS/TS, MDX, Sass/SCSS/Less, and front-end framework extension", () => { // `.mjs`/`.cjs` are recognized code extensions (isCodeFile), so their bundlers' source // maps are generated output too — the same as `.js.map` / `.tsx.map`. for (const path of [ @@ -52,6 +52,7 @@ describe("isGeneratedFile", () => { "dist/page.astro.map", "dist/page.mdx.map", "dist/styles.scss.map", + "dist/theme.sass.map", "dist/theme.less.map", ]) { expect(isGeneratedFile(path)).toBe(true);