From d3b7f73c662b41d0658857800b6fa51e46892705 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 12 Feb 2025 12:41:22 +0100 Subject: [PATCH] Refactor: update import paths for parseWinPath and integrate it into joinUrl function --- src/helpers/parseWinPath.ts | 2 +- src/utils/joinUrl.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/parseWinPath.ts b/src/helpers/parseWinPath.ts index e73a9e18..809d2c84 100644 --- a/src/helpers/parseWinPath.ts +++ b/src/helpers/parseWinPath.ts @@ -1,4 +1,4 @@ -import { isWindows } from '../utils'; +import { isWindows } from '../utils/isWindows'; export const parseWinPath = (path: string | undefined): string => { path = path?.split(`\\`).join(`/`) || ''; diff --git a/src/utils/joinUrl.ts b/src/utils/joinUrl.ts index 36bd3892..9ce92026 100644 --- a/src/utils/joinUrl.ts +++ b/src/utils/joinUrl.ts @@ -1,4 +1,5 @@ import { urlJoin } from 'url-join-ts'; +import { parseWinPath } from '../helpers'; export const joinUrl = (baseUrl: string | undefined, ...paths: any[]): string => { const url = urlJoin(baseUrl, ...paths); @@ -9,5 +10,5 @@ export const joinUrl = (baseUrl: string | undefined, ...paths: any[]): string => return url + '/'; } - return url; + return parseWinPath(url); };