You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
445 B

2 months ago
import { dirname } from "path";
import findUp from "next/dist/compiled/find-up";
export function findRootLockFile(cwd) {
return findUp.sync([
"pnpm-lock.yaml",
"package-lock.json",
"yarn.lock",
"bun.lockb"
], {
cwd
});
}
export function findRootDir(cwd) {
const lockFile = findRootLockFile(cwd);
return lockFile ? dirname(lockFile) : undefined;
}
//# sourceMappingURL=find-root.js.map