Socket
Socket
Sign inDemoInstall

find-up

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-up - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

13

index.d.ts
/* eslint-disable @typescript-eslint/unified-signatures */
import {Options} from 'locate-path';
import {Options as LocatePathOptions} from 'locate-path';

@@ -11,2 +11,11 @@ /**

export interface Options extends LocatePathOptions {
/**
The path to the directory to stop the search before reaching root if there were no matches before the `stopAt` directory.
@default path.parse(cwd).root
*/
readonly stopAt?: string;
}
/**

@@ -141,3 +150,1 @@ Find a file or directory by walking up parent directories.

export function pathExistsSync(path: string): boolean;
export {Options} from 'locate-path';

@@ -9,2 +9,3 @@ import path from 'node:path';

const {root} = path.parse(directory);
const stopAt = path.resolve(directory, options.stopAt || root);
const paths = [name].flat();

@@ -38,3 +39,3 @@

if (directory === root) {
if (directory === stopAt) {
return;

@@ -50,2 +51,3 @@ }

const {root} = path.parse(directory);
const stopAt = options.stopAt || root;
const paths = [name].flat();

@@ -78,3 +80,3 @@

if (directory === root) {
if (directory === stopAt) {
return;

@@ -81,0 +83,0 @@ }

{
"name": "find-up",
"version": "6.0.0",
"version": "6.1.0",
"description": "Find a file or directory by walking up parent directories",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -103,2 +103,9 @@ # find-up

##### stopAt
Type: `string`\
Default: `path.parse(cwd).root`
The path to the directory to stop the search before reaching root if there were no matches before the `stopAt` directory.
### pathExists(path)

@@ -105,0 +112,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc