Gathering detailed insights and metrics for vinyl-paths
Gathering detailed insights and metrics for vinyl-paths
Gathering detailed insights and metrics for vinyl-paths
Gathering detailed insights and metrics for vinyl-paths
npm install vinyl-paths
Typescript
Module System
Min. Node Version
Node Version
NPM Version
82
Supply Chain
82.6
Quality
75.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
13,037,302
Last Day
1,199
Last Week
5,982
Last Month
58,149
Last Year
997,361
61 Stars
20 Commits
5 Forks
7 Watching
1 Branches
4 Contributors
Minified
Minified + Gzipped
Latest Version
5.0.0
Package Id
vinyl-paths@5.0.0
Unpacked Size
3.97 kB
Size
2.04 kB
File Count
4
NPM Version
8.3.2
Node Version
14.19.3
Cumulative downloads
Total Downloads
Last day
-12.8%
1,199
Compared to previous day
Last week
-53.2%
5,982
Compared to previous week
Last month
-23.5%
58,149
Compared to previous month
Last year
-29%
997,361
Compared to previous year
1
Get the file paths in a
vinyl
stream
Useful when you need to use the file paths from a Gulp pipeline in an async Node.js package.
Simply pass an async function such as del
and this package will provide each path in the stream as the first argument.
1npm install vinyl-paths
1// gulpfile.js 2import gulp from 'gulp'; 3import stripDebug from 'gulp-strip-debug'; 4import del from 'del'; 5import vinylPaths from 'vinyl-paths'; 6 7// Log file paths in the stream 8export function log() { 9 return gulp.src('app/*') 10 .pipe(stripDebug()) 11 .pipe(vinylPaths(async paths => { 12 console.log('Paths:', paths); 13 }); 14} 15 16// Delete files in the stream 17export function delete() { 18 return gulp.src('app/*') 19 .pipe(stripDebug()) 20 .pipe(vinylPaths(del)); 21} 22 23// Or if you need to use the paths after the pipeline 24export function delete2() { 25 return new Promise((resolve, reject) => { 26 const vp = vinylPaths(); 27 28 gulp.src('app/*') 29 .pipe(vp) 30 .pipe(gulp.dest('dist')) 31 .on('end', async () => { 32 try { 33 await del(vp.paths); 34 resolve(); 35 } catch (error) { 36 reject(error); 37 } 38 }); 39 }); 40}
You should only use a vanilla Node.js package like this if you're already using other plugins in the pipeline, otherwise just use the module directly as gulp.src
is costly. Remember that Gulp tasks can return promises as well as streams!
The optional callback will receive a file path for every file and is expected to return a promise. An array of the file paths so far is available as a paths
property on the stream.
file.path
changeNo vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/20 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More