From ea39e0bbe7432165582ffdd2f3051921d1e040eb Mon Sep 17 00:00:00 2001 From: Scott Anderson <87314430+scott-ut@users.noreply.github.com> Date: Wed, 19 Oct 2022 11:36:47 +0100 Subject: [PATCH] fix: use path.resolve instead of string interpolation Co-authored-by: JounQin --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 25ca352..b7656f9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -251,7 +251,7 @@ const isFile = (path?: string | undefined): path is string => { } const isModule = (modulePath?: string | undefined): modulePath is string => { - return !!modulePath && isFile(`${modulePath}${path.sep}package.json`) + return !!modulePath && isFile(path.resolve(modulePath, 'package.json')) } /**