@atlaspack/bundler-experimental 2.13.7-canary.25 → 2.13.7-canary.251

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.
Files changed (21) hide show
  1. package/CHANGELOG.md +384 -0
  2. package/dist/DominatorBundler/EdgeContentGraph.js +67 -0
  3. package/dist/DominatorBundler/cycleBreaker/findStronglyConnectedComponents.js +58 -0
  4. package/dist/DominatorBundler/findAssetDominators/simpleFastDominance.js +129 -0
  5. package/lib/DominatorBundler/EdgeContentGraph.js +2 -1
  6. package/lib/DominatorBundler/cycleBreaker/findStronglyConnectedComponents.js +2 -0
  7. package/lib/DominatorBundler/findAssetDominators/simpleFastDominance.js +11 -2
  8. package/lib/types/DominatorBundler/EdgeContentGraph.d.ts +13 -0
  9. package/lib/types/DominatorBundler/cycleBreaker/findStronglyConnectedComponents.d.ts +12 -0
  10. package/lib/types/DominatorBundler/findAssetDominators/simpleFastDominance.d.ts +58 -0
  11. package/package.json +19 -15
  12. package/src/DominatorBundler/{EdgeContentGraph.js → EdgeContentGraph.ts} +3 -4
  13. package/src/DominatorBundler/cycleBreaker/{findStronglyConnectedComponents.js → findStronglyConnectedComponents.ts} +12 -12
  14. package/src/DominatorBundler/findAssetDominators/{simpleFastDominance.js → simpleFastDominance.ts} +9 -5
  15. package/test/DominatorBundler/{EdgeContentGraph.test.js → EdgeContentGraph.test.ts} +0 -2
  16. package/test/DominatorBundler/cycleBreaker/{findStronglyConnectedComponents.js → findStronglyConnectedComponents.ts} +0 -2
  17. package/test/DominatorBundler/findAssetDominators/{simpleFastDominance.test.js → simpleFastDominance.test.ts} +0 -2
  18. package/test/{fixtureFromGraph.test.js → fixtureFromGraph.test.ts} +0 -2
  19. package/test/{fixtureFromGraph.js → fixtureFromGraph.ts} +22 -24
  20. package/tsconfig.json +39 -0
  21. package/tsconfig.tsbuildinfo +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,389 @@
1
1
  # @atlaspack/bundler-experimental
2
2
 
3
+ ## 2.13.38
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`79a7e22`](https://github.com/atlassian-labs/atlaspack/commit/79a7e22ef119891a2f4180a9d3cc66b38dd52092), [`ff8ac84`](https://github.com/atlassian-labs/atlaspack/commit/ff8ac84bd0be15caa7c7af21bf5b6e47b6d36438), [`3da8e69`](https://github.com/atlassian-labs/atlaspack/commit/3da8e690605472d81c531366b65fa9844f8ca337), [`c372f3f`](https://github.com/atlassian-labs/atlaspack/commit/c372f3fd6fce8200d5cf47f41bc7895c6cbb5558), [`17dfea9`](https://github.com/atlassian-labs/atlaspack/commit/17dfea9e9f3169807808520df9c09ebf70dc8b10), [`f1070ec`](https://github.com/atlassian-labs/atlaspack/commit/f1070ec48e99b4ec111a03179c5ab5b74163fab1), [`27fd73f`](https://github.com/atlassian-labs/atlaspack/commit/27fd73fa07d358653f1be6f2d15d72dc5d8fc2fd), [`3091fa3`](https://github.com/atlassian-labs/atlaspack/commit/3091fa36425ecffe3938e55247a035b08cda37a2)]:
8
+ - @atlaspack/feature-flags@2.25.5
9
+ - @atlaspack/rust@3.8.3
10
+ - @atlaspack/core@2.26.0
11
+ - @atlaspack/utils@3.0.3
12
+ - @atlaspack/graph@3.5.24
13
+ - @atlaspack/logger@2.14.27
14
+ - @atlaspack/plugin@2.14.35
15
+ - @atlaspack/types@2.15.25
16
+
17
+ ## 2.13.37
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`662d3c6`](https://github.com/atlassian-labs/atlaspack/commit/662d3c627888b16bf27df15cfac5a9094509e93d)]:
22
+ - @atlaspack/feature-flags@2.25.4
23
+ - @atlaspack/core@2.25.1
24
+ - @atlaspack/types@2.15.24
25
+ - @atlaspack/graph@3.5.23
26
+ - @atlaspack/utils@3.0.2
27
+ - @atlaspack/logger@2.14.26
28
+ - @atlaspack/plugin@2.14.34
29
+
30
+ ## 2.13.36
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`236e546`](https://github.com/atlassian-labs/atlaspack/commit/236e5465863dca6044a7191e05260a5b924c342e), [`f07351a`](https://github.com/atlassian-labs/atlaspack/commit/f07351a2398b6a8e5155a2daad77e69b7dcb2b4b)]:
35
+ - @atlaspack/utils@3.0.1
36
+ - @atlaspack/core@2.25.0
37
+ - @atlaspack/feature-flags@2.25.3
38
+ - @atlaspack/graph@3.5.22
39
+ - @atlaspack/types@2.15.23
40
+ - @atlaspack/logger@2.14.25
41
+ - @atlaspack/plugin@2.14.33
42
+
43
+ ## 2.13.35
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [[`0207171`](https://github.com/atlassian-labs/atlaspack/commit/0207171e59e985c51e105aec2e0a99de174374bd), [`10ee3fa`](https://github.com/atlassian-labs/atlaspack/commit/10ee3fa5b75a92acde8973673d9b3c5b6f3958e5), [`bbe4e28`](https://github.com/atlassian-labs/atlaspack/commit/bbe4e28c89e5e9284bd730075d4d6f2a3cb37b21), [`1180103`](https://github.com/atlassian-labs/atlaspack/commit/118010351ed444f8178988afb3f77807154dd933), [`2bc93b1`](https://github.com/atlassian-labs/atlaspack/commit/2bc93b17cea07fd7cbb68acec84d8471345a22b4)]:
48
+ - @atlaspack/feature-flags@2.25.2
49
+ - @atlaspack/rust@3.8.2
50
+ - @atlaspack/core@2.24.2
51
+ - @atlaspack/utils@3.0.0
52
+ - @atlaspack/graph@3.5.21
53
+ - @atlaspack/logger@2.14.24
54
+ - @atlaspack/plugin@2.14.32
55
+ - @atlaspack/types@2.15.22
56
+
57
+ ## 2.13.34
58
+
59
+ ### Patch Changes
60
+
61
+ - [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
62
+
63
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922), [`686a398`](https://github.com/atlassian-labs/atlaspack/commit/686a398faa1f9e19cbf9274add2c46e246bafba8)]:
64
+ - @atlaspack/core@2.24.1
65
+ - @atlaspack/diagnostic@2.14.4
66
+ - @atlaspack/feature-flags@2.25.1
67
+ - @atlaspack/graph@3.5.20
68
+ - @atlaspack/logger@2.14.23
69
+ - @atlaspack/plugin@2.14.31
70
+ - @atlaspack/rust@3.8.1
71
+ - @atlaspack/types@2.15.21
72
+ - @atlaspack/utils@2.19.3
73
+
74
+ ## 2.13.33
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [[`7a52bab`](https://github.com/atlassian-labs/atlaspack/commit/7a52bab6281e8edbfa66af248eb6f872c6b4b7bd), [`eedcbc4`](https://github.com/atlassian-labs/atlaspack/commit/eedcbc408fc1e86a2a8e25f1a41c57146d8529e1), [`5a0363f`](https://github.com/atlassian-labs/atlaspack/commit/5a0363f1086e81068959b87e92064bed5a11a9b4), [`038e87a`](https://github.com/atlassian-labs/atlaspack/commit/038e87a7858d39556d59d3a2d17db534d45f62c6), [`f6532d7`](https://github.com/atlassian-labs/atlaspack/commit/f6532d7a4f7f007bd4e5e36af04dd466f0b9f572), [`0684997`](https://github.com/atlassian-labs/atlaspack/commit/0684997c127a6204af1376b36e556fddd1ba5557), [`602f8ed`](https://github.com/atlassian-labs/atlaspack/commit/602f8ed9d8381301df8b2cc82c1d5cf6f2f94fec), [`8604d2a`](https://github.com/atlassian-labs/atlaspack/commit/8604d2a49ace5e9194ec4f76e71f06b93610f6b4)]:
79
+ - @atlaspack/feature-flags@2.25.0
80
+ - @atlaspack/core@2.24.0
81
+ - @atlaspack/rust@3.8.0
82
+ - @atlaspack/graph@3.5.19
83
+ - @atlaspack/utils@2.19.2
84
+ - @atlaspack/logger@2.14.22
85
+ - @atlaspack/plugin@2.14.30
86
+ - @atlaspack/types@2.15.20
87
+
88
+ ## 2.13.32
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies [[`830261d`](https://github.com/atlassian-labs/atlaspack/commit/830261dcf4a40293090b61cab52fd75d5683c73f), [`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
93
+ - @atlaspack/feature-flags@2.24.1
94
+ - @atlaspack/rust@3.7.0
95
+ - @atlaspack/core@2.23.5
96
+ - @atlaspack/graph@3.5.18
97
+ - @atlaspack/utils@2.19.1
98
+ - @atlaspack/logger@2.14.21
99
+ - @atlaspack/plugin@2.14.29
100
+ - @atlaspack/types@2.15.19
101
+
102
+ ## 2.13.31
103
+
104
+ ### Patch Changes
105
+
106
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767), [`a5081c3`](https://github.com/atlassian-labs/atlaspack/commit/a5081c3f9207d28716ee4edd3841de1830ea4b80), [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579), [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579), [`8843980`](https://github.com/atlassian-labs/atlaspack/commit/88439807be20025fd3433380204ff1205079729e)]:
107
+ - @atlaspack/feature-flags@2.24.0
108
+ - @atlaspack/utils@2.19.0
109
+ - @atlaspack/core@2.23.4
110
+ - @atlaspack/graph@3.5.17
111
+ - @atlaspack/logger@2.14.20
112
+ - @atlaspack/plugin@2.14.28
113
+ - @atlaspack/types@2.15.18
114
+
115
+ ## 2.13.30
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
120
+ - @atlaspack/feature-flags@2.23.2
121
+ - @atlaspack/rust@3.6.2
122
+ - @atlaspack/core@2.23.3
123
+ - @atlaspack/graph@3.5.16
124
+ - @atlaspack/utils@2.18.4
125
+ - @atlaspack/logger@2.14.19
126
+ - @atlaspack/plugin@2.14.27
127
+ - @atlaspack/types@2.15.17
128
+
129
+ ## 2.13.29
130
+
131
+ ### Patch Changes
132
+
133
+ - [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
134
+
135
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2), [`b6e72b6`](https://github.com/atlassian-labs/atlaspack/commit/b6e72b6dd2b517cbb0e700fa69e63332d3eacb1e)]:
136
+ - @atlaspack/feature-flags@2.23.1
137
+ - @atlaspack/diagnostic@2.14.3
138
+ - @atlaspack/logger@2.14.18
139
+ - @atlaspack/plugin@2.14.26
140
+ - @atlaspack/graph@3.5.15
141
+ - @atlaspack/types@2.15.16
142
+ - @atlaspack/utils@2.18.3
143
+ - @atlaspack/core@2.23.2
144
+ - @atlaspack/rust@3.6.1
145
+
146
+ ## 2.13.28
147
+
148
+ ### Patch Changes
149
+
150
+ - Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
151
+ - @atlaspack/feature-flags@2.23.0
152
+ - @atlaspack/core@2.23.1
153
+ - @atlaspack/graph@3.5.14
154
+ - @atlaspack/utils@2.18.2
155
+ - @atlaspack/logger@2.14.17
156
+ - @atlaspack/plugin@2.14.25
157
+ - @atlaspack/types@2.15.15
158
+
159
+ ## 2.13.27
160
+
161
+ ### Patch Changes
162
+
163
+ - Updated dependencies [[`ad26146`](https://github.com/atlassian-labs/atlaspack/commit/ad26146f13b4c1cc65d4a0f9c67060b90ef14ff3), [`f1b48e7`](https://github.com/atlassian-labs/atlaspack/commit/f1b48e7a04e005cef0f36a3e692087a9ecdb6f7a), [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45), [`73dd7ba`](https://github.com/atlassian-labs/atlaspack/commit/73dd7baab69456ef2f6e4a0cc7dbb04f407eb148)]:
164
+ - @atlaspack/rust@3.6.0
165
+ - @atlaspack/core@2.23.0
166
+ - @atlaspack/feature-flags@2.22.0
167
+ - @atlaspack/logger@2.14.16
168
+ - @atlaspack/utils@2.18.1
169
+ - @atlaspack/graph@3.5.13
170
+ - @atlaspack/plugin@2.14.24
171
+ - @atlaspack/types@2.15.14
172
+
173
+ ## 2.13.26
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
178
+ - @atlaspack/feature-flags@2.21.0
179
+ - @atlaspack/utils@2.18.0
180
+ - @atlaspack/core@2.22.0
181
+ - @atlaspack/rust@3.5.0
182
+ - @atlaspack/graph@3.5.12
183
+ - @atlaspack/logger@2.14.15
184
+ - @atlaspack/types@2.15.13
185
+ - @atlaspack/plugin@2.14.23
186
+
187
+ ## 2.13.25
188
+
189
+ ### Patch Changes
190
+
191
+ - [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
192
+
193
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94), [`43fdd22`](https://github.com/atlassian-labs/atlaspack/commit/43fdd223860fbc97af17d68c65419b97412cb888), [`12bee0e`](https://github.com/atlassian-labs/atlaspack/commit/12bee0e23f0464d7f6bd3e24fbe0d19c126d587d)]:
194
+ - @atlaspack/feature-flags@2.20.1
195
+ - @atlaspack/diagnostic@2.14.2
196
+ - @atlaspack/logger@2.14.14
197
+ - @atlaspack/plugin@2.14.22
198
+ - @atlaspack/graph@3.5.11
199
+ - @atlaspack/types@2.15.12
200
+ - @atlaspack/utils@2.17.4
201
+ - @atlaspack/core@2.21.0
202
+ - @atlaspack/rust@3.4.2
203
+
204
+ ## 2.13.24
205
+
206
+ ### Patch Changes
207
+
208
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
209
+ - @atlaspack/feature-flags@2.20.0
210
+ - @atlaspack/core@2.20.0
211
+ - @atlaspack/types@2.15.11
212
+ - @atlaspack/graph@3.5.10
213
+ - @atlaspack/utils@2.17.3
214
+ - @atlaspack/plugin@2.14.21
215
+
216
+ ## 2.13.23
217
+
218
+ ### Patch Changes
219
+
220
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa), [`1c7865a`](https://github.com/atlassian-labs/atlaspack/commit/1c7865a64451116d94015e248302435839d347c0), [`a0b959f`](https://github.com/atlassian-labs/atlaspack/commit/a0b959fbf61fc3f820ff03c7e8988945fe40a91a)]:
221
+ - @atlaspack/plugin@2.14.20
222
+ - @atlaspack/feature-flags@2.19.2
223
+ - @atlaspack/core@2.19.2
224
+ - @atlaspack/graph@3.5.9
225
+ - @atlaspack/utils@2.17.2
226
+ - @atlaspack/types@2.15.10
227
+
228
+ ## 2.13.22
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies [[`13aef17`](https://github.com/atlassian-labs/atlaspack/commit/13aef177eea289a6e40d2113b5ec1ac9be18a33d)]:
233
+ - @atlaspack/feature-flags@2.19.1
234
+ - @atlaspack/core@2.19.1
235
+ - @atlaspack/graph@3.5.8
236
+ - @atlaspack/utils@2.17.1
237
+ - @atlaspack/types@2.15.9
238
+ - @atlaspack/plugin@2.14.19
239
+
240
+ ## 2.13.21
241
+
242
+ ### Patch Changes
243
+
244
+ - Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`c4415a4`](https://github.com/atlassian-labs/atlaspack/commit/c4415a455543d984ca28452c2cb87a794d22497c), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5), [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3), [`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417), [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56), [`3ba1aee`](https://github.com/atlassian-labs/atlaspack/commit/3ba1aee6a794a26b2f0255aaf6d003981532d0ae)]:
245
+ - @atlaspack/feature-flags@2.19.0
246
+ - @atlaspack/utils@2.17.0
247
+ - @atlaspack/core@2.19.0
248
+ - @atlaspack/rust@3.4.1
249
+ - @atlaspack/graph@3.5.7
250
+ - @atlaspack/logger@2.14.13
251
+ - @atlaspack/types@2.15.8
252
+ - @atlaspack/plugin@2.14.18
253
+
254
+ ## 2.13.20
255
+
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies [[`c75bf55`](https://github.com/atlassian-labs/atlaspack/commit/c75bf553fff4decc285b5fd499a275853b18f8f2)]:
259
+ - @atlaspack/rust@3.4.0
260
+ - @atlaspack/core@2.18.8
261
+ - @atlaspack/logger@2.14.12
262
+ - @atlaspack/utils@2.16.1
263
+ - @atlaspack/types@2.15.7
264
+ - @atlaspack/plugin@2.14.17
265
+
266
+ ## 2.13.19
267
+
268
+ ### Patch Changes
269
+
270
+ - Updated dependencies [[`1ff31f1`](https://github.com/atlassian-labs/atlaspack/commit/1ff31f10391c48780c9fcfc243b4e828a1b285e0), [`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c), [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
271
+ - @atlaspack/core@2.18.7
272
+ - @atlaspack/feature-flags@2.18.4
273
+ - @atlaspack/utils@2.16.0
274
+ - @atlaspack/graph@3.5.6
275
+ - @atlaspack/types@2.15.6
276
+ - @atlaspack/plugin@2.14.16
277
+
278
+ ## 2.13.18
279
+
280
+ ### Patch Changes
281
+
282
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be), [`74fd942`](https://github.com/atlassian-labs/atlaspack/commit/74fd94236ac697207082c4b755b079e56f5564fb)]:
283
+ - @atlaspack/feature-flags@2.18.3
284
+ - @atlaspack/core@2.18.6
285
+ - @atlaspack/graph@3.5.5
286
+ - @atlaspack/utils@2.15.3
287
+ - @atlaspack/types@2.15.5
288
+ - @atlaspack/plugin@2.14.15
289
+
290
+ ## 2.13.17
291
+
292
+ ### Patch Changes
293
+
294
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
295
+ - @atlaspack/feature-flags@2.18.2
296
+ - @atlaspack/core@2.18.5
297
+ - @atlaspack/graph@3.5.4
298
+ - @atlaspack/utils@2.15.2
299
+ - @atlaspack/types@2.15.4
300
+ - @atlaspack/plugin@2.14.14
301
+
302
+ ## 2.13.16
303
+
304
+ ### Patch Changes
305
+
306
+ - Updated dependencies [[`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb), [`6b1f5ff`](https://github.com/atlassian-labs/atlaspack/commit/6b1f5fff68d7131fae075e14f4d2c02606dc6058), [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`c8f7df4`](https://github.com/atlassian-labs/atlaspack/commit/c8f7df4eadfc4718040fceb065dae6e96a4051e7), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
307
+ - @atlaspack/logger@2.14.11
308
+ - @atlaspack/core@2.18.4
309
+ - @atlaspack/feature-flags@2.18.1
310
+ - @atlaspack/types@2.15.3
311
+ - @atlaspack/utils@2.15.1
312
+ - @atlaspack/graph@3.5.3
313
+ - @atlaspack/plugin@2.14.13
314
+
315
+ ## 2.13.15
316
+
317
+ ### Patch Changes
318
+
319
+ - Updated dependencies [[`10fbcfb`](https://github.com/atlassian-labs/atlaspack/commit/10fbcfbfa49c7a83da5d7c40983e36e87f524a75), [`85c52d3`](https://github.com/atlassian-labs/atlaspack/commit/85c52d3f7717b3c84a118d18ab98cfbfd71dcbd2), [`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
320
+ - @atlaspack/feature-flags@2.18.0
321
+ - @atlaspack/utils@2.15.0
322
+ - @atlaspack/core@2.18.3
323
+ - @atlaspack/graph@3.5.2
324
+ - @atlaspack/types@2.15.2
325
+ - @atlaspack/plugin@2.14.12
326
+
327
+ ## 2.13.14
328
+
329
+ ### Patch Changes
330
+
331
+ - Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
332
+ - @atlaspack/feature-flags@2.17.0
333
+ - @atlaspack/core@2.18.2
334
+ - @atlaspack/graph@3.5.1
335
+ - @atlaspack/utils@2.14.11
336
+ - @atlaspack/types@2.15.1
337
+ - @atlaspack/plugin@2.14.11
338
+
339
+ ## 2.13.13
340
+
341
+ ### Patch Changes
342
+
343
+ - Updated dependencies [[`1b52b99`](https://github.com/atlassian-labs/atlaspack/commit/1b52b99db4298b04c1a6eb0f97994d75a2d436f9)]:
344
+ - @atlaspack/graph@3.5.0
345
+ - @atlaspack/core@2.18.1
346
+
347
+ ## 2.13.12
348
+
349
+ ### Patch Changes
350
+
351
+ - Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196), [`0b2f6f5`](https://github.com/atlassian-labs/atlaspack/commit/0b2f6f55794d3ff6e2f5a41f963e7e5dd8ad9f8d), [`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
352
+ - @atlaspack/types@2.15.0
353
+ - @atlaspack/core@2.18.0
354
+ - @atlaspack/rust@3.3.5
355
+ - @atlaspack/plugin@2.14.10
356
+ - @atlaspack/logger@2.14.10
357
+ - @atlaspack/utils@2.14.10
358
+
359
+ ## 2.13.11
360
+
361
+ ### Patch Changes
362
+
363
+ - Updated dependencies [[`1940859`](https://github.com/atlassian-labs/atlaspack/commit/194085942f0e86532e9d039fc3f8039badce4594), [`15b6155`](https://github.com/atlassian-labs/atlaspack/commit/15b61556e9114203ebbc9de94b864118ca764598), [`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), [`d04de26`](https://github.com/atlassian-labs/atlaspack/commit/d04de26af684d7abfba5091fbe3df16a12cd0ebc), [`f4da1e1`](https://github.com/atlassian-labs/atlaspack/commit/f4da1e120e73eeb5e8b8927f05e88f04d6148c7b), [`1ef91fc`](https://github.com/atlassian-labs/atlaspack/commit/1ef91fcc863fdd2831511937083dbbc1263b3d9d)]:
364
+ - @atlaspack/core@2.17.4
365
+ - @atlaspack/rust@3.3.4
366
+ - @atlaspack/feature-flags@2.16.0
367
+ - @atlaspack/logger@2.14.9
368
+ - @atlaspack/utils@2.14.9
369
+ - @atlaspack/graph@3.4.7
370
+ - @atlaspack/types@2.14.9
371
+ - @atlaspack/plugin@2.14.9
372
+
373
+ ## 2.13.10
374
+
375
+ ### Patch Changes
376
+
377
+ - Updated dependencies [[`30f6017`](https://github.com/atlassian-labs/atlaspack/commit/30f60175ba4d272c5fc193973c63bc298584775b), [`3a3e8e7`](https://github.com/atlassian-labs/atlaspack/commit/3a3e8e7be9e2dffd7304436d792f0f595d59665a), [`1ab0a27`](https://github.com/atlassian-labs/atlaspack/commit/1ab0a275aeca40350415e2b03e7440d1dddc6228), [`b8a4ae8`](https://github.com/atlassian-labs/atlaspack/commit/b8a4ae8f83dc0a83d8b145c5f729936ce52080a3), [`15c1e3c`](https://github.com/atlassian-labs/atlaspack/commit/15c1e3c0628bae4c768d76cf3afc53d6d0d7ce7c)]:
378
+ - @atlaspack/core@2.17.3
379
+ - @atlaspack/feature-flags@2.15.1
380
+ - @atlaspack/rust@3.3.3
381
+ - @atlaspack/graph@3.4.6
382
+ - @atlaspack/utils@2.14.8
383
+ - @atlaspack/logger@2.14.8
384
+ - @atlaspack/types@2.14.8
385
+ - @atlaspack/plugin@2.14.8
386
+
3
387
  ## 2.13.9
4
388
 
5
389
  ### Patch Changes
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
5
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
6
+ };
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ var _EdgeContentGraph_edgeWeights;
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EdgeContentGraph = void 0;
13
+ const graph_1 = require("@atlaspack/graph");
14
+ const nullthrows_1 = __importDefault(require("nullthrows"));
15
+ /**
16
+ * A `ContentGraph` that also stores weights on edges.
17
+ *
18
+ * @template N The type of the node weight.
19
+ * @template EW The type of the edge weight.
20
+ */
21
+ class EdgeContentGraph extends graph_1.ContentGraph {
22
+ constructor() {
23
+ super(...arguments);
24
+ _EdgeContentGraph_edgeWeights.set(this, new Map());
25
+ }
26
+ clone() {
27
+ const newGraph = new EdgeContentGraph();
28
+ let nodeId = 0;
29
+ for (let node of this.nodes) {
30
+ const contentKey = this._nodeIdToContentKey.get(nodeId);
31
+ if (node == null) {
32
+ // Add null node to preserve node ids
33
+ // @ts-expect-error TS2345
34
+ newGraph.addNode(null);
35
+ }
36
+ else if (contentKey == null) {
37
+ newGraph.addNode(node);
38
+ }
39
+ else {
40
+ newGraph.addNodeByContentKey(contentKey, node);
41
+ }
42
+ nodeId += 1;
43
+ }
44
+ // @ts-expect-error TS2488
45
+ for (let edge of this.getAllEdges()) {
46
+ const weight = this.getEdgeWeight(edge.from, edge.to);
47
+ newGraph.addWeightedEdge(edge.from, edge.to, edge.type, weight);
48
+ }
49
+ if (this.rootNodeId != null) {
50
+ const rootNodeContentKey = this._nodeIdToContentKey.get(this.rootNodeId);
51
+ const newGraphRootNodeId = newGraph.getNodeIdByContentKey((0, nullthrows_1.default)(rootNodeContentKey));
52
+ newGraph.setRootNodeId(newGraphRootNodeId);
53
+ }
54
+ return newGraph;
55
+ }
56
+ addWeightedEdge(from, to, type, weight) {
57
+ this.addEdge(from, to, type);
58
+ if (weight != null) {
59
+ __classPrivateFieldGet(this, _EdgeContentGraph_edgeWeights, "f").set([String(from), String(to)].join(','), weight);
60
+ }
61
+ }
62
+ getEdgeWeight(from, to) {
63
+ return __classPrivateFieldGet(this, _EdgeContentGraph_edgeWeights, "f").get([String(from), String(to)].join(',')) ?? null;
64
+ }
65
+ }
66
+ exports.EdgeContentGraph = EdgeContentGraph;
67
+ _EdgeContentGraph_edgeWeights = new WeakMap();
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findStronglyConnectedComponents = findStronglyConnectedComponents;
4
+ /**
5
+ * Robert Tarjan's algorithm to find strongly connected components in a graph.
6
+ *
7
+ * Time complexity: O(V + E)
8
+ * Space complexity (worst case): O(V)
9
+ *
10
+ * * https://web.archive.org/web/20170829214726id_/http://www.cs.ucsb.edu/~gilbert/cs240a/old/cs240aSpr2011/slides/TarjanDFS.pdf
11
+ * * https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
12
+ */
13
+ function findStronglyConnectedComponents(graph) {
14
+ const result = [];
15
+ let index = 0;
16
+ const stack = [];
17
+ const state = new Array(graph.nodes.length).fill(null).map(() => ({
18
+ index: null,
19
+ lowlink: null,
20
+ onStack: false,
21
+ }));
22
+ graph.nodes.forEach((node, nodeId) => {
23
+ if (node != null && state[nodeId].index == null) {
24
+ strongConnect(nodeId);
25
+ }
26
+ });
27
+ function strongConnect(nodeId) {
28
+ const nodeState = state[nodeId];
29
+ nodeState.index = index;
30
+ nodeState.lowlink = index;
31
+ index += 1;
32
+ stack.push(nodeId);
33
+ nodeState.onStack = true;
34
+ for (let neighborId of graph.getNodeIdsConnectedFrom(nodeId)) {
35
+ const neighborState = state[neighborId];
36
+ if (neighborState.index == null) {
37
+ strongConnect(neighborId);
38
+ nodeState.lowlink = Math.min(Number(nodeState.lowlink), Number(neighborState.lowlink));
39
+ }
40
+ else if (neighborState.onStack) {
41
+ nodeState.lowlink = Math.min(Number(nodeState.lowlink), Number(neighborState.index));
42
+ }
43
+ }
44
+ if (nodeState.lowlink === nodeState.index) {
45
+ const component = [];
46
+ let member;
47
+ do {
48
+ member = stack.pop();
49
+ // @ts-expect-error TS2538
50
+ state[member].onStack = false;
51
+ // @ts-expect-error TS2345
52
+ component.push(member);
53
+ } while (member !== nodeId);
54
+ result.push(component);
55
+ }
56
+ }
57
+ return result;
58
+ }
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.simpleFastDominance = simpleFastDominance;
4
+ exports.getGraphPostOrder = getGraphPostOrder;
5
+ exports.intersect = intersect;
6
+ const graph_1 = require("@atlaspack/graph");
7
+ /**
8
+ * Implements "A simple, fast dominance algorithm", to find the immediate
9
+ * dominators of all nodes in a graph.
10
+ *
11
+ * Returns a map of node IDs to their immediate dominator's node ID.
12
+ * This map is represented by an array where the index is the node ID and the
13
+ * value is its dominator.
14
+ *
15
+ * For example, given a node `3`, `dominators[3]` is the immediate dominator
16
+ * of node 3.
17
+ *
18
+ * - https://www.cs.tufts.edu/comp/150FP/archive/keith-cooper/dom14.pdf
19
+ */
20
+ function simpleFastDominance(graph) {
21
+ const rootNodeId = graph.rootNodeId;
22
+ if (rootNodeId == null) {
23
+ throw new Error('Graph must have a root node');
24
+ }
25
+ const postOrder = getGraphPostOrder(graph);
26
+ const reversedPostOrder = postOrder.slice().reverse();
27
+ const dominators = Array(graph.nodes.length).fill(null);
28
+ const postOrderIndexes = Array(graph.nodes.length).fill(null);
29
+ for (let i = 0; i < postOrder.length; i++) {
30
+ postOrderIndexes[postOrder[i]] = i;
31
+ }
32
+ dominators[rootNodeId] = graph.rootNodeId;
33
+ let changed = true;
34
+ while (changed) {
35
+ changed = false;
36
+ for (let node of reversedPostOrder) {
37
+ if (node === graph.rootNodeId)
38
+ continue;
39
+ // @ts-expect-error TS7034
40
+ let newImmediateDominator = null;
41
+ graph.forEachNodeIdConnectedTo(node,
42
+ // @ts-expect-error TS2345
43
+ (predecessor) => {
44
+ // @ts-expect-error TS7005
45
+ if (newImmediateDominator == null) {
46
+ newImmediateDominator = predecessor;
47
+ }
48
+ else {
49
+ if (dominators[predecessor] == null) {
50
+ return;
51
+ }
52
+ newImmediateDominator = intersect(postOrderIndexes, dominators, predecessor,
53
+ // @ts-expect-error TS7005
54
+ newImmediateDominator);
55
+ }
56
+ }, graph_1.ALL_EDGE_TYPES);
57
+ if (dominators[node] !== newImmediateDominator) {
58
+ dominators[node] = newImmediateDominator;
59
+ changed = true;
60
+ }
61
+ }
62
+ }
63
+ return dominators;
64
+ }
65
+ /**
66
+ * Return the post-order of the graph.
67
+ */
68
+ function getGraphPostOrder(graph, type = 1) {
69
+ const postOrder = [];
70
+ graph.traverse({
71
+ exit: (node) => {
72
+ postOrder.push(node);
73
+ },
74
+ }, graph.rootNodeId, type);
75
+ return postOrder;
76
+ }
77
+ /**
78
+ * From "A Simple, Fast Dominance Algorithm"
79
+ * Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy:
80
+ *
81
+ * > The intersection routine appears at the bottom of the figure.
82
+ * > It implements a “two-finger” algorithm – one can imagine a finger pointing
83
+ * > to each dominator set, each finger moving independently as the comparisons
84
+ * > dictate. In this case, the comparisons are on postorder numbers; for each
85
+ * > intersection, we start the two fingers at the ends of the two sets, and,
86
+ * > until the fingers point to the same postorder number, we move the finger
87
+ * > pointing to the smaller number back one element. Remember that nodes higher
88
+ * > in the dominator tree have higher postorder numbers, which is why intersect
89
+ * > moves the finger whose value is less than the other finger’s. When the two
90
+ * > fingers point at the same element, intersect returns that element. The set
91
+ * > resulting from the intersection begins with the returned element and chains
92
+ * > its way up the doms array to the entry node.
93
+ *
94
+ * `postOrder` is the post-order node list of the graph.
95
+ *
96
+ * `dominators` is the current immediate dominator state for node in the graph.
97
+ *
98
+ * This is coupled with the fact node ids are indexes into an array. It is a map
99
+ * of NodeId -> NodeId, where the value at index `i` is the immediate dominator
100
+ * of the node `i`.
101
+ *
102
+ * `predecessor` is one predecessor node id of the node we're currently
103
+ * computing the immediate dominator for.
104
+ *
105
+ * `newImmediateDominator` is current best immediate dominator candidate for the
106
+ * node we're computing the immediate dominator for.
107
+ *
108
+ * The algorithm is intersecting the dominator sets of the two predecessors and
109
+ * returning dominator node with the highest post-order number by walking up
110
+ * the dominator tree until the two sets intersect.
111
+ *
112
+ * The node with the highest post-order index is the immediate dominator, as
113
+ * it is the closest to the node we're computing for.
114
+ */
115
+ function intersect(postOrderIndexes, dominators, predecessor, newImmediateDominator) {
116
+ let n1 = predecessor;
117
+ let n2 = newImmediateDominator;
118
+ while (n1 !== n2) {
119
+ while (postOrderIndexes[n1] < postOrderIndexes[n2]) {
120
+ // @ts-expect-error TS7053
121
+ n1 = Number(dominators[n1]);
122
+ }
123
+ while (postOrderIndexes[n2] < postOrderIndexes[n1]) {
124
+ // @ts-expect-error TS7053
125
+ n2 = Number(dominators[n2]);
126
+ }
127
+ }
128
+ return n1;
129
+ }
@@ -34,7 +34,7 @@ class EdgeContentGraph extends _graph().ContentGraph {
34
34
  const contentKey = this._nodeIdToContentKey.get(nodeId);
35
35
  if (node == null) {
36
36
  // Add null node to preserve node ids
37
- // $FlowFixMe
37
+ // @ts-expect-error TS2345
38
38
  newGraph.addNode(null);
39
39
  } else if (contentKey == null) {
40
40
  newGraph.addNode(node);
@@ -43,6 +43,7 @@ class EdgeContentGraph extends _graph().ContentGraph {
43
43
  }
44
44
  nodeId += 1;
45
45
  }
46
+ // @ts-expect-error TS2488
46
47
  for (let edge of this.getAllEdges()) {
47
48
  const weight = this.getEdgeWeight(edge.from, edge.to);
48
49
  newGraph.addWeightedEdge(edge.from, edge.to, edge.type, weight);
@@ -48,7 +48,9 @@ function findStronglyConnectedComponents(graph) {
48
48
  let member;
49
49
  do {
50
50
  member = stack.pop();
51
+ // @ts-expect-error TS2538
51
52
  state[member].onStack = false;
53
+ // @ts-expect-error TS2345
52
54
  component.push(member);
53
55
  } while (member !== nodeId);
54
56
  result.push(component);