From 81585d199c2c9778974bb0e08e6e2c87e9174d92 Mon Sep 17 00:00:00 2001 From: Simon Raming Date: Sun, 25 Jan 2026 18:38:33 +0100 Subject: [PATCH 1/2] check for node_modules and package.json instead of VCS --- src/utils.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 52cbf80..51e8982 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -183,14 +183,10 @@ function getPluginsVersions(names: string[]): (string | null)[] { function getProjectPath(rootPath: string): string { function isProjectPath(folderPath: string): boolean { - const gitPath = path.join(folderPath, ".git"); - if (fs.existsSync(gitPath)) return true; - const hgPath = path.join(folderPath, ".hg"); - if (fs.existsSync(hgPath)) return true; - const svnPath = path.join(folderPath, ".svn"); - if (fs.existsSync(svnPath)) return true; - const slPath = path.join(folderPath, ".sl"); - if (fs.existsSync(slPath)) return true; + const nodePath = path.join(folderPath, "node_modules"); + if (fs.existsSync(nodePath)) return true; + const pkgPath = path.join(folderPath, "package.json"); + if (fs.existsSync(pkgPath)) return true; return false; } From 9e0c0444058740cf1f4c0f5ed5151a33a07b1885 Mon Sep 17 00:00:00 2001 From: Simon Raming Date: Mon, 26 Jan 2026 21:28:20 +0100 Subject: [PATCH 2/2] re-add VCS for non-js repo --- src/utils.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils.ts b/src/utils.ts index 51e8982..5a51768 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -183,6 +183,14 @@ function getPluginsVersions(names: string[]): (string | null)[] { function getProjectPath(rootPath: string): string { function isProjectPath(folderPath: string): boolean { + const gitPath = path.join(folderPath, ".git"); + if (fs.existsSync(gitPath)) return true; + const hgPath = path.join(folderPath, ".hg"); + if (fs.existsSync(hgPath)) return true; + const svnPath = path.join(folderPath, ".svn"); + if (fs.existsSync(svnPath)) return true; + const slPath = path.join(folderPath, ".sl"); + if (fs.existsSync(slPath)) return true; const nodePath = path.join(folderPath, "node_modules"); if (fs.existsSync(nodePath)) return true; const pkgPath = path.join(folderPath, "package.json");