Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@lerna/changed
Advanced tools
List local packages that have changed since the last tagged release
@lerna/changed is a part of the Lerna monorepo management toolset. It is used to list local packages that have changed since the last tagged release. This is particularly useful in monorepo setups where you need to identify which packages have been modified and need to be published.
List Changed Packages
This feature allows you to list all the packages that have changed since the last tagged release. The code sample uses Node.js to execute the `lerna changed` command and prints the list of changed packages.
const { execSync } = require('child_process');
const changedPackages = execSync('npx lerna changed').toString();
console.log(changedPackages);
Filter by Scope
This feature allows you to filter the list of changed packages by a specific scope. The code sample demonstrates how to list changed packages that match the given scope.
const { execSync } = require('child_process');
const changedPackages = execSync('npx lerna changed --scope my-package').toString();
console.log(changedPackages);
Include Private Packages
This feature allows you to include private packages in the list of changed packages. The code sample shows how to list all changed packages, including those that are private.
const { execSync } = require('child_process');
const changedPackages = execSync('npx lerna changed --include-private').toString();
console.log(changedPackages);
Changesets is a tool for managing versioning and changelogs with a focus on monorepos. It allows you to track changes across multiple packages and generate changelogs. Compared to @lerna/changed, Changesets offers more comprehensive versioning and changelog management features.
Lerna is a tool for managing JavaScript projects with multiple packages. While @lerna/changed is a specific command within Lerna, the full Lerna toolset offers a wide range of functionalities including bootstrapping, linking dependencies, and publishing packages. It is more comprehensive compared to the single-purpose @lerna/changed.
Nx is a smart, fast, and extensible build system with first-class monorepo support and powerful integrations. It provides advanced features for managing monorepos, including affected package detection, which is similar to what @lerna/changed offers. However, Nx also includes additional features like task running and caching.
lerna changed
List local packages that have changed since the last tagged release
Install lerna for access to the lerna
CLI.
The output of lerna changed
is a list of packages that would be the subjects of the next lerna version
or lerna publish
execution.
$ lerna changed
package-1
package-2
Note: lerna.json
configuration for lerna publish
and lerna version
also affects
lerna changed
, e.g. command.publish.ignoreChanges
.
lerna changed
supports all of the flags supported by lerna ls
:
Unlike lerna ls
, however, lerna changed
does not support filter options, as filtering is not supported by lerna version
or lerna publish
.
lerna changed
supports the following options of lerna version
(the others are irrelevant):
FAQs
List local packages that have changed since the last tagged release
We found that @lerna/changed 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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.