Comparing version 6.2.0 to 6.3.0
import path from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
import {locatePath, locatePathSync} from 'locate-path'; | ||
const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath; | ||
export const findUpStop = Symbol('findUpStop'); | ||
export async function findUpMultiple(name, options = {}) { | ||
let directory = path.resolve(options.cwd || ''); | ||
let directory = path.resolve(toPath(options.cwd) || ''); | ||
const {root} = path.parse(directory); | ||
@@ -51,3 +54,3 @@ const stopAt = path.resolve(directory, options.stopAt || root); | ||
export function findUpMultipleSync(name, options = {}) { | ||
let directory = path.resolve(options.cwd || ''); | ||
let directory = path.resolve(toPath(options.cwd) || ''); | ||
const {root} = path.parse(directory); | ||
@@ -54,0 +57,0 @@ const stopAt = options.stopAt || root; |
{ | ||
"name": "find-up", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "Find a file or directory by walking up parent directories", | ||
@@ -46,3 +46,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"locate-path": "^7.0.0", | ||
"locate-path": "^7.1.0", | ||
"path-exists": "^5.0.0" | ||
@@ -49,0 +49,0 @@ }, |
@@ -101,3 +101,3 @@ # find-up | ||
Type: `string`\ | ||
Type: `URL | string`\ | ||
Default: `process.cwd()` | ||
@@ -104,0 +104,0 @@ |
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
17031
280
Updatedlocate-path@^7.1.0