fix(FN-5006): complete Step 1 — fix changeset scope overlap logic
Fusion-Task-Id: FN-5006 Fusion-Task-Lineage: 30b6651f-8b0b-4918-aec9-77c4cb59cb85
This commit is contained in:
committed by
gsxdsm
parent
2e9c819dd5
commit
e9a1c103ea
@@ -3989,8 +3989,7 @@ export async function assertSquashOverlapsFileScope(params: {
|
||||
encoding: "utf-8",
|
||||
});
|
||||
const stagedFiles = stdout.split("\n").map((line) => line.trim()).filter(Boolean);
|
||||
const scopedStagedFiles = stagedFiles.filter((file) => !file.startsWith(".changeset/"));
|
||||
const hasOverlap = scopedStagedFiles.some((file) => matchesScope(file, declaredScope));
|
||||
const hasOverlap = stagedFiles.some((file) => matchesScope(file, declaredScope));
|
||||
if (!hasOverlap) {
|
||||
throw new FileScopeViolationError(taskId, stagedFiles, declaredScope);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user