@atlaspack/graph 3.5.6-typescript-8a6ec6c8b.0 → 3.5.7-unified-308e6415c.0
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/CHANGELOG.md +7 -0
- package/lib/AdjacencyList.js +1 -2
- package/lib/BitSet.js +4 -11
- package/lib/Graph.js +2 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaspack/graph
|
|
2
2
|
|
|
3
|
+
## 3.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c)]:
|
|
8
|
+
- @atlaspack/feature-flags@2.18.4
|
|
9
|
+
|
|
3
10
|
## 3.5.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/lib/AdjacencyList.js
CHANGED
|
@@ -1359,8 +1359,7 @@ function link(from, to, type, edges, nodes, unloadFactor = DEFAULT_PARAMS.unload
|
|
|
1359
1359
|
// Since the space occupied by deleted edges isn't reclaimed,
|
|
1360
1360
|
// we include them in our count to avoid overflowing the `edges` array.
|
|
1361
1361
|
let deletes = edges.deletes;
|
|
1362
|
-
|
|
1363
|
-
if (edges.getLoad(total) >= 1) {
|
|
1362
|
+
if (edges.getLoad(count + deletes) >= 1) {
|
|
1364
1363
|
if (edges.getLoad(deletes) >= unloadFactor && edges.getLoad(count) < unloadFactor) {
|
|
1365
1364
|
// If we have a significant number of deletes, reclaim the space.
|
|
1366
1365
|
return LinkResult.TooManyDeletes;
|
package/lib/BitSet.js
CHANGED
|
@@ -9,8 +9,7 @@ function ctz32(n) {
|
|
|
9
9
|
if (n === 0) {
|
|
10
10
|
return 32;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
return 31 - Math.clz32(reversed);
|
|
12
|
+
return 31 - Math.clz32(n & -n);
|
|
14
13
|
}
|
|
15
14
|
class BitSet {
|
|
16
15
|
constructor(maxBits) {
|
|
@@ -35,19 +34,13 @@ class BitSet {
|
|
|
35
34
|
return this.bits.length * 32;
|
|
36
35
|
}
|
|
37
36
|
add(bit) {
|
|
38
|
-
|
|
39
|
-
let b = bit & 31;
|
|
40
|
-
this.bits[i] |= 1 << b;
|
|
37
|
+
this.bits[bit >>> 5] |= 1 << (bit & 31);
|
|
41
38
|
}
|
|
42
39
|
delete(bit) {
|
|
43
|
-
|
|
44
|
-
let b = bit & 31;
|
|
45
|
-
this.bits[i] &= ~(1 << b);
|
|
40
|
+
this.bits[bit >>> 5] &= ~(1 << (bit & 31));
|
|
46
41
|
}
|
|
47
42
|
has(bit) {
|
|
48
|
-
|
|
49
|
-
let b = bit & 31;
|
|
50
|
-
return Boolean(this.bits[i] & 1 << b);
|
|
43
|
+
return Boolean(this.bits[bit >>> 5] & 1 << (bit & 31));
|
|
51
44
|
}
|
|
52
45
|
empty() {
|
|
53
46
|
for (let k = 0; k < this.bits.length; k++) {
|
package/lib/Graph.js
CHANGED
|
@@ -324,7 +324,6 @@ class Graph {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
this._visited = visited;
|
|
327
|
-
return;
|
|
328
327
|
}
|
|
329
328
|
|
|
330
329
|
/**
|
|
@@ -507,7 +506,7 @@ class Graph {
|
|
|
507
506
|
exports.default = Graph;
|
|
508
507
|
function mapVisitor(filter, visit) {
|
|
509
508
|
function makeEnter(visit) {
|
|
510
|
-
return function
|
|
509
|
+
return function (nodeId, context, actions) {
|
|
511
510
|
let value = filter(nodeId, actions);
|
|
512
511
|
if (value != null) {
|
|
513
512
|
return visit(value, context, actions);
|
|
@@ -522,7 +521,7 @@ function mapVisitor(filter, visit) {
|
|
|
522
521
|
mapped.enter = makeEnter(visit.enter);
|
|
523
522
|
}
|
|
524
523
|
if (visit.exit != null) {
|
|
525
|
-
mapped.exit = function
|
|
524
|
+
mapped.exit = function (nodeId, context, actions) {
|
|
526
525
|
let exit = visit.exit;
|
|
527
526
|
if (!exit) {
|
|
528
527
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/graph",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.7-unified-308e6415c.0",
|
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"publishConfig": {
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"benchmark": "node ./benchmark/BitSet.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@atlaspack/feature-flags": "2.18.
|
|
22
|
+
"@atlaspack/feature-flags": "2.18.5-unified-308e6415c.0",
|
|
23
23
|
"nullthrows": "^1.1.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@atlaspack/babel-register": "2.14.2-
|
|
26
|
+
"@atlaspack/babel-register": "2.14.2-unified-308e6415c.0",
|
|
27
27
|
"benny": "^3.7.1"
|
|
28
28
|
},
|
|
29
29
|
"type": "commonjs",
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "308e6415c9da9c8d08944fe7dabb27dc47de1cc4"
|
|
31
31
|
}
|