
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@researchgate/file-processor
Advanced tools
Node.js utility for mass-processing files in parallel.
Files are handled in parallel running workers. In order to use the library you need 2 modules.
Must export single function, accepting fileName and callback. This function
must process the file and call the callback when it is done. Function can be
asynchronous.
module.exports = function (fileName, callback) {
const result = doExpensiveProcessing(fileName);
callback(null, result);
};
Must use FileProcessor class and provide a it one or more glob patterns and
path to worker module. Each file, matching the pattern will be processed by
worker module.
const FileProcessor = require('@researchgate/file-processor');
const processor = new FileProcessor(
['path/to/some/files/*.txt', 'some/other/path/*.js'],
require.resolve('./worker')
);
processor.on('processed', (fileName, result) => {
console.log(`result for ${fileName}: ${result}`);
});
FileProcessor instace emits following events:
queued - file is queued for processing.
Arguments:
fileNameprocessed - file is successfully processed by worker.
Arguments:
fileNameresult - the result, returned by worker moduleerror - worker failed to process the file
Arguments:
errorallQueued - all files, matching the pattern are queued for processing.
Arguments:
stats - object with the following field
queuedCount - total number of queued filesprocessedCount - total number of files which are already processedend - all files are processed.
FAQs
Run parallel tasks on a multiple files
The npm package @researchgate/file-processor receives a total of 50 weekly downloads. As such, @researchgate/file-processor popularity was classified as not popular.
We found that @researchgate/file-processor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.