Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@lerna/run-lifecycle
Advanced tools
@lerna/run-lifecycle is a package that allows you to run lifecycle scripts for npm packages within a Lerna-managed monorepo. It helps in executing pre-defined scripts like preinstall, install, postinstall, prepublish, publish, postpublish, etc., across multiple packages in a monorepo setup.
Run Predefined Lifecycle Scripts
This feature allows you to run predefined lifecycle scripts like preinstall, install, postinstall, etc., for a given package. The code sample demonstrates how to run the 'preinstall' script for a package.
const { runLifecycle } = require('@lerna/run-lifecycle');
async function runScript(pkg, script) {
await runLifecycle(pkg, script, {
stdio: 'inherit',
});
}
const pkg = { name: 'my-package', location: '/path/to/package' };
runScript(pkg, 'preinstall');
Custom Script Execution
This feature allows you to run custom scripts defined in the package.json of a given package. The code sample demonstrates how to run a custom script named 'custom-script' for a package.
const { runLifecycle } = require('@lerna/run-lifecycle');
async function runCustomScript(pkg, script) {
await runLifecycle(pkg, script, {
stdio: 'inherit',
scriptShell: '/bin/bash',
});
}
const pkg = { name: 'my-package', location: '/path/to/package' };
runCustomScript(pkg, 'custom-script');
npm-lifecycle is a package that provides the functionality to run lifecycle scripts for npm packages. It is similar to @lerna/run-lifecycle but is not specifically designed for monorepo setups managed by Lerna. It can be used for individual npm packages.
Yarn is a package manager that also supports running lifecycle scripts for packages. While it is not a direct replacement for @lerna/run-lifecycle, it provides similar functionalities in terms of script execution and can be used in monorepo setups with Yarn Workspaces.
pnpm is another package manager that supports running lifecycle scripts. It is known for its efficient handling of node_modules and can be used in monorepo setups. Like Yarn, it provides similar functionalities but is not specifically tailored for Lerna-managed monorepos.
@lerna/run-lifecycle
An internal Lerna tool
You probably shouldn't, at least directly.
Install lerna for access to the lerna
CLI.
3.14.0 (2019-05-14)
npm-lifecycle
dependency to avoid noisy audit warning (ea7c20d)--preserve-commit
option (#2079) (6a7448d)--otp
option (6fcbc36), closes #2076@lerna/run-topologically
(3a8b175)FAQs
An internal Lerna tool
The npm package @lerna/run-lifecycle receives a total of 83,258 weekly downloads. As such, @lerna/run-lifecycle popularity was classified as popular.
We found that @lerna/run-lifecycle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.