Skip to content

Commit 26d02cb

Browse files
fix: ignore generated wasm artifacts in analysis
1 parent 001a973 commit 26d02cb

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.fallowrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"@srcmap/generator-wasm",
2525
"@srcmap/sourcemap-wasm",
2626
"@srcmap/remapping-wasm",
27-
"**/srcmap_*_wasm.js"
27+
"**/srcmap_*_wasm.js",
28+
"**/srcmap_*_wasm_bg.wasm"
2829
],
2930
"ignorePatterns": [
3031
".fallow/**",

.github/scripts/workflow-policy.test.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const ROOT_URL = new URL("../../", import.meta.url);
77
const WORKFLOWS_URL = new URL("workflows/", new URL("../", import.meta.url));
88
const CI_WORKFLOW_URL = new URL("ci.yml", WORKFLOWS_URL);
99
const COVERAGE_WORKFLOW_URL = new URL("coverage.yml", WORKFLOWS_URL);
10+
const FALLOW_CONFIG_URL = new URL(".fallowrc.json", ROOT_URL);
1011

1112
const trackedPackageLocks = async () => {
1213
const tracked = execFileSync("git", ["ls-files", "--", ":(glob)**/package-lock.json"], {
@@ -67,6 +68,14 @@ describe("JavaScript dependency policy", () => {
6768
});
6869
});
6970

71+
describe("Generated artifact policy", () => {
72+
it("ignores generated wasm-pack binaries during artifactless analysis", async () => {
73+
const config = JSON.parse(await readFile(FALLOW_CONFIG_URL, "utf8"));
74+
75+
assert.ok(config.ignoreUnresolvedImports.includes("**/srcmap_*_wasm_bg.wasm"));
76+
});
77+
});
78+
7079
describe("Rust feature coverage", () => {
7180
it("tests both parallel encoders in Linux CI", async () => {
7281
const workflow = await readFile(CI_WORKFLOW_URL, "utf8");

0 commit comments

Comments
 (0)