@atlaspack/packager-js 2.14.5-canary.19 → 2.14.5-canary.191

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 CHANGED
@@ -1,5 +1,307 @@
1
1
  # @atlaspack/packager-js
2
2
 
3
+ ## 2.22.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#768](https://github.com/atlassian-labs/atlaspack/pull/768) [`58b9fb0`](https://github.com/atlassian-labs/atlaspack/commit/58b9fb037680a36a0b4af7890f2a03532095b88f) Thanks [@benjervis](https://github.com/benjervis)! - Fixes a small error in the scope hoisting V2 fixes that caused assets to be wrapped unnecessarily
8
+
9
+ ## 2.22.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#763](https://github.com/atlassian-labs/atlaspack/pull/763) [`830261d`](https://github.com/atlassian-labs/atlaspack/commit/830261dcf4a40293090b61cab52fd75d5683c73f) Thanks [@benjervis](https://github.com/benjervis)! - Fixes scope hoisting by iterating from the main entry asset of a bundle when packaging. Behind the feature flag `applyScopeHoistingImprovementsV2`.
14
+
15
+ - Updated dependencies [[`830261d`](https://github.com/atlassian-labs/atlaspack/commit/830261dcf4a40293090b61cab52fd75d5683c73f), [`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
16
+ - @atlaspack/feature-flags@2.24.1
17
+ - @atlaspack/rust@3.7.0
18
+ - @atlaspack/utils@2.19.1
19
+ - @atlaspack/plugin@2.14.29
20
+ - @atlaspack/types@2.15.19
21
+
22
+ ## 2.22.0
23
+
24
+ ### Minor Changes
25
+
26
+ - [#762](https://github.com/atlassian-labs/atlaspack/pull/762) [`a5081c3`](https://github.com/atlassian-labs/atlaspack/commit/a5081c3f9207d28716ee4edd3841de1830ea4b80) Thanks [@JakeLane](https://github.com/JakeLane)! - Add feature flag 'useNewPrelude' which enables a micro-optimisation removing a 'for in' call and replacing with undefined check
27
+
28
+ ### Patch Changes
29
+
30
+ - 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)]:
31
+ - @atlaspack/feature-flags@2.24.0
32
+ - @atlaspack/utils@2.19.0
33
+ - @atlaspack/plugin@2.14.28
34
+ - @atlaspack/types@2.15.18
35
+
36
+ ## 2.21.3
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
41
+ - @atlaspack/feature-flags@2.23.2
42
+ - @atlaspack/rust@3.6.2
43
+ - @atlaspack/utils@2.18.4
44
+ - @atlaspack/plugin@2.14.27
45
+ - @atlaspack/types@2.15.17
46
+
47
+ ## 2.21.2
48
+
49
+ ### Patch Changes
50
+
51
+ - [#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
52
+
53
+ - [#755](https://github.com/atlassian-labs/atlaspack/pull/755) [`b6e72b6`](https://github.com/atlassian-labs/atlaspack/commit/b6e72b6dd2b517cbb0e700fa69e63332d3eacb1e) Thanks [@benjervis](https://github.com/benjervis)! - Allow runtime assets to be marked as requiring execution on load
54
+
55
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
56
+ - @atlaspack/feature-flags@2.23.1
57
+ - @atlaspack/diagnostic@2.14.3
58
+ - @atlaspack/plugin@2.14.26
59
+ - @atlaspack/types@2.15.16
60
+ - @atlaspack/utils@2.18.3
61
+ - @atlaspack/rust@3.6.1
62
+
63
+ ## 2.21.1
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
68
+ - @atlaspack/feature-flags@2.23.0
69
+ - @atlaspack/utils@2.18.2
70
+ - @atlaspack/plugin@2.14.25
71
+ - @atlaspack/types@2.15.15
72
+
73
+ ## 2.21.0
74
+
75
+ ### Minor Changes
76
+
77
+ - [#732](https://github.com/atlassian-labs/atlaspack/pull/732) [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45) Thanks [@vykimnguyen](https://github.com/vykimnguyen)! - add tesseract context
78
+
79
+ ### Patch Changes
80
+
81
+ - [#744](https://github.com/atlassian-labs/atlaspack/pull/744) [`3718bff`](https://github.com/atlassian-labs/atlaspack/commit/3718bff20484138e405e321472336ac058432e10) Thanks [@benjervis](https://github.com/benjervis)! - Fix the scope hoisting improvements feature by making all entry assets of a bundle
82
+ wrapped, which means there is no top level scope.
83
+ - 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)]:
84
+ - @atlaspack/rust@3.6.0
85
+ - @atlaspack/feature-flags@2.22.0
86
+ - @atlaspack/utils@2.18.1
87
+ - @atlaspack/plugin@2.14.24
88
+ - @atlaspack/types@2.15.14
89
+
90
+ ## 2.20.0
91
+
92
+ ### Minor Changes
93
+
94
+ - [#731](https://github.com/atlassian-labs/atlaspack/pull/731) [`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2) Thanks [@marcins](https://github.com/marcins)! - Implement "inline isolated" scripts
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
99
+ - @atlaspack/feature-flags@2.21.0
100
+ - @atlaspack/utils@2.18.0
101
+ - @atlaspack/rust@3.5.0
102
+ - @atlaspack/types@2.15.13
103
+ - @atlaspack/plugin@2.14.23
104
+
105
+ ## 2.19.1
106
+
107
+ ### Patch Changes
108
+
109
+ - [#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
110
+
111
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94), [`12bee0e`](https://github.com/atlassian-labs/atlaspack/commit/12bee0e23f0464d7f6bd3e24fbe0d19c126d587d)]:
112
+ - @atlaspack/feature-flags@2.20.1
113
+ - @atlaspack/diagnostic@2.14.2
114
+ - @atlaspack/plugin@2.14.22
115
+ - @atlaspack/types@2.15.12
116
+ - @atlaspack/utils@2.17.4
117
+ - @atlaspack/rust@3.4.2
118
+
119
+ ## 2.19.0
120
+
121
+ ### Minor Changes
122
+
123
+ - [#721](https://github.com/atlassian-labs/atlaspack/pull/721) [`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd) Thanks [@benjervis](https://github.com/benjervis)! - Add support for bundle merging based on `webpackChunkName` comments.
124
+
125
+ Adding a `webpackChunkName` comment to an import will allow the bundler to merge multiple imports into a single bundle.
126
+
127
+ e.g.:
128
+
129
+ ```ts
130
+ import(/* webpackChunkName: "my-chunk" */ './my-module');
131
+ import(/* webpackChunkName: "my-chunk" */ './another-module');
132
+ ```
133
+
134
+ This can be enabled with the feature flag `supportWebpackChunkName`.
135
+
136
+ ### Patch Changes
137
+
138
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
139
+ - @atlaspack/feature-flags@2.20.0
140
+ - @atlaspack/types@2.15.11
141
+ - @atlaspack/utils@2.17.3
142
+ - @atlaspack/plugin@2.14.21
143
+
144
+ ## 2.18.2
145
+
146
+ ### Patch Changes
147
+
148
+ - [#702](https://github.com/atlassian-labs/atlaspack/pull/702) [`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa) Thanks [@alshdavid](https://github.com/alshdavid)! - Fixes to Flow types
149
+
150
+ - 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)]:
151
+ - @atlaspack/plugin@2.14.20
152
+ - @atlaspack/feature-flags@2.19.2
153
+ - @atlaspack/utils@2.17.2
154
+ - @atlaspack/types@2.15.10
155
+
156
+ ## 2.18.1
157
+
158
+ ### Patch Changes
159
+
160
+ - Updated dependencies [[`13aef17`](https://github.com/atlassian-labs/atlaspack/commit/13aef177eea289a6e40d2113b5ec1ac9be18a33d)]:
161
+ - @atlaspack/feature-flags@2.19.1
162
+ - @atlaspack/utils@2.17.1
163
+ - @atlaspack/types@2.15.9
164
+ - @atlaspack/plugin@2.14.19
165
+
166
+ ## 2.18.0
167
+
168
+ ### Minor Changes
169
+
170
+ - [#640](https://github.com/atlassian-labs/atlaspack/pull/640) [`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d) Thanks [@JakeLane](https://github.com/JakeLane)! - Clean up conditional bundling feature flags
171
+
172
+ ### Patch Changes
173
+
174
+ - 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)]:
175
+ - @atlaspack/feature-flags@2.19.0
176
+ - @atlaspack/utils@2.17.0
177
+ - @atlaspack/rust@3.4.1
178
+ - @atlaspack/types@2.15.8
179
+ - @atlaspack/plugin@2.14.18
180
+
181
+ ## 2.17.1
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies [[`c75bf55`](https://github.com/atlassian-labs/atlaspack/commit/c75bf553fff4decc285b5fd499a275853b18f8f2)]:
186
+ - @atlaspack/rust@3.4.0
187
+ - @atlaspack/utils@2.16.1
188
+ - @atlaspack/types@2.15.7
189
+ - @atlaspack/plugin@2.14.17
190
+
191
+ ## 2.17.0
192
+
193
+ ### Minor Changes
194
+
195
+ - [#659](https://github.com/atlassian-labs/atlaspack/pull/659) [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529) Thanks [@benjervis](https://github.com/benjervis)! - Add the `asset-file-names-in-output` debug tool, which adds a comment to each asset inserted into a bundle that help identify it
196
+
197
+ ### Patch Changes
198
+
199
+ - Updated dependencies [[`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c), [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
200
+ - @atlaspack/feature-flags@2.18.4
201
+ - @atlaspack/utils@2.16.0
202
+ - @atlaspack/types@2.15.6
203
+ - @atlaspack/plugin@2.14.16
204
+
205
+ ## 2.16.2
206
+
207
+ ### Patch Changes
208
+
209
+ - [#654](https://github.com/atlassian-labs/atlaspack/pull/654) [`4d7abde`](https://github.com/atlassian-labs/atlaspack/commit/4d7abde0a6faa148bcf330b08d820f171f853b76) Thanks [@marcins](https://github.com/marcins)! - Fixes constant inlining to work correctly with scope hoisting optimisations
210
+
211
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be)]:
212
+ - @atlaspack/feature-flags@2.18.3
213
+ - @atlaspack/utils@2.15.3
214
+ - @atlaspack/types@2.15.5
215
+ - @atlaspack/plugin@2.14.15
216
+
217
+ ## 2.16.1
218
+
219
+ ### Patch Changes
220
+
221
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
222
+ - @atlaspack/feature-flags@2.18.2
223
+ - @atlaspack/utils@2.15.2
224
+ - @atlaspack/types@2.15.4
225
+ - @atlaspack/plugin@2.14.14
226
+
227
+ ## 2.16.0
228
+
229
+ ### Minor Changes
230
+
231
+ - [#644](https://github.com/atlassian-labs/atlaspack/pull/644) [`fc59be7`](https://github.com/atlassian-labs/atlaspack/commit/fc59be71f43dd87d3e6fb7f3f50c424d2b664858) Thanks [@marcins](https://github.com/marcins)! - Removes the unused unstable `forceSkipWrapAssets` feature
232
+
233
+ ### Patch Changes
234
+
235
+ - [#633](https://github.com/atlassian-labs/atlaspack/pull/633) [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b) Thanks [@sbhuiyan-atlassian](https://github.com/sbhuiyan-atlassian)! - Ported various HMR changes from Parcel
236
+
237
+ - Updated dependencies [[`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
238
+ - @atlaspack/feature-flags@2.18.1
239
+ - @atlaspack/types@2.15.3
240
+ - @atlaspack/utils@2.15.1
241
+ - @atlaspack/plugin@2.14.13
242
+
243
+ ## 2.15.0
244
+
245
+ ### Minor Changes
246
+
247
+ - [#627](https://github.com/atlassian-labs/atlaspack/pull/627) [`85c52d3`](https://github.com/atlassian-labs/atlaspack/commit/85c52d3f7717b3c84a118d18ab98cfbfd71dcbd2) Thanks [@benjervis](https://github.com/benjervis)! - Expands the situations where scope hoisting may be applied to include assets with no dependencies, regardless of whether if they have a wrapped ancestor.
248
+
249
+ Can be enabled with the `applyScopeHoistingImprovement` feature flag.
250
+
251
+ ### Patch Changes
252
+
253
+ - [#632](https://github.com/atlassian-labs/atlaspack/pull/632) [`10fbcfb`](https://github.com/atlassian-labs/atlaspack/commit/10fbcfbfa49c7a83da5d7c40983e36e87f524a75) Thanks [@marcins](https://github.com/marcins)! - Added a new feature flag `inlineConstOptimisationFix` which when enabled changes the behaviour for output of constant modules. This fixes two issues with constant modules:
254
+ - Previously constant modules, if they needed a namespace anywhere, would have a namespace everywhere, with this change they only have a namespace in the bundles where needed.
255
+ - Previously in the case of wrapped assets, a constant module dependnecy of that wrapped asset would be rendered after the module - which meant the minifier would not be able to inline the constants safely. With this flag all constant modules are rendered at the top of the bundle.
256
+
257
+ - 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)]:
258
+ - @atlaspack/feature-flags@2.18.0
259
+ - @atlaspack/utils@2.15.0
260
+ - @atlaspack/types@2.15.2
261
+ - @atlaspack/plugin@2.14.12
262
+
263
+ ## 2.14.11
264
+
265
+ ### Patch Changes
266
+
267
+ - Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
268
+ - @atlaspack/feature-flags@2.17.0
269
+ - @atlaspack/utils@2.14.11
270
+ - @atlaspack/types@2.15.1
271
+ - @atlaspack/plugin@2.14.11
272
+
273
+ ## 2.14.10
274
+
275
+ ### Patch Changes
276
+
277
+ - Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196), [`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
278
+ - @atlaspack/types@2.15.0
279
+ - @atlaspack/rust@3.3.5
280
+ - @atlaspack/plugin@2.14.10
281
+ - @atlaspack/utils@2.14.10
282
+
283
+ ## 2.14.9
284
+
285
+ ### Patch Changes
286
+
287
+ - 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)]:
288
+ - @atlaspack/rust@3.3.4
289
+ - @atlaspack/feature-flags@2.16.0
290
+ - @atlaspack/utils@2.14.9
291
+ - @atlaspack/types@2.14.9
292
+ - @atlaspack/plugin@2.14.9
293
+
294
+ ## 2.14.8
295
+
296
+ ### Patch Changes
297
+
298
+ - 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)]:
299
+ - @atlaspack/feature-flags@2.15.1
300
+ - @atlaspack/rust@3.3.3
301
+ - @atlaspack/utils@2.14.8
302
+ - @atlaspack/types@2.14.8
303
+ - @atlaspack/plugin@2.14.8
304
+
3
305
  ## 2.14.7
4
306
 
5
307
  ### Patch Changes
@@ -18,6 +18,13 @@ function _sourceMap() {
18
18
  };
19
19
  return data;
20
20
  }
21
+ function _featureFlags() {
22
+ const data = require("@atlaspack/feature-flags");
23
+ _featureFlags = function () {
24
+ return data;
25
+ };
26
+ return data;
27
+ }
21
28
  function _assert() {
22
29
  const data = _interopRequireDefault(require("assert"));
23
30
  _assert = function () {
@@ -91,6 +98,7 @@ class DevPackager {
91
98
  // If this is the main entry of a script rather than a module, we need to hoist it
92
99
  // outside the bundle wrapper function so that its variables are exposed as globals.
93
100
  if (this.bundle.env.sourceType === 'script' && asset === this.bundle.getMainEntry()) {
101
+ // @ts-expect-error TS2322
94
102
  script = results[i++];
95
103
  return;
96
104
  }
@@ -108,6 +116,19 @@ class DevPackager {
108
116
  deps[specifier] = dep.specifier;
109
117
  }
110
118
  }
119
+ if ((0, _featureFlags().getFeatureFlag)('hmrImprovements')) {
120
+ // Add dependencies for parcelRequire calls added by runtimes
121
+ // so that the HMR runtime can correctly traverse parents.
122
+ let hmrDeps = asset.meta.hmrDeps;
123
+ if (this.options.hmrOptions && Array.isArray(hmrDeps)) {
124
+ for (let id of hmrDeps) {
125
+ (0, _assert().default)(typeof id === 'string');
126
+ deps[id] = id;
127
+ }
128
+ }
129
+ }
130
+
131
+ // @ts-expect-error TS2339
111
132
  let {
112
133
  code,
113
134
  mapBuffer
@@ -152,12 +173,16 @@ class DevPackager {
152
173
  // runtimes with a parcelRequire call.
153
174
  if (this.bundle.env.sourceType === 'script' && script) {
154
175
  let entryMap;
176
+ // @ts-expect-error TS2339
155
177
  let mapBuffer = script.mapBuffer;
156
178
  if (mapBuffer) {
157
179
  entryMap = new (_sourceMap().default)(this.options.projectRoot, mapBuffer);
158
180
  }
159
- contents += (0, _utils2.replaceScriptDependencies)(this.bundleGraph, this.bundle, script.code, entryMap, this.parcelRequireName);
181
+ contents += (0, _utils2.replaceScriptDependencies)(this.bundleGraph, this.bundle,
182
+ // @ts-expect-error TS2339
183
+ script.code, entryMap, this.parcelRequireName);
160
184
  if (this.bundle.env.sourceMap && entryMap) {
185
+ // @ts-expect-error TS2551
161
186
  map.addSourceMap(entryMap, lineOffset);
162
187
  }
163
188
  }
@@ -175,7 +200,7 @@ class DevPackager {
175
200
  interpreter = _interpreter;
176
201
  }
177
202
  let importScripts = '';
178
- if (this.bundle.env.isWorker()) {
203
+ if (this.bundle.env.isWorker() || this.bundle.env.isTesseract()) {
179
204
  let bundles = this.bundleGraph.getReferencedBundles(this.bundle);
180
205
  for (let b of bundles) {
181
206
  importScripts += `importScripts("${(0, _utils().relativeBundlePath)(this.bundle, b)}");\n`;
@@ -187,7 +212,7 @@ class DevPackager {
187
212
  );
188
213
  }
189
214
  isEntry() {
190
- return !this.bundleGraph.hasParentBundleOfType(this.bundle, 'js') || this.bundle.env.isIsolated() || this.bundle.bundleBehavior === 'isolated';
215
+ return !this.bundleGraph.hasParentBundleOfType(this.bundle, 'js') || this.bundle.env.isIsolated() || this.bundle.bundleBehavior === 'isolated' || this.bundle.bundleBehavior === 'inlineIsolated';
191
216
  }
192
217
  }
193
218
  exports.DevPackager = DevPackager;