From f0164b2f091aaeed862a1898c2df44374939d452 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Mon, 4 Dec 2023 09:21:50 +0100 Subject: [PATCH] fix: correctly parse .cjs files as .js --- lib/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.ts b/lib/common.ts index 20e0424bb..4bef2c75c 100644 --- a/lib/common.ts +++ b/lib/common.ts @@ -89,7 +89,7 @@ export function isPackageJson(file: string) { } export function isDotJS(file: string) { - return path.extname(file) === '.js'; + return ['.js', '.cjs'].includes(path.extname(file)); } export function isDotJSON(file: string) {