Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/signals/path-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ function isGeneratedFileFrom(parts: NormalizedPath): boolean {
/\.(g|freezed|gr)\.dart$/.test(norm) ||
// C# codegen: WinForms/WPF designer partials (`.designer.cs`) and XAML/T4 output (`.g.cs`).
/\.(designer|g)\.cs$/.test(norm) ||
// Source maps for bundler/front-end output across JS/TS, frameworks, stylesheets, HTML, and SVG.
// Source maps for bundler/front-end output across JS/TS, frameworks, stylesheets, HTML, SVG, and WASM.
// `.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|sass|less|html|svg|css)\.map$/.test(norm) ||
/\.(js|jsx|mjs|cjs|ts|tsx|mts|cts|vue|svelte|astro|mdx|scss|sass|less|html|svg|css|wasm)\.map$/.test(norm) ||
base === "worker-configuration.d.ts"
);
}
Expand Down
5 changes: 4 additions & 1 deletion test/unit/path-matchers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("isGeneratedFile", () => {
}
});

it("matches source maps for every first-class JS/TS, MDX, HTML, SVG, Sass/SCSS/Less, and front-end framework extension", () => {
it("matches source maps for JS/TS, MDX, HTML, SVG, WASM, Sass/SCSS/Less, and front-end framework extensions", () => {
// `.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 [
Expand All @@ -56,9 +56,11 @@ describe("isGeneratedFile", () => {
"dist/theme.less.map",
"dist/index.html.map",
"dist/icon.svg.map",
"dist/pkg.wasm.map",
]) {
expect(isGeneratedFile(path)).toBe(true);
}
expect(classifyChangedFile("dist/pkg.wasm.map")).toBe("generated");
});

it("matches C++ protobuf output alongside the Go/TS/JS plugins", () => {
Expand Down Expand Up @@ -443,6 +445,7 @@ describe("classifyChangedFile", () => {
["proto/messages.pb.erl", "generated"],
["proto/messages.pb.hrl", "generated"],
["proto/messages.pb.cr", "generated"],
["dist/pkg.wasm.map", "generated"],
["vendor/lib.go", "vendored"],
["package-lock.json", "lockfile"],
["bun.lock", "lockfile"],
Expand Down
Loading