@atlaspack/transformer-html 2.14.5-canary.36 → 2.14.5-canary.360
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 +345 -0
- package/dist/HTMLTransformer.js +120 -0
- package/dist/dependencies.js +262 -0
- package/dist/inline.js +162 -0
- package/lib/HTMLTransformer.js +4 -0
- package/lib/dependencies.js +10 -0
- package/lib/inline.js +14 -3
- package/lib/types/HTMLTransformer.d.ts +6 -0
- package/lib/types/dependencies.d.ts +2 -0
- package/lib/types/inline.d.ts +7 -0
- package/package.json +13 -10
- package/src/{HTMLTransformer.js → HTMLTransformer.ts} +9 -7
- package/src/{dependencies.js → dependencies.ts} +26 -15
- package/src/{inline.js → inline.ts} +21 -7
- package/test/{HTMLTransformer.test.js → HTMLTransformer.test.ts} +41 -27
- package/tsconfig.json +24 -0
- package/tsconfig.tsbuildinfo +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,350 @@
|
|
|
1
1
|
# @atlaspack/transformer-html
|
|
2
2
|
|
|
3
|
+
## 2.15.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`564fb4f`](https://github.com/atlassian-labs/atlaspack/commit/564fb4fecc2a20bdeb951863a8fac29b618d91b7), [`9df722c`](https://github.com/atlassian-labs/atlaspack/commit/9df722c38b225054883693ba9731344f701767a7), [`c31090c`](https://github.com/atlassian-labs/atlaspack/commit/c31090c9025f35d3fa8561b42dca170853a32e6f), [`565bab3`](https://github.com/atlassian-labs/atlaspack/commit/565bab3771cc334659d873cabff4cdfac0860cc7), [`34b01ec`](https://github.com/atlassian-labs/atlaspack/commit/34b01ec03e2264bd617be000465821e1ed11eae5), [`6e5fec1`](https://github.com/atlassian-labs/atlaspack/commit/6e5fec1406c53257be7e7fbe06c028beda70fcf1), [`e4e5522`](https://github.com/atlassian-labs/atlaspack/commit/e4e55222422d8c73653d3ea09f1a0d13946345b9)]:
|
|
8
|
+
- @atlaspack/rust@3.18.0
|
|
9
|
+
- @atlaspack/feature-flags@2.27.6
|
|
10
|
+
- @atlaspack/plugin@2.14.48
|
|
11
|
+
|
|
12
|
+
## 2.15.24
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`7cb8569`](https://github.com/atlassian-labs/atlaspack/commit/7cb85698143e381fcb887173b2bfd15f0aea7918), [`695339e`](https://github.com/atlassian-labs/atlaspack/commit/695339e4fd46df9590013c2ef4de74cb22225927)]:
|
|
17
|
+
- @atlaspack/rust@3.17.0
|
|
18
|
+
- @atlaspack/plugin@2.14.47
|
|
19
|
+
|
|
20
|
+
## 2.15.23
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [[`515149d`](https://github.com/atlassian-labs/atlaspack/commit/515149d0a0767d844af803efdc611646780ad0fe), [`02cc8b3`](https://github.com/atlassian-labs/atlaspack/commit/02cc8b32c06ca6b51806b33f6f707ca06e55e957), [`02cc8b3`](https://github.com/atlassian-labs/atlaspack/commit/02cc8b32c06ca6b51806b33f6f707ca06e55e957)]:
|
|
25
|
+
- @atlaspack/rust@3.16.0
|
|
26
|
+
- @atlaspack/feature-flags@2.27.5
|
|
27
|
+
- @atlaspack/plugin@2.14.46
|
|
28
|
+
|
|
29
|
+
## 2.15.22
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [[`793e78c`](https://github.com/atlassian-labs/atlaspack/commit/793e78c68eed25032e686f70cd77ea3601409b35)]:
|
|
34
|
+
- @atlaspack/feature-flags@2.27.4
|
|
35
|
+
- @atlaspack/plugin@2.14.45
|
|
36
|
+
|
|
37
|
+
## 2.15.21
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies [[`362a85d`](https://github.com/atlassian-labs/atlaspack/commit/362a85deb9722f769eeb5099bae915f8b858a126), [`c81b368`](https://github.com/atlassian-labs/atlaspack/commit/c81b368db20af701d9e019a11272b138f9cfe080)]:
|
|
42
|
+
- @atlaspack/rust@3.15.0
|
|
43
|
+
- @atlaspack/plugin@2.14.44
|
|
44
|
+
|
|
45
|
+
## 2.15.20
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies []:
|
|
50
|
+
- @atlaspack/plugin@2.14.43
|
|
51
|
+
|
|
52
|
+
## 2.15.19
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies [[`787290a`](https://github.com/atlassian-labs/atlaspack/commit/787290a63b3f781e7af86097201dfdb5a36c8551), [`cbb66a5`](https://github.com/atlassian-labs/atlaspack/commit/cbb66a554f7ad679fd4dfc9e2bf2d5abb859f846), [`7815a93`](https://github.com/atlassian-labs/atlaspack/commit/7815a931b18983c3f34a39990b2f4b8b86855cc6), [`25aa273`](https://github.com/atlassian-labs/atlaspack/commit/25aa2735f4db920960de3d65d3a427775086b7d5), [`9468e16`](https://github.com/atlassian-labs/atlaspack/commit/9468e164e8ca20a5e8f552f5dc203aa3716cb154), [`e55c80c`](https://github.com/atlassian-labs/atlaspack/commit/e55c80cd0ae3cc40356fe063cb7d45fbb9095356)]:
|
|
57
|
+
- @atlaspack/rust@3.14.0
|
|
58
|
+
- @atlaspack/feature-flags@2.27.3
|
|
59
|
+
- @atlaspack/plugin@2.14.42
|
|
60
|
+
|
|
61
|
+
## 2.15.18
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- 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)]:
|
|
66
|
+
- @atlaspack/rust@3.13.0
|
|
67
|
+
- @atlaspack/feature-flags@2.27.2
|
|
68
|
+
- @atlaspack/plugin@2.14.41
|
|
69
|
+
|
|
70
|
+
## 2.15.17
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- 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)]:
|
|
75
|
+
- @atlaspack/rust@3.12.0
|
|
76
|
+
- @atlaspack/feature-flags@2.27.1
|
|
77
|
+
- @atlaspack/plugin@2.14.40
|
|
78
|
+
|
|
79
|
+
## 2.15.16
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- 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)]:
|
|
84
|
+
- @atlaspack/rust@3.11.0
|
|
85
|
+
- @atlaspack/feature-flags@2.27.0
|
|
86
|
+
- @atlaspack/plugin@2.14.39
|
|
87
|
+
|
|
88
|
+
## 2.15.15
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- 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)]:
|
|
93
|
+
- @atlaspack/feature-flags@2.26.2
|
|
94
|
+
- @atlaspack/rust@3.10.0
|
|
95
|
+
- @atlaspack/plugin@2.14.38
|
|
96
|
+
|
|
97
|
+
## 2.15.14
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- Updated dependencies [[`339b600`](https://github.com/atlassian-labs/atlaspack/commit/339b60095d755742cea50f811d08ccc44a4ae521), [`373ee2d`](https://github.com/atlassian-labs/atlaspack/commit/373ee2d3b5cc315df1e90e647619f915892e2b87)]:
|
|
102
|
+
- @atlaspack/rust@3.9.1
|
|
103
|
+
- @atlaspack/feature-flags@2.26.1
|
|
104
|
+
- @atlaspack/plugin@2.14.37
|
|
105
|
+
|
|
106
|
+
## 2.15.13
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- 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)]:
|
|
111
|
+
- @atlaspack/rust@3.9.0
|
|
112
|
+
- @atlaspack/feature-flags@2.26.0
|
|
113
|
+
- @atlaspack/plugin@2.14.36
|
|
114
|
+
|
|
115
|
+
## 2.15.12
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- 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)]:
|
|
120
|
+
- @atlaspack/feature-flags@2.25.5
|
|
121
|
+
- @atlaspack/rust@3.8.3
|
|
122
|
+
- @atlaspack/plugin@2.14.35
|
|
123
|
+
|
|
124
|
+
## 2.15.11
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- Updated dependencies [[`662d3c6`](https://github.com/atlassian-labs/atlaspack/commit/662d3c627888b16bf27df15cfac5a9094509e93d)]:
|
|
129
|
+
- @atlaspack/feature-flags@2.25.4
|
|
130
|
+
- @atlaspack/plugin@2.14.34
|
|
131
|
+
|
|
132
|
+
## 2.15.10
|
|
133
|
+
|
|
134
|
+
### Patch Changes
|
|
135
|
+
|
|
136
|
+
- Updated dependencies [[`f07351a`](https://github.com/atlassian-labs/atlaspack/commit/f07351a2398b6a8e5155a2daad77e69b7dcb2b4b)]:
|
|
137
|
+
- @atlaspack/feature-flags@2.25.3
|
|
138
|
+
- @atlaspack/plugin@2.14.33
|
|
139
|
+
|
|
140
|
+
## 2.15.9
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- 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)]:
|
|
145
|
+
- @atlaspack/feature-flags@2.25.2
|
|
146
|
+
- @atlaspack/rust@3.8.2
|
|
147
|
+
- @atlaspack/plugin@2.14.32
|
|
148
|
+
|
|
149
|
+
## 2.15.8
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- [#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.
|
|
154
|
+
|
|
155
|
+
- Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922), [`686a398`](https://github.com/atlassian-labs/atlaspack/commit/686a398faa1f9e19cbf9274add2c46e246bafba8)]:
|
|
156
|
+
- @atlaspack/diagnostic@2.14.4
|
|
157
|
+
- @atlaspack/feature-flags@2.25.1
|
|
158
|
+
- @atlaspack/plugin@2.14.31
|
|
159
|
+
- @atlaspack/rust@3.8.1
|
|
160
|
+
|
|
161
|
+
## 2.15.7
|
|
162
|
+
|
|
163
|
+
### Patch Changes
|
|
164
|
+
|
|
165
|
+
- 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)]:
|
|
166
|
+
- @atlaspack/feature-flags@2.25.0
|
|
167
|
+
- @atlaspack/rust@3.8.0
|
|
168
|
+
- @atlaspack/plugin@2.14.30
|
|
169
|
+
|
|
170
|
+
## 2.15.6
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- Updated dependencies [[`830261d`](https://github.com/atlassian-labs/atlaspack/commit/830261dcf4a40293090b61cab52fd75d5683c73f), [`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
|
|
175
|
+
- @atlaspack/feature-flags@2.24.1
|
|
176
|
+
- @atlaspack/rust@3.7.0
|
|
177
|
+
- @atlaspack/plugin@2.14.29
|
|
178
|
+
|
|
179
|
+
## 2.15.5
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- 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)]:
|
|
184
|
+
- @atlaspack/feature-flags@2.24.0
|
|
185
|
+
- @atlaspack/plugin@2.14.28
|
|
186
|
+
|
|
187
|
+
## 2.15.4
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- [#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
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
|
|
194
|
+
- @atlaspack/feature-flags@2.23.2
|
|
195
|
+
- @atlaspack/rust@3.6.2
|
|
196
|
+
- @atlaspack/plugin@2.14.27
|
|
197
|
+
|
|
198
|
+
## 2.15.3
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- [#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
|
|
203
|
+
|
|
204
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
|
|
205
|
+
- @atlaspack/feature-flags@2.23.1
|
|
206
|
+
- @atlaspack/diagnostic@2.14.3
|
|
207
|
+
- @atlaspack/plugin@2.14.26
|
|
208
|
+
- @atlaspack/rust@3.6.1
|
|
209
|
+
|
|
210
|
+
## 2.15.2
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
|
|
215
|
+
- @atlaspack/feature-flags@2.23.0
|
|
216
|
+
- @atlaspack/plugin@2.14.25
|
|
217
|
+
|
|
218
|
+
## 2.15.1
|
|
219
|
+
|
|
220
|
+
### Patch Changes
|
|
221
|
+
|
|
222
|
+
- 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)]:
|
|
223
|
+
- @atlaspack/rust@3.6.0
|
|
224
|
+
- @atlaspack/feature-flags@2.22.0
|
|
225
|
+
- @atlaspack/plugin@2.14.24
|
|
226
|
+
|
|
227
|
+
## 2.15.0
|
|
228
|
+
|
|
229
|
+
### Minor Changes
|
|
230
|
+
|
|
231
|
+
- [#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
|
|
232
|
+
|
|
233
|
+
### Patch Changes
|
|
234
|
+
|
|
235
|
+
- Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
|
|
236
|
+
- @atlaspack/feature-flags@2.21.0
|
|
237
|
+
- @atlaspack/rust@3.5.0
|
|
238
|
+
- @atlaspack/plugin@2.14.23
|
|
239
|
+
|
|
240
|
+
## 2.14.22
|
|
241
|
+
|
|
242
|
+
### Patch Changes
|
|
243
|
+
|
|
244
|
+
- [#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
|
|
245
|
+
|
|
246
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
|
|
247
|
+
- @atlaspack/diagnostic@2.14.2
|
|
248
|
+
- @atlaspack/plugin@2.14.22
|
|
249
|
+
- @atlaspack/rust@3.4.2
|
|
250
|
+
|
|
251
|
+
## 2.14.21
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- Updated dependencies []:
|
|
256
|
+
- @atlaspack/plugin@2.14.21
|
|
257
|
+
|
|
258
|
+
## 2.14.20
|
|
259
|
+
|
|
260
|
+
### Patch Changes
|
|
261
|
+
|
|
262
|
+
- [#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
|
|
263
|
+
|
|
264
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
|
|
265
|
+
- @atlaspack/plugin@2.14.20
|
|
266
|
+
|
|
267
|
+
## 2.14.19
|
|
268
|
+
|
|
269
|
+
### Patch Changes
|
|
270
|
+
|
|
271
|
+
- Updated dependencies []:
|
|
272
|
+
- @atlaspack/plugin@2.14.19
|
|
273
|
+
|
|
274
|
+
## 2.14.18
|
|
275
|
+
|
|
276
|
+
### Patch Changes
|
|
277
|
+
|
|
278
|
+
- Updated dependencies [[`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5)]:
|
|
279
|
+
- @atlaspack/rust@3.4.1
|
|
280
|
+
- @atlaspack/plugin@2.14.18
|
|
281
|
+
|
|
282
|
+
## 2.14.17
|
|
283
|
+
|
|
284
|
+
### Patch Changes
|
|
285
|
+
|
|
286
|
+
- Updated dependencies [[`c75bf55`](https://github.com/atlassian-labs/atlaspack/commit/c75bf553fff4decc285b5fd499a275853b18f8f2)]:
|
|
287
|
+
- @atlaspack/rust@3.4.0
|
|
288
|
+
- @atlaspack/plugin@2.14.17
|
|
289
|
+
|
|
290
|
+
## 2.14.16
|
|
291
|
+
|
|
292
|
+
### Patch Changes
|
|
293
|
+
|
|
294
|
+
- Updated dependencies []:
|
|
295
|
+
- @atlaspack/plugin@2.14.16
|
|
296
|
+
|
|
297
|
+
## 2.14.15
|
|
298
|
+
|
|
299
|
+
### Patch Changes
|
|
300
|
+
|
|
301
|
+
- Updated dependencies []:
|
|
302
|
+
- @atlaspack/plugin@2.14.15
|
|
303
|
+
|
|
304
|
+
## 2.14.14
|
|
305
|
+
|
|
306
|
+
### Patch Changes
|
|
307
|
+
|
|
308
|
+
- Updated dependencies []:
|
|
309
|
+
- @atlaspack/plugin@2.14.14
|
|
310
|
+
|
|
311
|
+
## 2.14.13
|
|
312
|
+
|
|
313
|
+
### Patch Changes
|
|
314
|
+
|
|
315
|
+
- Updated dependencies []:
|
|
316
|
+
- @atlaspack/plugin@2.14.13
|
|
317
|
+
|
|
318
|
+
## 2.14.12
|
|
319
|
+
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- Updated dependencies []:
|
|
323
|
+
- @atlaspack/plugin@2.14.12
|
|
324
|
+
|
|
325
|
+
## 2.14.11
|
|
326
|
+
|
|
327
|
+
### Patch Changes
|
|
328
|
+
|
|
329
|
+
- Updated dependencies []:
|
|
330
|
+
- @atlaspack/plugin@2.14.11
|
|
331
|
+
|
|
332
|
+
## 2.14.10
|
|
333
|
+
|
|
334
|
+
### Patch Changes
|
|
335
|
+
|
|
336
|
+
- Updated dependencies [[`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
|
|
337
|
+
- @atlaspack/rust@3.3.5
|
|
338
|
+
- @atlaspack/plugin@2.14.10
|
|
339
|
+
|
|
340
|
+
## 2.14.9
|
|
341
|
+
|
|
342
|
+
### Patch Changes
|
|
343
|
+
|
|
344
|
+
- 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)]:
|
|
345
|
+
- @atlaspack/rust@3.3.4
|
|
346
|
+
- @atlaspack/plugin@2.14.9
|
|
347
|
+
|
|
3
348
|
## 2.14.8
|
|
4
349
|
|
|
5
350
|
### 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
|
+
}
|