Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Watch files in a directory for changes/updates.
I know that this might not be the best way to do this but it seems to work for right now so I am putting it out there. Simply create a file to execte in the terminal (example below) and point it at the directory you would like to watch. When a file is changed the callback you pass in will execute and you can do whatever you want with the change.
I have started using this in conjunction with Grunt.js so I don't have to grunt with each change to my files while developing.
#!/usr/bin/env node
/*jshint strict:false*/
/*globals require*/
var exec = require('child_process').exec
, sherpa = require("sherpa")
function notify (filename, command) {
puts(null, "\nChange made to: " + filename);
command && exec(command, puts);
}
sherpa("src", 300, function (filename, curr, prev) {
if (+curr.mtime !== +prev.mtime) {
switch (/.*\.(.*)$/.exec(filename)[1]) {
case "js":
notify(filename, "grunt js");
break;
case "less":
notify(filename, "grunt less");
break;
default:
notify(filename + " but no action was taken");
break;
}
}
});
FAQs
Watch files in a directory for changes/updates
The npm package sherpa receives a total of 1 weekly downloads. As such, sherpa popularity was classified as not popular.
We found that sherpa 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.