From 7f323dbaf85edde198835bd57f13667445a02930 Mon Sep 17 00:00:00 2001 From: "code-infra-auditor[bot]" <359127130+code-infra-auditor[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2026 14:21:39 +0000 Subject: [PATCH 1/2] [code-infra] Skip the separator split on POSIX --- packages/code-infra/src/utils/path.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/code-infra/src/utils/path.mjs b/packages/code-infra/src/utils/path.mjs index f58238a5e6..0807663fe2 100644 --- a/packages/code-infra/src/utils/path.mjs +++ b/packages/code-infra/src/utils/path.mjs @@ -6,5 +6,9 @@ import * as path from 'node:path'; * @returns {string} */ export function toPosixPath(filePath) { + // Already POSIX: nothing to replace. + if (path.sep == '/') { + return filePath; + } return filePath.split(path.sep).join('/'); } From c8e5f0d210648998664a7ebbd625a6a36bebb145 Mon Sep 17 00:00:00 2001 From: "code-infra-auditor[bot]" <359127130+code-infra-auditor[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2026 14:29:25 +0000 Subject: [PATCH 2/2] [code-infra] Use strict equality in toPosixPath The test_lint check failed on ESLint's eqeqeq rule for the new `path.sep == '/'` comparison. Use `===` instead. Co-Authored-By: Claude Opus 5.5 --- packages/code-infra/src/utils/path.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/code-infra/src/utils/path.mjs b/packages/code-infra/src/utils/path.mjs index 0807663fe2..de7388971a 100644 --- a/packages/code-infra/src/utils/path.mjs +++ b/packages/code-infra/src/utils/path.mjs @@ -7,7 +7,7 @@ import * as path from 'node:path'; */ export function toPosixPath(filePath) { // Already POSIX: nothing to replace. - if (path.sep == '/') { + if (path.sep === '/') { return filePath; } return filePath.split(path.sep).join('/');