chore: run format

This commit is contained in:
Vlad Frangu
2025-10-05 16:13:56 +03:00
parent 2a712d4909
commit 8dc1692d87
189 changed files with 3172 additions and 916 deletions

View File

@@ -16,11 +16,17 @@ function findPackageJSON(
packageName: string,
depth: number,
): { name: string; version: string } | undefined {
if (depth === 0) return undefined;
if (depth === 0) {
return undefined;
}
const attemptedPath = resolve(dir, './package.json');
try {
const pkg = require(attemptedPath);
if (pkg.name !== packageName) throw new Error('package.json does not match');
if (pkg.name !== packageName) {
throw new Error('package.json does not match');
}
return pkg;
} catch {
return findPackageJSON(resolve(dir, '..'), packageName, depth - 1);