From b55de456ac617b69aed701fa40787f3976de5e5c Mon Sep 17 00:00:00 2001 From: Superchupu <53496941+SuperchupuDev@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:06:26 +0000 Subject: [PATCH] fix: windows paths --- src/index.ts | 2 +- test/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1917d0af1..1e7530904 100644 --- a/src/index.ts +++ b/src/index.ts @@ -118,7 +118,7 @@ const normalizeOptions = async ( } if (Array.isArray(entry)) { - const matcher = picomatch(entry) + const matcher = picomatch(entry, { windows: true }) options.entry = await new fdir() .withRelativePaths() .filter((file) => matcher(file)) diff --git a/test/utils.ts b/test/utils.ts index 7924fa807..777b78dd7 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -61,7 +61,7 @@ export async function run( .withRelativePaths() .crawl(path.resolve(testDir, 'dist')) .withPromise() - .then((res) => res.sort()) + .then((res) => res.map((f) => f.replaceAll('\\', '/'))) return { get output() {