
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
@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):
6.6.2 (2023-05-04)
FAQs
List local packages that have changed since the last tagged release
The npm package @lerna/changed receives a total of 745,346 weekly downloads. As such, @lerna/changed popularity was classified as popular.
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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.