@aomex/utility
Advanced tools
Comparing version 0.0.5 to 0.0.6
# @aomex/utility | ||
## 0.0.6 | ||
### Patch Changes | ||
- [`37946d2`](https://github.com/aomex/aomex/commit/37946d2b91a560c851fa21fa327b5b968b794862) Thanks [@geekact](https://github.com/geekact)! - feat(utility): ignore node_modules while searching paths | ||
## 0.0.5 | ||
@@ -4,0 +10,0 @@ |
@@ -18,2 +18,10 @@ export { default as chalk } from 'chalk'; | ||
dot?: boolean; | ||
/** | ||
* Ignore **node_modules** directory and recursive files. Defaults `true` | ||
*/ | ||
ignoreNodeModules?: boolean; | ||
/** | ||
* Ignore all **.d.{ts,mts,cts}** files. Defaults `true` | ||
*/ | ||
ignoreDTS?: boolean; | ||
} | ||
@@ -20,0 +28,0 @@ type PathToFileOptions = string | string[] | Options | Options[]; |
@@ -19,7 +19,15 @@ // src/to-array.ts | ||
opts.map((opt) => { | ||
const { dot, pattern: patterns } = opt; | ||
const { | ||
dot, | ||
pattern: patterns, | ||
ignoreNodeModules = true, | ||
ignoreDTS = true | ||
} = opt; | ||
const ignore = (opt.ignore || []).slice(); | ||
ignoreDTS && ignore.push("**/*.d.{ts,mts,cts}"); | ||
ignoreNodeModules && ignore.push("**/node_modules/**"); | ||
const options = { | ||
nodir: true, | ||
dot, | ||
ignore: (opt.ignore || []).concat("**/*.d.{ts,mts,cts}"), | ||
ignore, | ||
withFileTypes: false | ||
@@ -26,0 +34,0 @@ }; |
{ | ||
"name": "@aomex/utility", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -34,3 +34,5 @@ "type": "module", | ||
}, | ||
"scripts": {} | ||
"scripts": { | ||
"test": "vitest" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12067
113