![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Blazing Fast matching file finder for the given regex pattern.
This library neither loads up the CPU nor does the job sequentially, instead under the hood, it uses lib-promise-pool with concurrency = 10(default). Hence 10 directories are searched concurrently.
Please visit this wiki for V2.x Docs
npm install file-regex -S
Assume the below folder structure:
- file1.js
- file2.js
- file3.ts
+ dir1
- file4.ts
- file5.js
+ dir2
- file6.js
+ dir3
+ dir4
test1.txt
import FindFiles from 'file-regex'
const result = await FindFiles(__dirname, /\.js$/);
console.log(result)
// [{dir: __dirname, file: file1.js}, {dir: __dirname, file: file2.js}]
/\dir3.*\.js$/g
):import FindFiles from 'file-regex'
const result = await FindFiles(__dirname, /\/dir1\/.*?\.js$/g, 5);
console.log(result)
// [{dir: __dirname, file: file5.js}]
The above example doesn't match the files in other directories except dir1
FindFiles(dir, pattern, depth = 0, options = {concurrency: 10})
Param | Description |
---|---|
dir | Base Directory where the search would begin |
pattern | Regex-Pattern for testing the matching files. If a global regex (for ex: /\/dir3/g ) is used, then the entire path will be checked for a match |
depth | Number of recursions into the directories upto which the file search shall proceed. Defaults to 0 |
options | Options for controlling execution |
options.concurrency | Number of concurrent folder search. Defaults to 10 |
I know this is very small module, but any improvements or pull request are always welcome.
FAQs
Find files by using regex
The npm package file-regex receives a total of 579 weekly downloads. As such, file-regex popularity was classified as not popular.
We found that file-regex 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.