@parcel/graph 2.6.3-nightly.2755 → 2.6.3-nightly.2758

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Graph.js CHANGED
@@ -344,13 +344,13 @@ class Graph {
344
344
  return null;
345
345
  }
346
346
 
347
- topoSort() {
347
+ topoSort(type) {
348
348
  let sorted = [];
349
349
  this.traverse({
350
350
  exit: nodeId => {
351
351
  sorted.push(nodeId);
352
352
  }
353
- });
353
+ }, null, type);
354
354
  return sorted.reverse();
355
355
  }
356
356
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/graph",
3
- "version": "2.6.3-nightly.2755+e10fcfc1e",
3
+ "version": "2.6.3-nightly.2758+99cf50510",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -20,8 +20,8 @@
20
20
  "node": ">= 12.0.0"
21
21
  },
22
22
  "dependencies": {
23
- "@parcel/utils": "2.0.0-nightly.1132+e10fcfc1e",
23
+ "@parcel/utils": "2.0.0-nightly.1135+99cf50510",
24
24
  "nullthrows": "^1.1.1"
25
25
  },
26
- "gitHead": "e10fcfc1e8b71222da90978fb87f1b68e207473e"
26
+ "gitHead": "99cf50510995112722f76f115dc7f2fd21587f34"
27
27
  }
package/src/Graph.js CHANGED
@@ -407,13 +407,17 @@ export default class Graph<TNode, TEdgeType: number = 1> {
407
407
  return null;
408
408
  }
409
409
 
410
- topoSort(): Array<NodeId> {
410
+ topoSort(type?: TEdgeType): Array<NodeId> {
411
411
  let sorted: Array<NodeId> = [];
412
- this.traverse({
413
- exit: nodeId => {
414
- sorted.push(nodeId);
412
+ this.traverse(
413
+ {
414
+ exit: nodeId => {
415
+ sorted.push(nodeId);
416
+ },
415
417
  },
416
- });
418
+ null,
419
+ type,
420
+ );
417
421
  return sorted.reverse();
418
422
  }
419
423