From b6cba39c6b8968afcc8d8fc3c39d61ac8e8b45bb Mon Sep 17 00:00:00 2001 From: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com> Date: Wed, 14 Oct 2026 03:50:50 +0000 Subject: [PATCH] fix(ci): handle line breaks in documentation paths Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> --- scripts/ci/plan.mjs | 2 +- tests/boundary/filesystem/ciChangeScope.test.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/ci/plan.mjs b/scripts/ci/plan.mjs index c2ba61e31..2d68d60c7 100644 --- a/scripts/ci/plan.mjs +++ b/scripts/ci/plan.mjs @@ -176,7 +176,7 @@ if (tier === "reused") { ) { selected.docs = true; // Authored documentation code also belongs to the static checkers. - selected.code ||= /^docs\/.*\.(?:[cm]?[jt]s|[jt]sx)$/u.test(file); + selected.code ||= /^docs\/.*\.(?:[cm]?[jt]s|[jt]sx)$/su.test(file); selected.website ||= matchesAny(file, SCOPES.website); continue; } diff --git a/tests/boundary/filesystem/ciChangeScope.test.ts b/tests/boundary/filesystem/ciChangeScope.test.ts index 3e05ca7be..a80f2037a 100644 --- a/tests/boundary/filesystem/ciChangeScope.test.ts +++ b/tests/boundary/filesystem/ciChangeScope.test.ts @@ -176,6 +176,17 @@ it("retains code checks when documentation code is removed or renamed to Markdow }); }); +it("selects code checks for documentation filenames containing line breaks", async () => { + const { directory, base } = await fixture(); + const head = await change(directory, ["docs/.vitepress/navigation\nmenu.ts"]); + expect(await classify(directory, base, head)).toMatchObject({ + code: true, + docs: true, + runtime: false, + package: false, + }); +}); + it.each([ "job-timings.mjs", "job-timings-batch.mjs",