Skip to content

Commit 4c978d3

Browse files
committed
Restore scripts/utils/path.mjs
File was removed in cleanup but is still required by changed-test-mapper.mjs. Provides normalizePath utility for build scripts.
1 parent ec18dc2 commit 4c978d3

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

scripts/utils/path.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @fileoverview Simplified path utilities for build scripts.
3+
*
4+
* This is intentionally separate from src/lib/path/* to avoid circular
5+
* dependencies where build scripts depend on the built dist output.
6+
*/
7+
8+
import path from 'node:path'
9+
10+
/**
11+
* Normalize a file path to use forward slashes
12+
*
13+
* @param {string} filePath - Path to normalize
14+
* @returns {string}
15+
*/
16+
export function normalizePath(filePath) {
17+
return path.normalize(filePath).split(path.sep).join('/')
18+
}

0 commit comments

Comments
 (0)