Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@parcel/graph
Advanced tools
Blazing fast, zero configuration web application bundler
@parcel/graph is a utility package for creating and managing graphs, which are data structures consisting of nodes and edges. It is particularly useful for dependency management, task scheduling, and other scenarios where relationships between entities need to be represented and traversed.
Creating a Graph
This feature allows you to create a new graph instance. The graph can then be populated with nodes and edges.
const { Graph } = require('@parcel/graph');
const graph = new Graph();
console.log(graph);
Adding Nodes
This feature allows you to add nodes to the graph. Nodes are the entities or points in the graph.
const { Graph } = require('@parcel/graph');
const graph = new Graph();
graph.addNode('A');
graph.addNode('B');
console.log(graph.nodes);
Adding Edges
This feature allows you to add edges between nodes in the graph. Edges represent the relationships or connections between nodes.
const { Graph } = require('@parcel/graph');
const graph = new Graph();
graph.addNode('A');
graph.addNode('B');
graph.addEdge('A', 'B');
console.log(graph.edges);
Traversing the Graph
This feature allows you to traverse the graph starting from a specific node. Traversal can be used to explore the graph and find paths or dependencies.
const { Graph } = require('@parcel/graph');
const graph = new Graph();
graph.addNode('A');
graph.addNode('B');
graph.addEdge('A', 'B');
const traversal = graph.traverse('A');
console.log(traversal);
Graphlib is a library for creating and manipulating directed graphs in JavaScript. It provides similar functionalities to @parcel/graph, such as adding nodes and edges, and traversing the graph. However, it is more focused on general-purpose graph manipulation rather than being integrated into a build tool like Parcel.
Cytoscape is a graph theory library for visualizing and analyzing graphs. It offers a wide range of features for graph manipulation and visualization, making it more suitable for applications that require interactive graph displays. Compared to @parcel/graph, Cytoscape is more feature-rich in terms of visualization capabilities.
D3-graphviz is a library that integrates Graphviz with D3.js to create and manipulate graphs. It is particularly useful for visualizing complex graphs and provides extensive customization options. While @parcel/graph focuses on graph data structures and traversal, d3-graphviz excels in rendering and visualizing graphs.
FAQs
Blazing fast, zero configuration web application bundler
The npm package @parcel/graph receives a total of 366,876 weekly downloads. As such, @parcel/graph popularity was classified as popular.
We found that @parcel/graph demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.