Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(scripts): normalize path separators in check-cli-structure for Windows (#7161)

Geervan58c4f241e929
diff --git a/scripts/check-cli-structure.mjs b/scripts/check-cli-structure.mjs
index 6be5d9ae76..f260a4ad51 100644
--- a/scripts/check-cli-structure.mjs
+++ b/scripts/check-cli-structure.mjs
@@ -274,7 +274,7 @@ function checkEnvironmentImports(label, files, baseDir, knownGaps) {
let checked = 0;
for (const filePath of files) {
checked++;
- const rel = path.relative(baseDir, filePath);
+ const rel = path.relative(baseDir, filePath).split(path.sep).join('/');
const sources = importSources(filePath);
/** @type {Set<string>} */
const found = new Set();
@@ -426,7 +426,7 @@ function isApiExempt(filePath) {
if (adapterExemptions.has(filePath)) return true;
const bn = path.basename(filePath);
if (bn.endsWith('.type.mjs')) return true;
- const rel = path.relative(API, filePath);
+ const rel = path.relative(API, filePath).split(path.sep).join('/');
return rel === 'index.mjs' || rel === 'error.mjs' || rel === 'logger.mjs';
}