From 64a0c2b86d02c025f2753ef9314a4d76fddcf483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Bumaruf?= <25939563+bumaruf@users.noreply.github.com> Date: Wed, 15 Jul 2026 12:30:52 -0300 Subject: [PATCH] fix(ci): slugify theme paths with accent stripping so accented names don't false-collide --- scripts/theme-check-ci.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/theme-check-ci.ts b/scripts/theme-check-ci.ts index 53d9d6e..5bf2ec5 100644 --- a/scripts/theme-check-ci.ts +++ b/scripts/theme-check-ci.ts @@ -1,6 +1,6 @@ import { $ } from "bun"; import { loadThemes, parseTheme } from "../src/core/theme"; -import { checkThemes, type ThemeFile } from "./check-themes"; +import { checkThemes, slugify, type ThemeFile } from "./check-themes"; import { renderDiffPreview, renderPreview } from "./render-theme-preview"; const base = process.env.BASE_SHA; @@ -73,7 +73,12 @@ async function catalogueOf(dir: "core" | "community") { } function pathOf(theme: { name: string }, dir: "core" | "community"): string { - return `themes/${dir}/${theme.name.toLowerCase().replace(/[^a-z0-9]+/g, "-")}.toml`; + // Must use the SAME slugify as the filename rule (check-themes.ts), which + // strips accents via NFD. The old inline version turned "é" into a hyphen + // ("Rosé" → "ros-"), so an accented theme's reconstructed path never matched + // its real file ("rose-..."); the exclusion failed and the theme collided + // with itself as "already exists". Only accented names hit it. + return `themes/${dir}/${slugify(theme.name)}.toml`; } const catalogue = [