Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
act-on-modules
Advanced tools
Library to perform an action on all user-defined modules under a given directory
#Purpose
This project is provides a utility that iterates recursively in a given directory, skips over node_module directories and stops iterating recursively in any directory containing a package.json file to execute a user-defined action with the directory as an argument.
#Usage
##Sync
const actOnModules = require('act-on-modules');
actOnModules.sync('SomePathToADirectory', (directory) => {
//put your logic here
});
##Async with callback
const actOnModules = require('act-on-modules');
actOnModules('SomePathToADirectory',
(directory) => {
//put your logic here
},
(err) => {
//This is the callback once everything is done
//Be mindful that asynchronous operations in your custom action might not have completed
//You'll have to add an additional layer of logic with nimble/async or promises if you want asynchronous flow control
});
##Async with promise
const actOnModules = require('act-on-modules');
actOnModules('SomePathToADirectory',
(directory) => {
//put your logic here
}).then(() => {
//This is the callback once everything is done without any error
//Be mindful that asynchronous operations in your custom action might not have completed
//You'll have to add an additional layer of logic with nimble/async or promises if you want asynchronous flow control
}).catch((err) => {
//This is the callback if an error was encountered
//Again, be mindful that asynchronous operations in your custom action might not have completed
//You'll have to add an additional layer of logic with nimble/async or promises if you want asynchronous flow control
};
FAQs
Library to perform an action on all user-defined modules under a given directory
We found that act-on-modules 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.