
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
gulp-fileinfo
Advanced tools
Reads the names of the files that are coming through the pipe or any other properties that you want.
#gulp-fileinfo
| Package | gulp-fileinfo |
| Description | Reads the names of the vynil files that are coming through the pipe or any other properties that you want (See the Vinyl docs for a full list of properties). You can either show the file list in the console or get an array with the list of files. |
| Node Version | >= 0.10 |
var gulp = require('gulp');
var fileinfo = require('gulp-fileinfo');
gulp.task('default', function() {
return gulp
.src('./lib/*.js')
.pipe(fileinfo());
});
This will output to the console the list of files coming through the pipe.
If you need to get the list of files in an array, you can pass a callback function as part of the options, that function will receive the list of files in an array as a paramenter
var fileinfo = require('gulp-fileinfo');
gulp.task('default', function() {
var doSomethingWithTheFilesList = function (filesList){
//do something with the filesList array here
}
gulp
.src('./lib/*.js')
.pipe(fileinfo({ callback: doSomethingWithTheFilesList }));
});
The fileList variable will be an array of strings containing the name of the files in the pipe.
By default, the gulp only reads the relative property of the files. If you want something different, you can use:
Specifies the name of the property you want to read (instead of reading the relative property) from the files in the pipe, like this:
{"properties": "path"}
If you want to read more than one properties at once, you need to set the properties property as an array of all the properties you want to read.
{"properties": ["relative","path","basename"]}
When the properties value is an array, the filesList array will contain objects (instead of strings), for instance:
[{"relative":"index.js",
"path":"path/to/index.js",
"basename":"" }]
You can get a full list of the Vinyl files properties here: https://github.com/gulpjs/vinyl
Callback function that will be invoked once all the files have been read. It receives as a parameter the filesList array containing all the info read from the files in the pipe.
FAQs
Reads the names of the files that are coming through the pipe or any other properties that you want.
We found that gulp-fileinfo 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.