Add windowsPathsNoEscape to glob calls that may receive backslash paths

Glob v13 treats backslashes as escape characters by default, unlike v7
which treated them as path separators on Windows. This broke Windows CI
where path.join/resolve produce backslash paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
Fredrik Adelöw
2026-03-31 15:20:56 +02:00
parent 2e5c5f85b2
commit b6c0ef5d5d
4 changed files with 11 additions and 3 deletions
@@ -25,7 +25,10 @@ export function resolveEntryPath(
targetDir: string,
): string {
const { dir: entryDir, name: entryName } = parse(entrypoint);
const [entryFile] = glob.sync(`${resolve(targetDir, entryDir, entryName)}.*`);
const [entryFile] = glob.sync(
`${resolve(targetDir, entryDir, entryName)}.*`,
{ windowsPathsNoEscape: true },
);
if (entryFile) {
return join(entryDir, entryName);
}