Back to Explore

sindresorhus/find-up

GitHub
1 watchersOpen source

Last release: 8 months ago

find-up is a Node.js utility that finds a file or directory by searching upward through parent directories (and also supports searching downward through descendant directories via findDown). It returns the first matching path, or all matches for the “multiple” APIs, which is useful for locating config files, project roots, or other nearby filesystem artifacts.

Project status

  • Actively maintained, with a recent upstream push on 2025-09-16 and a major update (v8.0.0) on the same date.
  • Update cadence appears steady but not rapid, with major updates in 2022 (v6.3.0), 2023 (v7.0.0), and 2025 (v8.0.0).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v8.0.0

    8 months ago

    v8.0.0 is a major release of find-up that raises the minimum Node.js version to 20 and adds descendant search capabilities via new findDown and findDownSync APIs. It also introduces a `type: 'both'` option, and stops re-exporting `path-exists` helpers from this package.

    BreakingFeatures
  • v7.0.0

    11/16/2023

    v7.0.0 bumps the minimum supported Node.js version to 18 and updates URL handling for the stopAt option. The release also updates internal path handling by switching URL-to-path conversion to unicorn-magic and bumps some dependencies and tooling.

    BreakingFeatures
  • v6.3.0

    2/8/2022

    v6.3.0 adds support for passing a WHATWG URL object as the `cwd` option for find-up functions. The implementation converts URL instances to filesystem paths using `fileURLToPath`, and the README and TypeScript type tests are updated accordingly.

    Features
  • v6.2.0

    10/7/2021

    v6.2.0 introduces a new API, findUpMultiple (async) and findUpMultipleSync (sync), which walk up parent directories and return all matching paths as an array. The release notes only mention the addition, not any changes to existing functions’ behavior.

    Features
  • v6.1.0

    9/26/2021

    v6.1.0 adds a new `stopAt` option to limit how far `findUp` and `findUpSync` walk up the directory tree. The release notes mention only this option addition.

    Features
  • v6.0.0

    8/26/2021

    v6.0.0 of find-up is a major release that switches the package to pure ESM and replaces the CommonJS default export with named exports. It also bumps runtime dependencies (locate-path, path-exists) and updates TypeScript typings and tests accordingly.

    Breaking
  • v5.0.0

    8/11/2020

    v5.0.0 is a major release of find-up. The only documented change in the release notes is a breaking requirement to use Node.js 10+, but the diff also shows dependency upgrades and TypeScript declaration changes.

    Breaking
  • v4.1.0

    6/17/2019

    v4.1.0 adds a new API to check whether a file or directory exists while keeping the existing findUp walking behavior unchanged. It introduces both async `findUp.exists()` and sync `findUp.sync.exists()`, wiring them to the `path-exists` dependency.

    Features
  • v4.0.0

    5/12/2019

    v4.0.0 introduces new path matching capabilities (including a matcher function) and adds TypeScript definitions. It also includes several breaking behavior changes, notably the minimum supported Node.js version and a change in return value when a path cannot be found.

    BreakingFeatures