Skip to content

Commit fa3b536

Browse files
committed
Bumping graphlib version for release
1 parent 63d49aa commit fa3b536

File tree

5 files changed

+41
-41
lines changed

5 files changed

+41
-41
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
"test/**"
2121
],
2222
"dependencies": {
23-
"@dagrejs/graphlib": "2.2.3"
23+
"@dagrejs/graphlib": "2.2.4"
2424
}
2525
}

dist/dagre.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -3041,7 +3041,7 @@ function components(g) {
30413041
var cmpt;
30423042

30433043
function dfs(v) {
3044-
if (visited.hasOwnProperty(v)) return;
3044+
if (Object.hasOwn(visited, v)) return;
30453045
visited[v] = true;
30463046
cmpt.push(v);
30473047
g.successors(v).forEach(dfs);
@@ -3098,7 +3098,7 @@ function postOrderDfs(v, navigation, visited, acc) {
30983098
if (curr[1]) {
30993099
acc.push(curr[0]);
31003100
} else {
3101-
if (!visited.hasOwnProperty(curr[0])) {
3101+
if (!Object.hasOwn(visited, curr[0])) {
31023102
visited[curr[0]] = true;
31033103
stack.push([curr[0], true]);
31043104
forEachRight(navigation(curr[0]), w => stack.push([w, false]));
@@ -3111,7 +3111,7 @@ function preOrderDfs(v, navigation, visited, acc) {
31113111
var stack = [v];
31123112
while (stack.length > 0) {
31133113
var curr = stack.pop();
3114-
if (!visited.hasOwnProperty(curr)) {
3114+
if (!Object.hasOwn(visited, curr)) {
31153115
visited[curr] = true;
31163116
acc.push(curr);
31173117
forEachRight(navigation(curr), w => stack.push(w));
@@ -3345,7 +3345,7 @@ function prim(g, weightFunc) {
33453345
var init = false;
33463346
while (pq.size() > 0) {
33473347
v = pq.removeMin();
3348-
if (parents.hasOwnProperty(v)) {
3348+
if (Object.hasOwn(parents, v)) {
33493349
result.setEdge(v, parents[v]);
33503350
} else if (init) {
33513351
throw new Error("Input graph is not connected: " + g);
@@ -3377,7 +3377,7 @@ function tarjan(g) {
33773377
stack.push(v);
33783378

33793379
g.successors(v).forEach(function(w) {
3380-
if (!visited.hasOwnProperty(w)) {
3380+
if (!Object.hasOwn(visited, w)) {
33813381
dfs(w);
33823382
entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);
33833383
} else if (visited[w].onStack) {
@@ -3398,7 +3398,7 @@ function tarjan(g) {
33983398
}
33993399

34003400
g.nodes().forEach(function(v) {
3401-
if (!visited.hasOwnProperty(v)) {
3401+
if (!Object.hasOwn(visited, v)) {
34023402
dfs(v);
34033403
}
34043404
});
@@ -3413,11 +3413,11 @@ function topsort(g) {
34133413
var results = [];
34143414

34153415
function visit(node) {
3416-
if (stack.hasOwnProperty(node)) {
3416+
if (Object.hasOwn(stack, node)) {
34173417
throw new CycleException();
34183418
}
34193419

3420-
if (!visited.hasOwnProperty(node)) {
3420+
if (!Object.hasOwn(visited, node)) {
34213421
stack[node] = true;
34223422
visited[node] = true;
34233423
g.predecessors(node).forEach(visit);
@@ -3474,7 +3474,7 @@ class PriorityQueue {
34743474
* Returns `true` if **key** is in the queue and `false` if not.
34753475
*/
34763476
has(key) {
3477-
return this._keyIndices.hasOwnProperty(key);
3477+
return Object.hasOwn(this._keyIndices, key);
34783478
}
34793479

34803480
/**
@@ -3512,7 +3512,7 @@ class PriorityQueue {
35123512
add(key, priority) {
35133513
var keyIndices = this._keyIndices;
35143514
key = String(key);
3515-
if (!keyIndices.hasOwnProperty(key)) {
3515+
if (!Object.hasOwn(keyIndices, key)) {
35163516
var arr = this._arr;
35173517
var index = arr.length;
35183518
keyIndices[key] = index;
@@ -3660,9 +3660,9 @@ class Graph {
36603660

36613661
constructor(opts) {
36623662
if (opts) {
3663-
this._isDirected = opts.hasOwnProperty("directed") ? opts.directed : true;
3664-
this._isMultigraph = opts.hasOwnProperty("multigraph") ? opts.multigraph : false;
3665-
this._isCompound = opts.hasOwnProperty("compound") ? opts.compound : false;
3663+
this._isDirected = Object.hasOwn(opts, "directed") ? opts.directed : true;
3664+
this._isMultigraph = Object.hasOwn(opts, "multigraph") ? opts.multigraph : false;
3665+
this._isCompound = Object.hasOwn(opts, "compound") ? opts.compound : false;
36663666
}
36673667

36683668
if (this._isCompound) {
@@ -3791,7 +3791,7 @@ class Graph {
37913791
* Complexity: O(1).
37923792
*/
37933793
setNode(v, value) {
3794-
if (this._nodes.hasOwnProperty(v)) {
3794+
if (Object.hasOwn(this._nodes, v)) {
37953795
if (arguments.length > 1) {
37963796
this._nodes[v] = value;
37973797
}
@@ -3824,7 +3824,7 @@ class Graph {
38243824
* Detects whether graph has a node with specified name or not.
38253825
*/
38263826
hasNode(v) {
3827-
return this._nodes.hasOwnProperty(v);
3827+
return Object.hasOwn(this._nodes, v);
38283828
}
38293829

38303830
/**
@@ -3835,7 +3835,7 @@ class Graph {
38353835
*/
38363836
removeNode(v) {
38373837
var self = this;
3838-
if (this._nodes.hasOwnProperty(v)) {
3838+
if (Object.hasOwn(this._nodes, v)) {
38393839
var removeEdge = e => self.removeEdge(self._edgeObjs[e]);
38403840
delete this._nodes[v];
38413841
if (this._isCompound) {
@@ -4113,7 +4113,7 @@ class Graph {
41134113
}
41144114

41154115
var e = edgeArgsToId(this._isDirected, v, w, name);
4116-
if (this._edgeLabels.hasOwnProperty(e)) {
4116+
if (Object.hasOwn(this._edgeLabels, e)) {
41174117
if (valueSpecified) {
41184118
this._edgeLabels[e] = value;
41194119
}
@@ -4178,7 +4178,7 @@ class Graph {
41784178
var e = (arguments.length === 1
41794179
? edgeObjToId(this._isDirected, arguments[0])
41804180
: edgeArgsToId(this._isDirected, v, w, name));
4181-
return this._edgeLabels.hasOwnProperty(e);
4181+
return Object.hasOwn(this._edgeLabels, e);
41824182
}
41834183

41844184
/**
@@ -4384,7 +4384,7 @@ function read(json) {
43844384
}
43854385

43864386
},{"./graph":44}],47:[function(require,module,exports){
4387-
module.exports = '2.2.3';
4387+
module.exports = '2.2.4';
43884388

43894389
},{}]},{},[1])(1)
43904390
});

0 commit comments

Comments
 (0)