From de8d1462cefc2c4b28adc0bb6ab3d9561aa3d6cb Mon Sep 17 00:00:00 2001 From: Federico <38290480+FedeIlLeone@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:28:25 +0100 Subject: [PATCH] chore: support windows for import wrappers --- scripts/create-import-wrappers.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/create-import-wrappers.mts b/scripts/create-import-wrappers.mts index 7855cfe60..6dcbfe335 100644 --- a/scripts/create-import-wrappers.mts +++ b/scripts/create-import-wrappers.mts @@ -1,5 +1,5 @@ import { writeFileSync } from "node:fs"; -import { basename, join } from "node:path"; +import { basename, posix } from "node:path"; type LocationsRegistry = | string[] @@ -19,7 +19,7 @@ const locations = { function createWrappers(currentPath: string[], subpaths: LocationsRegistry): void { if (Array.isArray(subpaths)) { for (const subpath of subpaths) { - const fullPath = join(...currentPath, subpath); + const fullPath = posix.join(...currentPath, subpath); const dtsContents = `export * from "./${fullPath}";`; writeFileSync(`${basename(fullPath)}.d.ts`, dtsContents); }