Skip to content

Commit

Permalink
Bumping graphlib version for release
Browse files Browse the repository at this point in the history
  • Loading branch information
rustedgrail committed Aug 15, 2024
1 parent 63d49aa commit fa3b536
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"test/**"
],
"dependencies": {
"@dagrejs/graphlib": "2.2.3"
"@dagrejs/graphlib": "2.2.4"
}
}
38 changes: 19 additions & 19 deletions dist/dagre.js
Original file line number Diff line number Diff line change
Expand Up @@ -3041,7 +3041,7 @@ function components(g) {
var cmpt;

function dfs(v) {
if (visited.hasOwnProperty(v)) return;
if (Object.hasOwn(visited, v)) return;
visited[v] = true;
cmpt.push(v);
g.successors(v).forEach(dfs);
Expand Down Expand Up @@ -3098,7 +3098,7 @@ function postOrderDfs(v, navigation, visited, acc) {
if (curr[1]) {
acc.push(curr[0]);
} else {
if (!visited.hasOwnProperty(curr[0])) {
if (!Object.hasOwn(visited, curr[0])) {
visited[curr[0]] = true;
stack.push([curr[0], true]);
forEachRight(navigation(curr[0]), w => stack.push([w, false]));
Expand All @@ -3111,7 +3111,7 @@ function preOrderDfs(v, navigation, visited, acc) {
var stack = [v];
while (stack.length > 0) {
var curr = stack.pop();
if (!visited.hasOwnProperty(curr)) {
if (!Object.hasOwn(visited, curr)) {
visited[curr] = true;
acc.push(curr);
forEachRight(navigation(curr), w => stack.push(w));
Expand Down Expand Up @@ -3345,7 +3345,7 @@ function prim(g, weightFunc) {
var init = false;
while (pq.size() > 0) {
v = pq.removeMin();
if (parents.hasOwnProperty(v)) {
if (Object.hasOwn(parents, v)) {
result.setEdge(v, parents[v]);
} else if (init) {
throw new Error("Input graph is not connected: " + g);
Expand Down Expand Up @@ -3377,7 +3377,7 @@ function tarjan(g) {
stack.push(v);

g.successors(v).forEach(function(w) {
if (!visited.hasOwnProperty(w)) {
if (!Object.hasOwn(visited, w)) {
dfs(w);
entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);
} else if (visited[w].onStack) {
Expand All @@ -3398,7 +3398,7 @@ function tarjan(g) {
}

g.nodes().forEach(function(v) {
if (!visited.hasOwnProperty(v)) {
if (!Object.hasOwn(visited, v)) {
dfs(v);
}
});
Expand All @@ -3413,11 +3413,11 @@ function topsort(g) {
var results = [];

function visit(node) {
if (stack.hasOwnProperty(node)) {
if (Object.hasOwn(stack, node)) {
throw new CycleException();
}

if (!visited.hasOwnProperty(node)) {
if (!Object.hasOwn(visited, node)) {
stack[node] = true;
visited[node] = true;
g.predecessors(node).forEach(visit);
Expand Down Expand Up @@ -3474,7 +3474,7 @@ class PriorityQueue {
* Returns `true` if **key** is in the queue and `false` if not.
*/
has(key) {
return this._keyIndices.hasOwnProperty(key);
return Object.hasOwn(this._keyIndices, key);
}

/**
Expand Down Expand Up @@ -3512,7 +3512,7 @@ class PriorityQueue {
add(key, priority) {
var keyIndices = this._keyIndices;
key = String(key);
if (!keyIndices.hasOwnProperty(key)) {
if (!Object.hasOwn(keyIndices, key)) {
var arr = this._arr;
var index = arr.length;
keyIndices[key] = index;
Expand Down Expand Up @@ -3660,9 +3660,9 @@ class Graph {

constructor(opts) {
if (opts) {
this._isDirected = opts.hasOwnProperty("directed") ? opts.directed : true;
this._isMultigraph = opts.hasOwnProperty("multigraph") ? opts.multigraph : false;
this._isCompound = opts.hasOwnProperty("compound") ? opts.compound : false;
this._isDirected = Object.hasOwn(opts, "directed") ? opts.directed : true;
this._isMultigraph = Object.hasOwn(opts, "multigraph") ? opts.multigraph : false;
this._isCompound = Object.hasOwn(opts, "compound") ? opts.compound : false;
}

if (this._isCompound) {
Expand Down Expand Up @@ -3791,7 +3791,7 @@ class Graph {
* Complexity: O(1).
*/
setNode(v, value) {
if (this._nodes.hasOwnProperty(v)) {
if (Object.hasOwn(this._nodes, v)) {
if (arguments.length > 1) {
this._nodes[v] = value;
}
Expand Down Expand Up @@ -3824,7 +3824,7 @@ class Graph {
* Detects whether graph has a node with specified name or not.
*/
hasNode(v) {
return this._nodes.hasOwnProperty(v);
return Object.hasOwn(this._nodes, v);
}

/**
Expand All @@ -3835,7 +3835,7 @@ class Graph {
*/
removeNode(v) {
var self = this;
if (this._nodes.hasOwnProperty(v)) {
if (Object.hasOwn(this._nodes, v)) {
var removeEdge = e => self.removeEdge(self._edgeObjs[e]);
delete this._nodes[v];
if (this._isCompound) {
Expand Down Expand Up @@ -4113,7 +4113,7 @@ class Graph {
}

var e = edgeArgsToId(this._isDirected, v, w, name);
if (this._edgeLabels.hasOwnProperty(e)) {
if (Object.hasOwn(this._edgeLabels, e)) {
if (valueSpecified) {
this._edgeLabels[e] = value;
}
Expand Down Expand Up @@ -4178,7 +4178,7 @@ class Graph {
var e = (arguments.length === 1
? edgeObjToId(this._isDirected, arguments[0])
: edgeArgsToId(this._isDirected, v, w, name));
return this._edgeLabels.hasOwnProperty(e);
return Object.hasOwn(this._edgeLabels, e);
}

/**
Expand Down Expand Up @@ -4384,7 +4384,7 @@ function read(json) {
}

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

},{}]},{},[1])(1)
});
Loading

0 comments on commit fa3b536

Please sign in to comment.