@atlaspack/transformer-html 2.14.5-canary.32 → 2.14.5-canary.320

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,292 @@
1
1
  # @atlaspack/transformer-html
2
2
 
3
+ ## 2.15.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`91738fd`](https://github.com/atlassian-labs/atlaspack/commit/91738fd77cb6b3b7acc93e799327ec283d27f7c0), [`38f3569`](https://github.com/atlassian-labs/atlaspack/commit/38f3569a7024357c43274666312bc6d024bfe5f9), [`3f6a3b8`](https://github.com/atlassian-labs/atlaspack/commit/3f6a3b8df4589fd4d65c072281c7f33bd37341d6), [`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`d8024ce`](https://github.com/atlassian-labs/atlaspack/commit/d8024ce5c9ced1a9bc39144c979138be3a12b2fb), [`308e7ff`](https://github.com/atlassian-labs/atlaspack/commit/308e7ff979c05c1ae97fe6b08a65666b53d86cc7), [`d98c992`](https://github.com/atlassian-labs/atlaspack/commit/d98c992a56121a4f9f6a011ced5e103f96fe3999)]:
8
+ - @atlaspack/rust@3.13.0
9
+ - @atlaspack/feature-flags@2.27.2
10
+ - @atlaspack/plugin@2.14.41
11
+
12
+ ## 2.15.17
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`25fee72`](https://github.com/atlassian-labs/atlaspack/commit/25fee723d2228d0482ec8a8f1b8379ccd2977ce7), [`6fac01d`](https://github.com/atlassian-labs/atlaspack/commit/6fac01dbb1bfc5b971176c1a1c008297bf4b8f91), [`2f3af93`](https://github.com/atlassian-labs/atlaspack/commit/2f3af9374bcc082e6f4835f6f5a2b98e32ea45b4), [`432d571`](https://github.com/atlassian-labs/atlaspack/commit/432d571ea4e9fc67be12304fcafe8c445e844174), [`042cd95`](https://github.com/atlassian-labs/atlaspack/commit/042cd95a32ad38cd02d57aa3344c36d4e7ab8f9c), [`28f5424`](https://github.com/atlassian-labs/atlaspack/commit/28f5424f7e2080dd4fbbeb1bc5314a530197a23e), [`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`5710532`](https://github.com/atlassian-labs/atlaspack/commit/57105322b26ce42af2cbfcc0506cff929e50b630), [`44eb8c3`](https://github.com/atlassian-labs/atlaspack/commit/44eb8c388d3e63f1ef5d835aee7aee5d1bb0620f)]:
17
+ - @atlaspack/rust@3.12.0
18
+ - @atlaspack/feature-flags@2.27.1
19
+ - @atlaspack/plugin@2.14.40
20
+
21
+ ## 2.15.16
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [[`7dd5bd8`](https://github.com/atlassian-labs/atlaspack/commit/7dd5bd89ff60c7b324347d772729eb4c3314f01e), [`c8a0e51`](https://github.com/atlassian-labs/atlaspack/commit/c8a0e51b1096d038a64644ad02fe68383f58682a), [`8eb84ee`](https://github.com/atlassian-labs/atlaspack/commit/8eb84ee61a42bfe87c58079b610802b07a6a13e4), [`71900f3`](https://github.com/atlassian-labs/atlaspack/commit/71900f3508d53c3882ca8ea71501ba3069687d4e), [`73168c2`](https://github.com/atlassian-labs/atlaspack/commit/73168c275a5d9abff9907bcf536b340bca1ed5f0), [`2c4953e`](https://github.com/atlassian-labs/atlaspack/commit/2c4953e20dc1a6b012792081667aefeb9340505e), [`3fe7d4e`](https://github.com/atlassian-labs/atlaspack/commit/3fe7d4e821bee162fcbbaf9278b107a5eead944f)]:
26
+ - @atlaspack/rust@3.11.0
27
+ - @atlaspack/feature-flags@2.27.0
28
+ - @atlaspack/plugin@2.14.39
29
+
30
+ ## 2.15.15
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`ec3abe4`](https://github.com/atlassian-labs/atlaspack/commit/ec3abe4dffc98560a850fd2f71fb566577e6c99c), [`c7fe3f7`](https://github.com/atlassian-labs/atlaspack/commit/c7fe3f76f247e9e20299e205e2df0a16c418eaf2), [`cfb4707`](https://github.com/atlassian-labs/atlaspack/commit/cfb4707087498e4fa4dcf10753fe984a248d196b), [`1468695`](https://github.com/atlassian-labs/atlaspack/commit/1468695fc0c9d06f060a6da9e9b0e154f11dff34), [`f31b041`](https://github.com/atlassian-labs/atlaspack/commit/f31b04107e9077c9946aadb99f6f91bb69703bb7), [`8180981`](https://github.com/atlassian-labs/atlaspack/commit/8180981be14c00f9570adb70d3f350bd91d6ec0a), [`ae77e74`](https://github.com/atlassian-labs/atlaspack/commit/ae77e7452a466b43b3fa5bed24d4ba26345ed765), [`f0a496f`](https://github.com/atlassian-labs/atlaspack/commit/f0a496f70fc8652e090cf1b3f6260e8cfbb796e2), [`540f253`](https://github.com/atlassian-labs/atlaspack/commit/540f253dfdcd1a5caebbdc0b197319d439404aae)]:
35
+ - @atlaspack/feature-flags@2.26.2
36
+ - @atlaspack/rust@3.10.0
37
+ - @atlaspack/plugin@2.14.38
38
+
39
+ ## 2.15.14
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [[`339b600`](https://github.com/atlassian-labs/atlaspack/commit/339b60095d755742cea50f811d08ccc44a4ae521), [`373ee2d`](https://github.com/atlassian-labs/atlaspack/commit/373ee2d3b5cc315df1e90e647619f915892e2b87)]:
44
+ - @atlaspack/rust@3.9.1
45
+ - @atlaspack/feature-flags@2.26.1
46
+ - @atlaspack/plugin@2.14.37
47
+
48
+ ## 2.15.13
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [[`02f6aa1`](https://github.com/atlassian-labs/atlaspack/commit/02f6aa1906953fc184d2b49c905c2ef815cb878d), [`58527ee`](https://github.com/atlassian-labs/atlaspack/commit/58527eec15c1aebaaadbeb63586f3082c16beae3), [`525898e`](https://github.com/atlassian-labs/atlaspack/commit/525898e33cc229a4bc938ae853732be36d20c01a), [`cfb39a0`](https://github.com/atlassian-labs/atlaspack/commit/cfb39a0d729eb620cf2ca1611750a2bf7a080d08), [`d0c7bea`](https://github.com/atlassian-labs/atlaspack/commit/d0c7bea04458255b4c5d4299600e734b5f919fe1), [`1086c6a`](https://github.com/atlassian-labs/atlaspack/commit/1086c6a2c59271b63b3fb78e6acdb9d3a0dbf354), [`9cd9521`](https://github.com/atlassian-labs/atlaspack/commit/9cd9521978f783046e2ae4ce78f2de7aeb07d073), [`5776be2`](https://github.com/atlassian-labs/atlaspack/commit/5776be21f70a3f2b9471ba33da3ba1a883f21f1a)]:
53
+ - @atlaspack/rust@3.9.0
54
+ - @atlaspack/feature-flags@2.26.0
55
+ - @atlaspack/plugin@2.14.36
56
+
57
+ ## 2.15.12
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [[`79a7e22`](https://github.com/atlassian-labs/atlaspack/commit/79a7e22ef119891a2f4180a9d3cc66b38dd52092), [`3da8e69`](https://github.com/atlassian-labs/atlaspack/commit/3da8e690605472d81c531366b65fa9844f8ca337), [`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)]:
62
+ - @atlaspack/feature-flags@2.25.5
63
+ - @atlaspack/rust@3.8.3
64
+ - @atlaspack/plugin@2.14.35
65
+
66
+ ## 2.15.11
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies [[`662d3c6`](https://github.com/atlassian-labs/atlaspack/commit/662d3c627888b16bf27df15cfac5a9094509e93d)]:
71
+ - @atlaspack/feature-flags@2.25.4
72
+ - @atlaspack/plugin@2.14.34
73
+
74
+ ## 2.15.10
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [[`f07351a`](https://github.com/atlassian-labs/atlaspack/commit/f07351a2398b6a8e5155a2daad77e69b7dcb2b4b)]:
79
+ - @atlaspack/feature-flags@2.25.3
80
+ - @atlaspack/plugin@2.14.33
81
+
82
+ ## 2.15.9
83
+
84
+ ### Patch Changes
85
+
86
+ - 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)]:
87
+ - @atlaspack/feature-flags@2.25.2
88
+ - @atlaspack/rust@3.8.2
89
+ - @atlaspack/plugin@2.14.32
90
+
91
+ ## 2.15.8
92
+
93
+ ### Patch Changes
94
+
95
+ - [#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.
96
+
97
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922), [`686a398`](https://github.com/atlassian-labs/atlaspack/commit/686a398faa1f9e19cbf9274add2c46e246bafba8)]:
98
+ - @atlaspack/diagnostic@2.14.4
99
+ - @atlaspack/feature-flags@2.25.1
100
+ - @atlaspack/plugin@2.14.31
101
+ - @atlaspack/rust@3.8.1
102
+
103
+ ## 2.15.7
104
+
105
+ ### Patch Changes
106
+
107
+ - 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)]:
108
+ - @atlaspack/feature-flags@2.25.0
109
+ - @atlaspack/rust@3.8.0
110
+ - @atlaspack/plugin@2.14.30
111
+
112
+ ## 2.15.6
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies [[`830261d`](https://github.com/atlassian-labs/atlaspack/commit/830261dcf4a40293090b61cab52fd75d5683c73f), [`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
117
+ - @atlaspack/feature-flags@2.24.1
118
+ - @atlaspack/rust@3.7.0
119
+ - @atlaspack/plugin@2.14.29
120
+
121
+ ## 2.15.5
122
+
123
+ ### Patch Changes
124
+
125
+ - 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)]:
126
+ - @atlaspack/feature-flags@2.24.0
127
+ - @atlaspack/plugin@2.14.28
128
+
129
+ ## 2.15.4
130
+
131
+ ### Patch Changes
132
+
133
+ - [#757](https://github.com/atlassian-labs/atlaspack/pull/757) [`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3) Thanks [@marcins](https://github.com/marcins)! - Clean up the `inlineIsolatedScripts` feature flag
134
+
135
+ - Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
136
+ - @atlaspack/feature-flags@2.23.2
137
+ - @atlaspack/rust@3.6.2
138
+ - @atlaspack/plugin@2.14.27
139
+
140
+ ## 2.15.3
141
+
142
+ ### Patch Changes
143
+
144
+ - [#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
145
+
146
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
147
+ - @atlaspack/feature-flags@2.23.1
148
+ - @atlaspack/diagnostic@2.14.3
149
+ - @atlaspack/plugin@2.14.26
150
+ - @atlaspack/rust@3.6.1
151
+
152
+ ## 2.15.2
153
+
154
+ ### Patch Changes
155
+
156
+ - Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
157
+ - @atlaspack/feature-flags@2.23.0
158
+ - @atlaspack/plugin@2.14.25
159
+
160
+ ## 2.15.1
161
+
162
+ ### Patch Changes
163
+
164
+ - 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)]:
165
+ - @atlaspack/rust@3.6.0
166
+ - @atlaspack/feature-flags@2.22.0
167
+ - @atlaspack/plugin@2.14.24
168
+
169
+ ## 2.15.0
170
+
171
+ ### Minor Changes
172
+
173
+ - [#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
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/rust@3.5.0
180
+ - @atlaspack/plugin@2.14.23
181
+
182
+ ## 2.14.22
183
+
184
+ ### Patch Changes
185
+
186
+ - [#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
187
+
188
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
189
+ - @atlaspack/diagnostic@2.14.2
190
+ - @atlaspack/plugin@2.14.22
191
+ - @atlaspack/rust@3.4.2
192
+
193
+ ## 2.14.21
194
+
195
+ ### Patch Changes
196
+
197
+ - Updated dependencies []:
198
+ - @atlaspack/plugin@2.14.21
199
+
200
+ ## 2.14.20
201
+
202
+ ### Patch Changes
203
+
204
+ - [#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
205
+
206
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
207
+ - @atlaspack/plugin@2.14.20
208
+
209
+ ## 2.14.19
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies []:
214
+ - @atlaspack/plugin@2.14.19
215
+
216
+ ## 2.14.18
217
+
218
+ ### Patch Changes
219
+
220
+ - Updated dependencies [[`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5)]:
221
+ - @atlaspack/rust@3.4.1
222
+ - @atlaspack/plugin@2.14.18
223
+
224
+ ## 2.14.17
225
+
226
+ ### Patch Changes
227
+
228
+ - Updated dependencies [[`c75bf55`](https://github.com/atlassian-labs/atlaspack/commit/c75bf553fff4decc285b5fd499a275853b18f8f2)]:
229
+ - @atlaspack/rust@3.4.0
230
+ - @atlaspack/plugin@2.14.17
231
+
232
+ ## 2.14.16
233
+
234
+ ### Patch Changes
235
+
236
+ - Updated dependencies []:
237
+ - @atlaspack/plugin@2.14.16
238
+
239
+ ## 2.14.15
240
+
241
+ ### Patch Changes
242
+
243
+ - Updated dependencies []:
244
+ - @atlaspack/plugin@2.14.15
245
+
246
+ ## 2.14.14
247
+
248
+ ### Patch Changes
249
+
250
+ - Updated dependencies []:
251
+ - @atlaspack/plugin@2.14.14
252
+
253
+ ## 2.14.13
254
+
255
+ ### Patch Changes
256
+
257
+ - Updated dependencies []:
258
+ - @atlaspack/plugin@2.14.13
259
+
260
+ ## 2.14.12
261
+
262
+ ### Patch Changes
263
+
264
+ - Updated dependencies []:
265
+ - @atlaspack/plugin@2.14.12
266
+
267
+ ## 2.14.11
268
+
269
+ ### Patch Changes
270
+
271
+ - Updated dependencies []:
272
+ - @atlaspack/plugin@2.14.11
273
+
274
+ ## 2.14.10
275
+
276
+ ### Patch Changes
277
+
278
+ - Updated dependencies [[`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
279
+ - @atlaspack/rust@3.3.5
280
+ - @atlaspack/plugin@2.14.10
281
+
282
+ ## 2.14.9
283
+
284
+ ### Patch Changes
285
+
286
+ - 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), [`42a775d`](https://github.com/atlassian-labs/atlaspack/commit/42a775de8eec638ad188f3271964170d8c04d84b), [`29c2f10`](https://github.com/atlassian-labs/atlaspack/commit/29c2f106de9679adfb5afa04e1910471dc65a427), [`1ef91fc`](https://github.com/atlassian-labs/atlaspack/commit/1ef91fcc863fdd2831511937083dbbc1263b3d9d)]:
287
+ - @atlaspack/rust@3.3.4
288
+ - @atlaspack/plugin@2.14.9
289
+
3
290
  ## 2.14.8
4
291
 
5
292
  ### Patch Changes
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.transformerOpts = void 0;
7
+ exports.parseHTML = parseHTML;
8
+ const plugin_1 = require("@atlaspack/plugin");
9
+ const posthtml_parser_1 = require("posthtml-parser");
10
+ const nullthrows_1 = __importDefault(require("nullthrows"));
11
+ const posthtml_1 = __importDefault(require("posthtml"));
12
+ const posthtml_render_1 = require("posthtml-render");
13
+ const semver_1 = __importDefault(require("semver"));
14
+ const dependencies_1 = __importDefault(require("./dependencies"));
15
+ const inline_1 = __importDefault(require("./inline"));
16
+ const diagnostic_1 = __importDefault(require("@atlaspack/diagnostic"));
17
+ function parseHTML(code, xmlMode) {
18
+ return {
19
+ type: 'posthtml',
20
+ version: '0.4.1',
21
+ program: (0, posthtml_parser_1.parser)(code, {
22
+ lowerCaseTags: true,
23
+ lowerCaseAttributeNames: true,
24
+ sourceLocations: true,
25
+ xmlMode,
26
+ }),
27
+ };
28
+ }
29
+ exports.transformerOpts = {
30
+ canReuseAST({ ast }) {
31
+ return ast.type === 'posthtml' && semver_1.default.satisfies(ast.version, '^0.4.0');
32
+ },
33
+ async parse({ asset }) {
34
+ const code = await asset.getCode();
35
+ const xmlMode = asset.type === 'xhtml';
36
+ return parseHTML(code, xmlMode);
37
+ },
38
+ async transform({ asset, options }) {
39
+ if (asset.type === 'htm') {
40
+ asset.type = 'html';
41
+ }
42
+ asset.bundleBehavior = 'isolated';
43
+ let ast = (0, nullthrows_1.default)(await asset.getAST());
44
+ let hasModuleScripts;
45
+ try {
46
+ hasModuleScripts = (0, dependencies_1.default)(asset, ast);
47
+ }
48
+ catch (errors) {
49
+ if (Array.isArray(errors)) {
50
+ throw new diagnostic_1.default({
51
+ diagnostic: errors.map((error) => ({
52
+ message: error.message,
53
+ origin: '@atlaspack/transformer-html',
54
+ codeFrames: [
55
+ {
56
+ filePath: error.filePath,
57
+ language: 'html',
58
+ codeHighlights: [error.loc],
59
+ },
60
+ ],
61
+ })),
62
+ });
63
+ }
64
+ throw errors;
65
+ }
66
+ const { assets: inlineAssets, hasModuleScripts: hasInlineModuleScripts } = (0, inline_1.default)(asset, ast);
67
+ const result = [asset, ...inlineAssets];
68
+ // empty <script></script> is added to make sure HMR is working even if user
69
+ // didn't add any.
70
+ if (options.hmrOptions && !(hasModuleScripts || hasInlineModuleScripts)) {
71
+ const script = {
72
+ tag: 'script',
73
+ attrs: {
74
+ src: asset.addURLDependency('hmr.js', {
75
+ priority: 'parallel',
76
+ }),
77
+ },
78
+ content: [],
79
+ };
80
+ const found = findFirstMatch(ast, [{ tag: 'body' }, { tag: 'html' }]);
81
+ if (found) {
82
+ found.content = found.content || [];
83
+ found.content.push(script);
84
+ }
85
+ else {
86
+ // Insert at the very end.
87
+ ast.program.push(script);
88
+ }
89
+ asset.setAST(ast);
90
+ result.push({
91
+ type: 'js',
92
+ content: '',
93
+ uniqueKey: 'hmr.js',
94
+ });
95
+ }
96
+ return result;
97
+ },
98
+ generate({ ast, asset }) {
99
+ return {
100
+ content: (0, posthtml_render_1.render)(ast.program, {
101
+ // @ts-expect-error TS2322
102
+ closingSingleTag: asset.type === 'xhtml' ? 'slash' : undefined,
103
+ }),
104
+ };
105
+ },
106
+ };
107
+ exports.default = new plugin_1.Transformer(exports.transformerOpts);
108
+ function findFirstMatch(ast, expressions) {
109
+ let found;
110
+ for (const expression of expressions) {
111
+ // @ts-expect-error TS2339
112
+ (0, posthtml_1.default)().match.call(ast.program, expression, (node) => {
113
+ found = node;
114
+ return node;
115
+ });
116
+ if (found) {
117
+ return found;
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,262 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = collectDependencies;
7
+ const posthtml_1 = __importDefault(require("posthtml"));
8
+ const srcset_1 = require("srcset");
9
+ // A list of all attributes that may produce a dependency
10
+ // Based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
11
+ const ATTRS = {
12
+ src: [
13
+ 'script',
14
+ 'img',
15
+ 'audio',
16
+ 'video',
17
+ 'source',
18
+ 'track',
19
+ 'iframe',
20
+ 'embed',
21
+ 'amp-img',
22
+ ],
23
+ // Using href with <script> is described here: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script
24
+ href: ['link', 'a', 'use', 'script', 'image'],
25
+ srcset: ['img', 'source'],
26
+ imagesrcset: ['link'],
27
+ poster: ['video'],
28
+ 'xlink:href': ['use', 'image', 'script'],
29
+ content: ['meta'],
30
+ data: ['object'],
31
+ };
32
+ // A list of metadata that should produce a dependency
33
+ // Based on:
34
+ // - http://schema.org/
35
+ // - http://ogp.me
36
+ // - https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup
37
+ // - https://msdn.microsoft.com/en-us/library/dn255024.aspx
38
+ // - https://vk.com/dev/publications
39
+ const META = {
40
+ property: [
41
+ 'og:image',
42
+ 'og:image:url',
43
+ 'og:image:secure_url',
44
+ 'og:audio',
45
+ 'og:audio:secure_url',
46
+ 'og:video',
47
+ 'og:video:secure_url',
48
+ 'vk:image',
49
+ ],
50
+ name: [
51
+ 'twitter:image',
52
+ 'msapplication-square150x150logo',
53
+ 'msapplication-square310x310logo',
54
+ 'msapplication-square70x70logo',
55
+ 'msapplication-wide310x150logo',
56
+ 'msapplication-TileImage',
57
+ 'msapplication-config',
58
+ ],
59
+ itemprop: [
60
+ 'image',
61
+ 'logo',
62
+ 'screenshot',
63
+ 'thumbnailUrl',
64
+ 'contentUrl',
65
+ 'downloadUrl',
66
+ ],
67
+ };
68
+ const FEED_TYPES = new Set(['application/rss+xml', 'application/atom+xml']);
69
+ // Options to be passed to `addDependency` for certain tags + attributes
70
+ const OPTIONS = {
71
+ a: {
72
+ href: { needsStableName: true },
73
+ },
74
+ iframe: {
75
+ src: { needsStableName: true },
76
+ },
77
+ link(attrs) {
78
+ if (attrs.rel === 'stylesheet') {
79
+ return {
80
+ // Keep in the same bundle group as the HTML.
81
+ priority: 'parallel',
82
+ };
83
+ }
84
+ },
85
+ };
86
+ function collectSrcSetDependencies(asset, srcset, opts) {
87
+ let parsed = (0, srcset_1.parse)(srcset).map(({ url, ...v }) => ({
88
+ url: asset.addURLDependency(url, opts),
89
+ ...v,
90
+ }));
91
+ return (0, srcset_1.stringify)(parsed);
92
+ }
93
+ function getAttrDepHandler(attr) {
94
+ if (attr === 'srcset' || attr === 'imagesrcset') {
95
+ return collectSrcSetDependencies;
96
+ }
97
+ return (asset, src, opts) => asset.addURLDependency(src, opts);
98
+ }
99
+ function collectDependencies(asset, ast) {
100
+ let isDirty = false;
101
+ let hasModuleScripts = false;
102
+ let seen = new Set();
103
+ let errors = [];
104
+ // @ts-expect-error TS2339
105
+ (0, posthtml_1.default)().walk.call(ast.program, (node) => {
106
+ let { tag, attrs } = node;
107
+ if (!attrs || seen.has(node)) {
108
+ return node;
109
+ }
110
+ seen.add(node);
111
+ if (tag === 'meta') {
112
+ const isMetaDependency = Object.keys(attrs).some((attr) => {
113
+ // @ts-expect-error TS7053
114
+ let values = META[attr];
115
+ return (values &&
116
+ values.includes(attrs[attr]) &&
117
+ attrs.content !== '' &&
118
+ !(attrs.name === 'msapplication-config' && attrs.content === 'none'));
119
+ });
120
+ if (isMetaDependency) {
121
+ const metaAssetUrl = attrs.content;
122
+ if (metaAssetUrl) {
123
+ attrs.content = asset.addURLDependency(attrs.content, {
124
+ needsStableName: !(attrs.name && attrs.name.includes('msapplication')),
125
+ });
126
+ isDirty = true;
127
+ asset.setAST(ast);
128
+ }
129
+ }
130
+ return node;
131
+ }
132
+ if (tag === 'link' &&
133
+ (attrs.rel === 'canonical' ||
134
+ attrs.rel === 'manifest' ||
135
+ (attrs.rel === 'alternate' && FEED_TYPES.has(attrs.type))) &&
136
+ attrs.href) {
137
+ let href = attrs.href;
138
+ if (attrs.rel === 'manifest') {
139
+ // A hack to allow manifest.json rather than manifest.webmanifest.
140
+ // If a custom pipeline is used, it is responsible for running @atlaspack/transformer-webmanifest.
141
+ if (!href.includes(':')) {
142
+ href = 'webmanifest:' + href;
143
+ }
144
+ }
145
+ attrs.href = asset.addURLDependency(href, {
146
+ needsStableName: true,
147
+ });
148
+ isDirty = true;
149
+ asset.setAST(ast);
150
+ return node;
151
+ }
152
+ if (tag === 'script' && attrs.src) {
153
+ let sourceType = attrs.type === 'module' ? 'module' : 'script';
154
+ let loc = node.location
155
+ ? {
156
+ filePath: asset.filePath,
157
+ start: node.location.start,
158
+ end: {
159
+ line: node.location.end.line,
160
+ // PostHTML's location is inclusive
161
+ column: node.location.end.column + 1,
162
+ },
163
+ }
164
+ : undefined;
165
+ let outputFormat = 'global';
166
+ if (attrs.type === 'module' && asset.env.shouldScopeHoist) {
167
+ outputFormat = 'esmodule';
168
+ }
169
+ else {
170
+ if (attrs.type === 'module') {
171
+ attrs.defer = '';
172
+ }
173
+ delete attrs.type;
174
+ }
175
+ // If this is a <script type="module">, and not all of the browser targets support ESM natively,
176
+ // add a copy of the script tag with a nomodule attribute.
177
+ let copy;
178
+ if (outputFormat === 'esmodule' &&
179
+ !asset.env.supports('esmodules', true)) {
180
+ let attrs = Object.assign({}, node.attrs);
181
+ copy = { ...node, attrs };
182
+ delete attrs.type;
183
+ attrs.nomodule = '';
184
+ attrs.defer = '';
185
+ attrs.src = asset.addURLDependency(attrs.src, {
186
+ // Keep in the same bundle group as the HTML.
187
+ priority: 'parallel',
188
+ bundleBehavior: sourceType === 'script' || attrs.async != null
189
+ ? 'isolated'
190
+ : undefined,
191
+ env: {
192
+ // @ts-expect-error TS2322
193
+ sourceType,
194
+ outputFormat: 'global',
195
+ loc,
196
+ },
197
+ });
198
+ seen.add(copy);
199
+ }
200
+ attrs.src = asset.addURLDependency(attrs.src, {
201
+ // Keep in the same bundle group as the HTML.
202
+ priority: 'parallel',
203
+ // If the script is async it can be executed in any order, so it cannot depend
204
+ // on any sibling scripts for dependencies. Keep all dependencies together.
205
+ // Also, don't share dependencies between classic scripts and nomodule scripts
206
+ // because nomodule scripts won't run when modules are supported.
207
+ bundleBehavior: sourceType === 'script' || attrs.async != null
208
+ ? 'isolated'
209
+ : undefined,
210
+ env: {
211
+ // @ts-expect-error TS2322
212
+ sourceType,
213
+ // @ts-expect-error TS2322
214
+ outputFormat,
215
+ loc,
216
+ },
217
+ });
218
+ asset.setAST(ast);
219
+ if (sourceType === 'module')
220
+ hasModuleScripts = true;
221
+ return copy ? [node, copy] : node;
222
+ }
223
+ for (let attr in attrs) {
224
+ // Check for virtual paths
225
+ if (tag === 'a' && attrs[attr].split('#')[0].lastIndexOf('.') < 1) {
226
+ continue;
227
+ }
228
+ // Check for id references
229
+ if (attrs[attr][0] === '#') {
230
+ continue;
231
+ }
232
+ // @ts-expect-error TS7053
233
+ let elements = ATTRS[attr];
234
+ if (elements && elements.includes(node.tag)) {
235
+ // Check for empty string
236
+ if (attrs[attr].length === 0) {
237
+ errors.push({
238
+ message: `'${attr}' should not be empty string`,
239
+ filePath: asset.filePath,
240
+ loc: node.location,
241
+ });
242
+ }
243
+ let depHandler = getAttrDepHandler(attr);
244
+ // @ts-expect-error TS7053
245
+ let depOptionsHandler = OPTIONS[node.tag];
246
+ let depOptions = typeof depOptionsHandler === 'function'
247
+ ? depOptionsHandler(attrs, asset.env)
248
+ : depOptionsHandler && depOptionsHandler[attr];
249
+ attrs[attr] = depHandler(asset, attrs[attr], depOptions);
250
+ isDirty = true;
251
+ }
252
+ }
253
+ if (isDirty) {
254
+ asset.setAST(ast);
255
+ }
256
+ return node;
257
+ });
258
+ if (errors.length > 0) {
259
+ throw errors;
260
+ }
261
+ return hasModuleScripts;
262
+ }