New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/graph

Package Overview
Dependencies
Maintainers
1
Versions
563
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/graph - npm Package Compare versions

Comparing version 2.0.2-nightly.2569 to 2.0.2-nightly.2571

4

lib/ContentGraph.js

@@ -68,2 +68,6 @@ "use strict";

addNodeByContentKeyIfNeeded(contentKey, node) {
return this.hasContentKey(contentKey) ? this.getNodeIdByContentKey(contentKey) : this.addNodeByContentKey(contentKey, node);
}
getNodeByContentKey(contentKey) {

@@ -70,0 +74,0 @@ let nodeId = this._contentKeyToNodeId.get(contentKey);

@@ -341,2 +341,12 @@ "use strict";

topoSort() {
let sorted = [];
this.traverse({
exit: nodeId => {
sorted.push(nodeId);
}
});
return sorted.reverse();
}
findAncestor(nodeId, fn) {

@@ -343,0 +353,0 @@ let res = null;

4

package.json
{
"name": "@parcel/graph",
"version": "2.0.2-nightly.2569+68ceb558",
"version": "2.0.2-nightly.2571+588bf4c0",
"description": "Blazing fast, zero configuration web application bundler",

@@ -25,3 +25,3 @@ "license": "MIT",

},
"gitHead": "68ceb5581497cb336e82002fafcec53fb6cfc084"
"gitHead": "588bf4c0d6d9dac65a9bf89bf734d7684b523ca2"
}

@@ -65,2 +65,8 @@ // @flow strict-local

addNodeByContentKeyIfNeeded(contentKey: ContentKey, node: TNode): NodeId {
return this.hasContentKey(contentKey)
? this.getNodeIdByContentKey(contentKey)
: this.addNodeByContentKey(contentKey, node);
}
getNodeByContentKey(contentKey: ContentKey): ?TNode {

@@ -67,0 +73,0 @@ let nodeId = this._contentKeyToNodeId.get(contentKey);

@@ -406,2 +406,12 @@ // @flow strict-local

topoSort(): Array<NodeId> {
let sorted: Array<NodeId> = [];
this.traverse({
exit: nodeId => {
sorted.push(nodeId);
},
});
return sorted.reverse();
}
findAncestor(nodeId: NodeId, fn: (nodeId: NodeId) => boolean): ?NodeId {

@@ -408,0 +418,0 @@ let res = null;

@@ -86,7 +86,10 @@ // @flow strict-local

let graph = new Graph();
let rootNode = graph.addNode('root');
graph.setRootNodeId(rootNode);
let nodeA = graph.addNode('a');
let nodeB = graph.addNode('b');
let nodeC = graph.addNode('c');
graph.addEdge(nodeA, nodeB);
graph.addEdge(nodeA, nodeC, 1);
graph.addEdge(rootNode, nodeB);
graph.addEdge(nodeB, nodeC, 1);
assert(graph.isOrphanedNode(nodeA));

@@ -105,2 +108,3 @@ assert(!graph.isOrphanedNode(nodeB));

let nodeA = graph.addNode('a');
graph.setRootNodeId(nodeA);
let nodeB = graph.addNode('b');

@@ -145,2 +149,3 @@ let nodeC = graph.addNode('c');

let nodeA = graph.addNode('a');
graph.setRootNodeId(nodeA);
let nodeB = graph.addNode('b');

@@ -274,2 +279,3 @@ let nodeC = graph.addNode('c');

let nodeA = graph.addNode('a');
graph.setRootNodeId(nodeA);
let nodeB = graph.addNode('b');

@@ -276,0 +282,0 @@ let nodeC = graph.addNode('c');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc