From bab57472d06d9f09b1eb15b3d1fa0dccb42b5a1a Mon Sep 17 00:00:00 2001 From: Artem Date: Mon, 29 Jul 2024 00:27:31 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BF=D0=BE=20=D0=B8=D0=B4=D0=B5=D0=B5?= =?UTF-8?q?=20=D0=BE=D0=BA=D0=BE=D0=BD=D1=87=D0=B0=D1=82=D0=B5=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BF=D0=BE=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D0=BB?= =?UTF-8?q?,=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=B8=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deno.json | 2 +- src/loaders.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/deno.json b/deno.json index 45fd592..65151a2 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@artpani/tuner", - "version": "0.0.5", + "version": "0.0.6", "exports": "./mod.ts", "test": { "files": { diff --git a/src/loaders.ts b/src/loaders.ts index bccf6d7..610f2b8 100644 --- a/src/loaders.ts +++ b/src/loaders.ts @@ -43,8 +43,9 @@ const configDir = ( ): { fun: () => Promise; args: string } => ({ fun: async (): Promise => { try { - const modulePath = resolve(path) + `?version=${Math.random()}`; - const module = await import(`file:///${modulePath}`); + const modulePath = 'file:///' + resolve(path) + + `?version=${Math.random()}`; + const module = await import(modulePath); log.inf( `Successfully loaded config from config directory: ${modulePath}`, ); @@ -69,9 +70,9 @@ const cwd = ( ): { fun: () => Promise; args: string } => ({ fun: async (): Promise => { try { - const modulePath = resolve('./', path) + + const modulePath = 'file:///' + resolve('./', path) + `?version=${Math.random()}`; - const module = await import(`file:///${modulePath}`); + const module = await import(modulePath); log.inf(`Successfully loaded config from CWD: ${path}`); return module.default as T; } catch (error) {