@atlaspack/utils 2.14.5-canary.10 → 2.14.5-canary.100
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 +93 -0
- package/benchmark.js +23 -0
- package/lib/index.js +32 -0
- package/lib/index.js.map +1 -1
- package/package.json +10 -8
- package/src/collection.js +10 -0
- package/src/debug-tools.js +45 -0
- package/src/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,98 @@
|
|
|
1
1
|
# @atlaspack/utils
|
|
2
2
|
|
|
3
|
+
## 2.15.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be)]:
|
|
8
|
+
- @atlaspack/feature-flags@2.18.3
|
|
9
|
+
|
|
10
|
+
## 2.15.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
|
|
15
|
+
- @atlaspack/feature-flags@2.18.2
|
|
16
|
+
|
|
17
|
+
## 2.15.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb), [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
|
|
22
|
+
- @atlaspack/logger@2.14.11
|
|
23
|
+
- @atlaspack/feature-flags@2.18.1
|
|
24
|
+
|
|
25
|
+
## 2.15.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- [#622](https://github.com/atlassian-labs/atlaspack/pull/622) [`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c) Thanks [@benjervis](https://github.com/benjervis)! - Add the `setIntersectStatic` method that doesn't mutate the passed in Sets
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [[`10fbcfb`](https://github.com/atlassian-labs/atlaspack/commit/10fbcfbfa49c7a83da5d7c40983e36e87f524a75), [`85c52d3`](https://github.com/atlassian-labs/atlaspack/commit/85c52d3f7717b3c84a118d18ab98cfbfd71dcbd2)]:
|
|
34
|
+
- @atlaspack/feature-flags@2.18.0
|
|
35
|
+
|
|
36
|
+
## 2.14.11
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
|
|
41
|
+
- @atlaspack/feature-flags@2.17.0
|
|
42
|
+
|
|
43
|
+
## 2.14.10
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [[`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
|
|
48
|
+
- @atlaspack/rust@3.3.5
|
|
49
|
+
- @atlaspack/logger@2.14.10
|
|
50
|
+
|
|
51
|
+
## 2.14.9
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`124b7ff`](https://github.com/atlassian-labs/atlaspack/commit/124b7fff44f71aac9fbad289a9a9509b3dfc9aaa), [`e052521`](https://github.com/atlassian-labs/atlaspack/commit/e0525210850ed1606146eb86991049cf567c5dec), [`15c6d70`](https://github.com/atlassian-labs/atlaspack/commit/15c6d7000bd89da876bc590aa75b17a619a41896), [`e4d966c`](https://github.com/atlassian-labs/atlaspack/commit/e4d966c3c9c4292c5013372ae65b10d19d4bacc6), [`209692f`](https://github.com/atlassian-labs/atlaspack/commit/209692ffb11eae103a0d65c5e1118a5aa1625818), [`42a775d`](https://github.com/atlassian-labs/atlaspack/commit/42a775de8eec638ad188f3271964170d8c04d84b), [`29c2f10`](https://github.com/atlassian-labs/atlaspack/commit/29c2f106de9679adfb5afa04e1910471dc65a427), [`f4da1e1`](https://github.com/atlassian-labs/atlaspack/commit/f4da1e120e73eeb5e8b8927f05e88f04d6148c7b), [`1ef91fc`](https://github.com/atlassian-labs/atlaspack/commit/1ef91fcc863fdd2831511937083dbbc1263b3d9d)]:
|
|
56
|
+
- @atlaspack/rust@3.3.4
|
|
57
|
+
- @atlaspack/feature-flags@2.16.0
|
|
58
|
+
- @atlaspack/logger@2.14.9
|
|
59
|
+
|
|
60
|
+
## 2.14.8
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- Updated dependencies [[`30f6017`](https://github.com/atlassian-labs/atlaspack/commit/30f60175ba4d272c5fc193973c63bc298584775b), [`1ab0a27`](https://github.com/atlassian-labs/atlaspack/commit/1ab0a275aeca40350415e2b03e7440d1dddc6228), [`b8a4ae8`](https://github.com/atlassian-labs/atlaspack/commit/b8a4ae8f83dc0a83d8b145c5f729936ce52080a3)]:
|
|
65
|
+
- @atlaspack/feature-flags@2.15.1
|
|
66
|
+
- @atlaspack/rust@3.3.3
|
|
67
|
+
- @atlaspack/logger@2.14.8
|
|
68
|
+
|
|
69
|
+
## 2.14.7
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- Updated dependencies [[`a1773d2`](https://github.com/atlassian-labs/atlaspack/commit/a1773d2a62d0ef7805ac7524621dcabcc1afe929), [`556d6ab`](https://github.com/atlassian-labs/atlaspack/commit/556d6ab8ede759fa7f37fcd3f4da336ef1c55e8f)]:
|
|
74
|
+
- @atlaspack/feature-flags@2.15.0
|
|
75
|
+
- @atlaspack/logger@2.14.7
|
|
76
|
+
- @atlaspack/rust@3.3.2
|
|
77
|
+
|
|
78
|
+
## 2.14.6
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Updated dependencies [[`e0f5337`](https://github.com/atlassian-labs/atlaspack/commit/e0f533757bd1019dbd108a04952c87da15286e09)]:
|
|
83
|
+
- @atlaspack/feature-flags@2.14.4
|
|
84
|
+
- @atlaspack/rust@3.3.1
|
|
85
|
+
- @atlaspack/logger@2.14.6
|
|
86
|
+
|
|
87
|
+
## 2.14.5
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- Updated dependencies [[`11d6f16`](https://github.com/atlassian-labs/atlaspack/commit/11d6f16b6397dee2f217167e5c98b39edb63f7a7), [`e2ba0f6`](https://github.com/atlassian-labs/atlaspack/commit/e2ba0f69702656f3d1ce95ab1454e35062b13b39), [`d2c50c2`](https://github.com/atlassian-labs/atlaspack/commit/d2c50c2c020888b33bb25b8690d9320c2b69e2a6), [`46a90dc`](https://github.com/atlassian-labs/atlaspack/commit/46a90dccd019a26b222c878a92d23acc75dc67c5)]:
|
|
92
|
+
- @atlaspack/feature-flags@2.14.3
|
|
93
|
+
- @atlaspack/rust@3.3.0
|
|
94
|
+
- @atlaspack/logger@2.14.5
|
|
95
|
+
|
|
3
96
|
## 2.14.4
|
|
4
97
|
|
|
5
98
|
### Patch Changes
|
package/benchmark.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require('@atlaspack/babel-register');
|
|
2
|
+
const b = require('benny');
|
|
3
|
+
|
|
4
|
+
const {setIntersect, setIntersectStatic} = require('./src/collection.js');
|
|
5
|
+
|
|
6
|
+
const setA = new Set([
|
|
7
|
+
23, 25, 29, 29, 12, 16, 14, 23, 18, 19, 16, 24, 9, 29, 26,
|
|
8
|
+
]);
|
|
9
|
+
const setB = new Set([24, 1, 3, 6, 1, 3, 1, 5, 20, 15, 21, 23, 13, 16, 6]);
|
|
10
|
+
|
|
11
|
+
b.suite(
|
|
12
|
+
'Collection - set intersection',
|
|
13
|
+
b.add('Control', () => {
|
|
14
|
+
const setClone = new Set(setA);
|
|
15
|
+
return () => setIntersect(setClone, setB);
|
|
16
|
+
}),
|
|
17
|
+
b.add('setIntersectStatic', () => {
|
|
18
|
+
setIntersectStatic(setA, setB);
|
|
19
|
+
}),
|
|
20
|
+
b.configure({minSamples: 100}),
|
|
21
|
+
b.cycle(),
|
|
22
|
+
b.complete(),
|
|
23
|
+
);
|
package/lib/index.js
CHANGED
|
@@ -3447,11 +3447,13 @@ $parcel$export(module.exports, "setDifference", () => $2ee306eb47a905ca$export$8
|
|
|
3447
3447
|
$parcel$export(module.exports, "setSymmetricDifference", () => $2ee306eb47a905ca$export$be646fbd7a3fda37);
|
|
3448
3448
|
$parcel$export(module.exports, "setEqual", () => $2ee306eb47a905ca$export$dd7d5a65a6b6780f);
|
|
3449
3449
|
$parcel$export(module.exports, "setIntersect", () => $2ee306eb47a905ca$export$9404cfefeb010e68);
|
|
3450
|
+
$parcel$export(module.exports, "setIntersectStatic", () => $2ee306eb47a905ca$export$25266bb285978950);
|
|
3450
3451
|
$parcel$export(module.exports, "setUnion", () => $2ee306eb47a905ca$export$667066422fa0af46);
|
|
3451
3452
|
$parcel$export(module.exports, "resolveConfig", () => $cc7044c885d3b7c6$export$7eca4ea16d4c8343);
|
|
3452
3453
|
$parcel$export(module.exports, "resolveConfigSync", () => $cc7044c885d3b7c6$export$d175e66e9fcd7b75);
|
|
3453
3454
|
$parcel$export(module.exports, "loadConfig", () => $cc7044c885d3b7c6$export$c1a4367d4847eb06);
|
|
3454
3455
|
$parcel$export(module.exports, "readConfig", () => $cc7044c885d3b7c6$export$f5327b421858c8cd);
|
|
3456
|
+
$parcel$export(module.exports, "debugTools", () => $ffdf10a29a6c5be4$export$1e74ad2a9c1ed72a);
|
|
3455
3457
|
$parcel$export(module.exports, "DefaultMap", () => $55fec6b523c8f068$export$674cd7dcb504ac5c);
|
|
3456
3458
|
$parcel$export(module.exports, "DefaultWeakMap", () => $55fec6b523c8f068$export$4924f7ffab2ae440);
|
|
3457
3459
|
$parcel$export(module.exports, "makeDeferredWithPromise", () => $355246d1b0980665$export$93f345b3f0dd27e7);
|
|
@@ -36716,6 +36718,11 @@ function $2ee306eb47a905ca$export$be646fbd7a3fda37(a, b) {
|
|
|
36716
36718
|
function $2ee306eb47a905ca$export$9404cfefeb010e68(a, b) {
|
|
36717
36719
|
for (let entry of a)if (!b.has(entry)) a.delete(entry);
|
|
36718
36720
|
}
|
|
36721
|
+
function $2ee306eb47a905ca$export$25266bb285978950(a, b) {
|
|
36722
|
+
let intersection = new Set();
|
|
36723
|
+
for (let entry of a)if (b.has(entry)) intersection.add(entry);
|
|
36724
|
+
return intersection;
|
|
36725
|
+
}
|
|
36719
36726
|
function $2ee306eb47a905ca$export$667066422fa0af46(a, b) {
|
|
36720
36727
|
return new Set([
|
|
36721
36728
|
...a,
|
|
@@ -36732,6 +36739,31 @@ function $2ee306eb47a905ca$export$dd7d5a65a6b6780f(a, b) {
|
|
|
36732
36739
|
|
|
36733
36740
|
|
|
36734
36741
|
|
|
36742
|
+
/*
|
|
36743
|
+
* These tools are intended for Atlaspack developers, to provide extra utilities
|
|
36744
|
+
* to make debugging Atlaspack issues more straightforward.
|
|
36745
|
+
*
|
|
36746
|
+
* To enable a tool, set the `ATLASPACK_DEBUG_TOOLS` environment variable to a
|
|
36747
|
+
* comma-separated list of tool names. For example:
|
|
36748
|
+
* `ATLASPACK_DEBUG_TOOLS="asset-file-names-in-output,simple-cli-reporter"`
|
|
36749
|
+
*
|
|
36750
|
+
* You can enable all tools by setting `ATLASPACK_DEBUG_TOOLS=all`.
|
|
36751
|
+
*/ let $ffdf10a29a6c5be4$export$1e74ad2a9c1ed72a = {
|
|
36752
|
+
'asset-file-names-in-output': false,
|
|
36753
|
+
'simple-cli-reporter': false
|
|
36754
|
+
};
|
|
36755
|
+
const $ffdf10a29a6c5be4$var$envVarValue = process.env.ATLASPACK_DEBUG_TOOLS ?? '';
|
|
36756
|
+
for (let tool of $ffdf10a29a6c5be4$var$envVarValue.split(',')){
|
|
36757
|
+
tool = tool.trim();
|
|
36758
|
+
if (tool === 'all') {
|
|
36759
|
+
for(let key in $ffdf10a29a6c5be4$export$1e74ad2a9c1ed72a)$ffdf10a29a6c5be4$export$1e74ad2a9c1ed72a[key] = true;
|
|
36760
|
+
break;
|
|
36761
|
+
} else if ($ffdf10a29a6c5be4$export$1e74ad2a9c1ed72a.hasOwnProperty(tool)) $ffdf10a29a6c5be4$export$1e74ad2a9c1ed72a[tool] = true;
|
|
36762
|
+
else if (tool === '') continue;
|
|
36763
|
+
else throw new Error(`Invalid debug tool option: ${tool}. Valid options are: ${Object.keys($ffdf10a29a6c5be4$export$1e74ad2a9c1ed72a).join(', ')}`);
|
|
36764
|
+
}
|
|
36765
|
+
|
|
36766
|
+
|
|
36735
36767
|
class $55fec6b523c8f068$export$674cd7dcb504ac5c extends Map {
|
|
36736
36768
|
constructor(getDefault, entries){
|
|
36737
36769
|
super(entries);
|