Comparing version 6.0.0 to 6.0.1
import path from 'node:path'; | ||
import {findUp, findUpSync} from 'find-up'; | ||
export async function packageDirectory({cwd}) { | ||
export async function packageDirectory({cwd} = {}) { | ||
const filePath = await findUp('package.json', {cwd}); | ||
@@ -9,5 +9,5 @@ return filePath && path.dirname(filePath); | ||
export function packageDirectorySync({cwd}) { | ||
export function packageDirectorySync({cwd} = {}) { | ||
const filePath = findUpSync('package.json', {cwd}); | ||
return filePath && path.dirname(filePath); | ||
} |
{ | ||
"name": "pkg-dir", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "Find the root directory of a Node.js project or npm package", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5336