Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@changesets/get-dependents-graph
Advanced tools
@changesets/get-dependents-graph is a utility package that helps in determining the dependency graph of a set of packages. It is particularly useful in monorepos where you need to understand the relationships between different packages and their dependents.
Get Dependents Graph
This feature allows you to get the dependents graph of a set of packages. The code sample demonstrates how to use the `getDependentsGraph` function to determine which packages depend on which other packages.
const { getDependentsGraph } = require('@changesets/get-dependents-graph');
const packages = [
{ name: 'package-a', version: '1.0.0', dependencies: { 'package-b': '^1.0.0' } },
{ name: 'package-b', version: '1.0.0', dependencies: {} }
];
const dependentsGraph = getDependentsGraph(packages);
console.log(dependentsGraph);
Lerna is a popular tool for managing JavaScript projects with multiple packages. It offers a wide range of functionalities including dependency graph management, versioning, and publishing. Compared to @changesets/get-dependents-graph, Lerna provides a more comprehensive suite of tools for monorepo management.
Nx is a set of extensible dev tools for monorepos, which helps in managing dependencies, building, and testing. It offers advanced features like dependency graph visualization and affected project detection. While @changesets/get-dependents-graph focuses on dependency graph, Nx provides a broader set of functionalities for monorepo development.
Small helper utility extracted from bolt to get a graph of relationships between packages.
import { getDependentsGraph } from "@changesets/get-dependents-graph";
import { getPackages } from "@manypkg/get-packages";
let { graph, valid } = getDependentsGraph(await getPackages(cwd));
Mostly published for use in changesets
FAQs
Get the graph of dependents in a monorepo
The npm package @changesets/get-dependents-graph receives a total of 703,120 weekly downloads. As such, @changesets/get-dependents-graph popularity was classified as popular.
We found that @changesets/get-dependents-graph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.