Skip to content

Commit 9d98d4b

Browse files
committed
🐛 [node] 修复normalizeFilePath不同平台逻辑不统一的问题
1 parent 452d642 commit 9d98d4b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

node/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gaubee/node",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"exports": {
55
"./env": "./src/env.ts",
66
"./path": "./src/path.ts",

node/src/path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const normalizeFilePath = (path: string | URL): string => {
1313
path = fileURLToPath(path);
1414
}
1515
if (path.includes("\\")) {
16-
path = path.replaceAll(node_path.sep, node_path.posix.sep);
16+
path = path.replaceAll("\\", "/");
1717
}
1818
return path;
1919
};

0 commit comments

Comments
 (0)