files-from-path
Advanced tools
Comparing version
{ | ||
"name": "files-from-path", | ||
"version": "1.1.4", | ||
"version": "1.1.5-rc.0", | ||
"description": "Expand paths to file-like objects with name, readable stream and size.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -43,2 +43,3 @@ import gracefulfs from 'graceful-fs' | ||
* @param {FileSystem} [options.fs] Custom FileSystem implementation. | ||
* @param {(fullPath: string) => boolean} [options.filter] filter discovered files | ||
* @returns {Promise<FileLike[]>} | ||
@@ -87,2 +88,3 @@ */ | ||
* @param {FileSystem} [options.fs] Custom FileSystem implementation. | ||
* @param {(fullPath: string) => boolean} [options.filter] filter discovered files | ||
* @returns {AsyncIterableIterator<FileLike>} | ||
@@ -98,3 +100,3 @@ */ | ||
if (!hidden && path.basename(filepath).startsWith('.')) return false | ||
return true | ||
return !options || !options.filter || options.filter(filepath) | ||
} | ||
@@ -101,0 +103,0 @@ |
@@ -7,2 +7,3 @@ /** | ||
* @param {FileSystem} [options.fs] Custom FileSystem implementation. | ||
* @param {(fullPath: string) => boolean} [options.filter] filter discovered files | ||
* @returns {Promise<FileLike[]>} | ||
@@ -14,2 +15,3 @@ */ | ||
fs?: FileSystem | undefined; | ||
filter?: ((fullPath: string) => boolean) | undefined; | ||
} | undefined): Promise<FileLike[]>; | ||
@@ -16,0 +18,0 @@ export type FileLike = Pick<File, 'stream' | 'name' | 'size'>; |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
22376
1.75%172
2.38%0
-100%2
100%