![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
vfile-find-up
Advanced tools
Find vfiles by searching the file system upwards.
npm:
npm install vfile-find-up
var findUp = require('vfile-find-up')
findUp.all('package.json', console.log)
Yields:
null [ VFile {
data: {},
messages: [],
history: [ '/Users/tilde/projects/oss/vfile-find-up/package.json' ],
cwd: '/Users/tilde/projects/oss/vfile-find-up' } ]
findUp.all(tests[, path], callback)
Search for tests
upwards. Invokes callback with either an error
or an array of files passing tests
.
Note: Virtual Files are not read (their contents
is not populated).
tests
Things to search for (string|Function|Array.<tests>
).
If a string
is passed in, the basename
or extname
of files
must match it for them to be included.
If an array is passed in, any test must match a given file for it to be included.
Otherwise, they must be function
.
path
Place to searching from (string
, default: process.cwd()
).
callback
Function invoked with all matching files (function cb(err[, files])
).
findUp.one(tests[, path], callback)
Like findUp.all
, but invokes callback
with the first found
file, or null
.
function test(file)
Check whether a virtual file should be included. Invoked with a vfile.
true
or findUp.INCLUDE
— Include the file in the results;findUp.BREAK
— Stop searching for files;The different flags can be combined by using the pipe operator:
findUp.INCLUDE | findUp.BREAK
.
See contributing.md
in vfile/vfile
for ways to get started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
FAQs
vfile utility to find one or more files by searching the file system upwards
The npm package vfile-find-up receives a total of 15,908 weekly downloads. As such, vfile-find-up popularity was classified as popular.
We found that vfile-find-up demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.