{"id":28608206,"url":"https://github.com/vfile/vfile-find-down","last_synced_at":"2026-02-25T16:33:45.248Z","repository":{"id":2400383,"uuid":"46452086","full_name":"vfile/vfile-find-down","owner":"vfile","description":"utility to find one or more files by searching the file system downwards","archived":false,"fork":false,"pushed_at":"2024-04-23T15:58:16.000Z","size":132,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-12-20T02:54:48.417Z","etag":null,"topics":["file","find","fs","vfile","vfile-util","virtual"],"latest_commit_sha":null,"homepage":"https://unifiedjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vfile.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"unifiedjs","open_collective":"unified"}},"created_at":"2015-11-18T22:37:23.000Z","updated_at":"2024-04-23T15:58:20.000Z","dependencies_parsed_at":"2022-08-06T12:15:18.112Z","dependency_job_id":"fe5b8a93-81d2-414b-8f40-117f4b22715d","html_url":"https://github.com/vfile/vfile-find-down","commit_stats":{"total_commits":90,"total_committers":3,"mean_commits":30.0,"dds":"0.033333333333333326","last_synced_commit":"10489ff71966208831984cb957b6a69598b80709"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/vfile/vfile-find-down","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-find-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-find-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-find-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-find-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vfile","download_url":"https://codeload.github.com/vfile/vfile-find-down/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfile%2Fvfile-find-down/sbom","scorecard":{"id":919468,"data":{"date":"2025-08-11","repo":{"name":"github.com/vfile/vfile-find-down","commit":"9cccc5532f6782bf47af1da7dae0a0ea2c515fdf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/bb.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/vfile/vfile-find-down/bb.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/vfile/vfile-find-down/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/vfile/vfile-find-down/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/vfile/vfile-find-down/main.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/bb.yml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/vfile/.github/security.md:1","Info: Found linked content: github.com/vfile/.github/security.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/vfile/.github/security.md:1","Info: Found text in security policy: github.com/vfile/.github/security.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-25T00:20:25.552Z","repository_id":2400383,"created_at":"2025-08-25T00:20:25.552Z","updated_at":"2025-08-25T00:20:25.552Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29730537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file","find","fs","vfile","vfile-util","virtual"],"created_at":"2025-06-11T21:40:16.143Z","updated_at":"2026-02-25T16:33:45.241Z","avatar_url":"https://github.com/vfile.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":[],"sub_categories":[],"readme":"# vfile-find-down\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[vfile][] utility to find files by searching the file system downwards.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`findDown(test[, paths][, callback])`](#finddowntest-paths-callback)\n  * [`findDownAll(test[, paths][, callback])`](#finddownalltest-paths-callback)\n  * [`Assert`](#assert)\n  * [`Callback`](#callback)\n  * [`CallbackAll`](#callbackall)\n  * [`Result`](#result)\n  * [`Test`](#test)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis utility lets you find one or many files downwards.\n\n## When should I use this?\n\nYou can use this utility if you want to find files in, say, a folder.\nOne example is all markdown files.\nIf you instead want to find files upwards, such as config files, you can use\n[`vfile-find-up`][vfile-find-up].\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16), install with [npm][]:\n\n```sh\nnpm install vfile-find-down\n```\n\n## Use\n\n```js\nimport {findDown} from 'vfile-find-down'\n\nconsole.log(await findDown('.md'))\n```\n\nYields:\n\n```js\nVFile {\n  cwd: '/Users/tilde/Projects/oss/vfile-find-down',\n  data: {},\n  history: [ '/Users/tilde/Projects/oss/vfile-find-down/readme.md' ],\n  messages: []\n}\n```\n\n## API\n\nThis package exports the identifiers\n[`findDown`][api-find-down] and\n[`findDownAll`][api-find-down-all].\nThere is no default export.\n\n### `findDown(test[, paths][, callback])`\n\nFind the first file or folder downwards.\n\n\u003e 👉 **Note**: files are not read (their `value` is not populated).\n\u003e use [`to-vfile`][to-vfile] for that.\n\n###### Signatures\n\n* `(test[, paths], callback) =\u003e undefined`\n* `(test[, paths]) =\u003e Promise\u003cVFile\u003e`\n\n###### Parameters\n\n* `test` ([`Test`][api-test])\n  — things to search for\n* `paths` (`Array\u003cURL | string\u003e | URL | string`, default: `process.cwd()`)\n  — places to search from\n* `callback` ([`Callback`][api-callback], optional)\n  — callback called when done\n\n###### Returns\n\nNothing when `callback` is given (`undefined`), otherwise a promise that\nresolves to a file ([`VFile`][vfile] or `undefined`).\n\n### `findDownAll(test[, paths][, callback])`\n\nFind files or folders downwards.\n\n\u003e 👉 **Note**: files are not read (their `value` is not populated).\n\u003e use [`to-vfile`][to-vfile] for that.\n\n###### Signatures\n\n* `(test[, paths], callback) =\u003e undefined`\n* `(test[, paths]) =\u003e Promise\u003cArray\u003cVFile\u003e\u003e`\n\n###### Parameters\n\n* `test` ([`Test`][api-test])\n  — things to search for\n* `paths` (`Array\u003cURL | string\u003e | URL | string`, default: `process.cwd()`)\n  — places to search from\n* `callback` ([`CallbackAll`][api-callback-all], optional)\n  — callback called when done\n\n###### Returns\n\nNothing when `callback` is given (`undefined`), otherwise a promise that\nresolves to files ([`Array\u003cVFile\u003e`][vfile]).\n\n### `Assert`\n\nHandle a file (TypeScript type).\n\n###### Parameters\n\n* `file` ([`VFile`][vfile])\n  — file to handle\n* `stats` ([`Stats`][stats])\n  — stats from `fs.stat`\n\n###### Returns\n\nHow to handle this file ([`Result`][api-result], optional).\n\n### `Callback`\n\nCallback called when done finding one file (TypeScript type).\n\n###### Parameters\n\n* `error` (`Error` or `undefined`)\n  — error; errors are currently never passed\n* `file` ([`VFile`][vfile] or `undefined`)\n  — file\n\n###### Returns\n\nNothing (`undefined`).\n\n### `CallbackAll`\n\nCallback called when done (TypeScript type).\n\n###### Parameters\n\n* `error` (`Error` or `undefined`)\n  — error; errors are currently never passed\n* `files` ([`Array\u003cVFile\u003e`][vfile])\n  — files\n\n###### Returns\n\nNothing (`undefined`).\n\n### `Result`\n\nWhat to do when collecting a file or folder (TypeScript type).\n\n###### Fields\n\n* `break` (`boolean`, default: `false`)\n  — stop searching after this file or folder\n* `include` (`boolean`, default: `false`)\n  — include this file or folder\n* `skip` (`boolean`, default: `false`)\n  — do not search inside this folder\n\n### `Test`\n\nThings to search for (TypeScript type).\n\nFor strings, the `basename` or `extname` of files must match them and\nhidden folders and `node_modules` will not be searched.\nFor arrays, any test in them must match.\n\n###### Type\n\n```ts\ntype Test = Array\u003cAssert | string\u003e | Assert | string\n```\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types\n[`Assert`][api-assert],\n[`Callback`][api-callback],\n[`CallbackAll`][api-callback-all],\n[`Result`][api-result], and\n[`Test`][api-test].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `vfile-find-down@^7`,\ncompatible with Node.js 16.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`vfile/.github`][health] for ways to\nget started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/vfile/vfile-find-down/workflows/main/badge.svg\n\n[build]: https://github.com/vfile/vfile-find-down/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/vfile/vfile-find-down.svg\n\n[coverage]: https://codecov.io/github/vfile/vfile-find-down\n\n[downloads-badge]: https://img.shields.io/npm/dm/vfile-find-down.svg\n\n[downloads]: https://www.npmjs.com/package/vfile-find-down\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/vfile/vfile/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[typescript]: https://www.typescriptlang.org\n\n[contributing]: https://github.com/vfile/.github/blob/main/contributing.md\n\n[support]: https://github.com/vfile/.github/blob/main/support.md\n\n[health]: https://github.com/vfile/.github\n\n[coc]: https://github.com/vfile/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[vfile]: https://github.com/vfile/vfile\n\n[to-vfile]: https://github.com/vfile/to-vfile\n\n[vfile-find-up]: https://github.com/vfile/vfile-find-up\n\n[stats]: https://nodejs.org/api/fs.html#fs_class_fs_stats\n\n[api-find-down-all]: #finddownalltest-paths-callback\n\n[api-find-down]: #finddowntest-paths-callback\n\n[api-assert]: #assert\n\n[api-callback]: #callback\n\n[api-callback-all]: #callbackall\n\n[api-result]: #result\n\n[api-test]: #test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfile%2Fvfile-find-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvfile%2Fvfile-find-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfile%2Fvfile-find-down/lists"}