@swc/core 1.2.192 → 1.2.197

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/.prettierignore CHANGED
@@ -28,6 +28,7 @@ crates/swc_webpack_ast/tests/
28
28
  # Generated by testing system
29
29
  output/
30
30
  output.js
31
+ output.*.js
31
32
  output.full.js
32
33
  output.mjs
33
34
  index.g.js
package/CHANGELOG.md CHANGED
@@ -5,6 +5,213 @@
5
5
 
6
6
 
7
7
 
8
+ - **(css/parser)** Fix parsing of constant function (#4856) ([e083d0e](https://github.com/swc-project/swc/commit/e083d0eb5a0fe0589876722ce4bdecfe9c006120))
9
+
10
+
11
+ - **(es/helpers)** Update `@swc/core` of `@swc/helpers` (#4861) ([a4bffcf](https://github.com/swc-project/swc/commit/a4bffcf186f4ce265483ddf3497f7bfd283b1f1b))
12
+
13
+
14
+ - **(es/minifier)** Don't drop `typeof` (#4883) ([06420d9](https://github.com/swc-project/swc/commit/06420d99bb9e63ed6bb39a8f4f006a66665570d3))
15
+
16
+
17
+ - **(html/parser)** Fix span of lexer errors (#4846) ([f830726](https://github.com/swc-project/swc/commit/f83072602725e0357a54bd6a5a0655c9430c7f95))
18
+
19
+
20
+ - **(html/parser)** Fix end span of closed tags (#4860) ([67b5e3d](https://github.com/swc-project/swc/commit/67b5e3d5b3cb6591efd42ae3a06c9528e2f6954a))
21
+
22
+
23
+ - **(html/parser)** Fix span (#4868) ([0d5d7c4](https://github.com/swc-project/swc/commit/0d5d7c4d5e21d5faee64847ed027a791ed3db89d))
24
+
25
+ ### Features
26
+
27
+
28
+
29
+ - **(es/codegen)** Support other source map implementations (#4879) ([6bc33cb](https://github.com/swc-project/swc/commit/6bc33cb042ee3b95010735f34ec3d30d52fb7f40))
30
+
31
+
32
+ - **(es/minifier)** Remove extra parens in `BinExpr` (#4878) ([83ae6a1](https://github.com/swc-project/swc/commit/83ae6a1f1f8a293d88557767790ed5d662e84bc3))
33
+
34
+
35
+ - **(html/minifier)** Improve compression of attributes (#4849) ([c5df1a3](https://github.com/swc-project/swc/commit/c5df1a3a54e1445163efb38b4da339ccaed699d0))
36
+
37
+
38
+ - **(html/minifier)** Remove spaces between nodes (#4880) ([6e0f5f1](https://github.com/swc-project/swc/commit/6e0f5f1c4814b49f208a0170797bc8804df10f18))
39
+
40
+
41
+ - **(wasm)** Add json error (#4853) ([fd3501b](https://github.com/swc-project/swc/commit/fd3501bf87f4e711e72e9e8fd12f64f4cfa08157))
42
+
43
+ ### Performance
44
+
45
+
46
+
47
+ - **(html/parser)** Improve lexer performance (#4869) ([8b67bb9](https://github.com/swc-project/swc/commit/8b67bb99fa98f2ad7299d309e30e3d6c1208232f))
48
+
49
+ ### Testing
50
+
51
+
52
+
53
+ - **(html/parser)** Refactor tests (#4865) ([762c72d](https://github.com/swc-project/swc/commit/762c72d1c92e7c6786f69769aac5c1093da6b575))
54
+
55
+
56
+ - **(html/parser)** Test html5lib spans (#4875) ([ad9508a](https://github.com/swc-project/swc/commit/ad9508a79641c72a15ae58a0f66dd6684348644f))
57
+
58
+ ## [1.2.196] - 2022-05-31
59
+
60
+ ### Bug Fixes
61
+
62
+
63
+
64
+ - **(es/codegen)** Handle comments in binary expressions (#4817) ([1db71cc](https://github.com/swc-project/swc/commit/1db71cc3b3b230c09e1661093385f8f39915292c))
65
+
66
+
67
+ - **(es/compat)** Use define for non-spread props (#4754) ([573bcb5](https://github.com/swc-project/swc/commit/573bcb5b492da2b27a79876c337aa0268beb706d))
68
+
69
+
70
+ - **(es/minifier)** Consider side effects while removing an object spread (#4788) ([1c48a8c](https://github.com/swc-project/swc/commit/1c48a8c8f4ede63661c663cb548345a417c63cf6))
71
+
72
+
73
+ - **(es/minifier)** Don't create names which is same as an unresolved var (#4806) ([073b146](https://github.com/swc-project/swc/commit/073b1469e6c81a9342bd09394832ee96339f07b4))
74
+
75
+
76
+ - **(es/minifier)** Apply name mangler for more cases (#4840) ([0567f67](https://github.com/swc-project/swc/commit/0567f67664cc2407d45bf8b17821edc4b828198c))
77
+
78
+
79
+ - **(es/minifier)** Make `if_return` to not drop required returns (#4847) ([8365c3d](https://github.com/swc-project/swc/commit/8365c3d0dff96c195fccebd4269ac279c068a624))
80
+
81
+
82
+ - **(es/modules)** Fix local scoped amd require (#4800) ([2b03047](https://github.com/swc-project/swc/commit/2b03047cb088b96e5c054055780b54e4f48ae486))
83
+
84
+
85
+ - **(es/modules)** Fix lazy option of common js (#4807) ([f4c6a20](https://github.com/swc-project/swc/commit/f4c6a20654ac172ce84e7fc0e0c5d7c98acbc535))
86
+
87
+
88
+ - **(html/codegen)** Handle HTML entities correctly (#4782) ([d833057](https://github.com/swc-project/swc/commit/d833057d7917a376a020fd1ac3d3869b1dce1db7))
89
+
90
+
91
+ - **(html/codegen)** Remove optional html start tag (#4811) ([c9d0e37](https://github.com/swc-project/swc/commit/c9d0e37ab97afe71f14877caed69d9371b6af6e7))
92
+
93
+
94
+ - **(html/codegen)** Omit on more cases (#4825) ([2b7f4b2](https://github.com/swc-project/swc/commit/2b7f4b2f563a0c55482c0bc052dfd02df42b9eca))
95
+
96
+
97
+ - **(html/codegen)** Prevent omitting body for title (#4814) ([7407f21](https://github.com/swc-project/swc/commit/7407f218f8b294d3d7998334bdd908abc519ecb0))
98
+
99
+
100
+ - **(html/minifier)** Avoid removing id with spaces (#4786) ([c35cb59](https://github.com/swc-project/swc/commit/c35cb598f7a95795ea9d11ab7510f540a17d0639))
101
+
102
+
103
+ - **(html/parser)** Handle BOM (#4843) ([20fee8a](https://github.com/swc-project/swc/commit/20fee8abeee9f8e54082b02b2e83cff7ce72cc8f))
104
+
105
+
106
+ - **(node)** Fix logging (#4833) ([c462d4d](https://github.com/swc-project/swc/commit/c462d4d7c6488a01416fcd7ea8759461e2c3a97a))
107
+
108
+
109
+ - **(node/types)** Add `ignoreDynamic` to typescript types (#4832) ([e30449b](https://github.com/swc-project/swc/commit/e30449b097964e1ed883493bc4d0996e175db784))
110
+
111
+
112
+ - **(preset-env)** Ignore unknown versions (#4809) ([78d4c2c](https://github.com/swc-project/swc/commit/78d4c2c46a767bd2409a2053c9d1f01f2d34c3f4))
113
+
114
+ ### Features
115
+
116
+
117
+
118
+ - **(css/ast)** Add missing `Is` derive (#4810) ([29884b0](https://github.com/swc-project/swc/commit/29884b0caf02d0daea73eeff47b2e6cf93ec3acd))
119
+
120
+
121
+ - **(es/compat)** Don't create vars for computed class methods if possible (#4805) ([dc911dc](https://github.com/swc-project/swc/commit/dc911dcae630dd1afe9add7c2b2bafcb77705ea7))
122
+
123
+
124
+ - **(html/codegen)** Omit start and end tags if it is possible (#4780) ([c6ec9f9](https://github.com/swc-project/swc/commit/c6ec9f9cf20e149ce9cb8364403a031e3547741c))
125
+
126
+
127
+ - **(html/minifier)** Compress more json types (#4813) ([731c59e](https://github.com/swc-project/swc/commit/731c59e9b7df7edd300871db8657e0d49b6b9a80))
128
+
129
+
130
+ - **(html/minifier)** Compress viewport meta (#4844) ([e6ae299](https://github.com/swc-project/swc/commit/e6ae299776d0ad285f2a93ed7371ff8592999ac6))
131
+
132
+
133
+ - **(node)** Split css binding (#4831) ([2e9ab05](https://github.com/swc-project/swc/commit/2e9ab0518a33f3b97541864cb7051a45606904ca))
134
+
135
+ ### Miscellaneous Tasks
136
+
137
+
138
+
139
+ - **(ci)** Fix CI (#4852) ([142387b](https://github.com/swc-project/swc/commit/142387b2a307d062ce6c21d4cd3aac05dae8756f))
140
+
141
+
142
+ - **(common)** Update rustc (#4828) ([f847709](https://github.com/swc-project/swc/commit/f84770978719cda6eea689b9dd90259e9c2f05c9))
143
+
144
+ ### Performance
145
+
146
+
147
+
148
+ - **(es/minifier)** Make more passes parallel (#4821) ([4b27df9](https://github.com/swc-project/swc/commit/4b27df9f123262161e06f242a4d5098364a9844f))
149
+
150
+
151
+ - **(es/minifier)** Make name mangler parallel (#4824) ([58b2427](https://github.com/swc-project/swc/commit/58b24278eeb83ac721aa73634b67849378d61f82))
152
+
153
+
154
+ - **(html/parser)** Improve lexer (#4796) ([8894e77](https://github.com/swc-project/swc/commit/8894e77bc15d63080c5d91048734b33a8f299369))
155
+
156
+
157
+ - **(html/parser)** Improve lexer (#4802) ([f71ef61](https://github.com/swc-project/swc/commit/f71ef61cb7056e602a9ae94f20d0757e795eff18))
158
+
159
+
160
+ - **(html/parser)** Improve lexer performance even more (#4819) ([759688c](https://github.com/swc-project/swc/commit/759688c412f05032d79d3cdab42f65c83c57c005))
161
+
162
+ ### Refactor
163
+
164
+
165
+
166
+ - **(es/transforms)** Remove `concurrent` (#4808) ([a487fc1](https://github.com/swc-project/swc/commit/a487fc1d2827b5922eed0a03227da3e7a1371502))
167
+
168
+ ### Testing
169
+
170
+
171
+
172
+ - **(es/minifier)** Add snapshots for the mangler (#4823) ([7f69b9c](https://github.com/swc-project/swc/commit/7f69b9c80f44195164db9a4641642582e5d23979))
173
+
174
+
175
+ - **(html/codegen)** Avoid newline at the end of file (#4815) ([a6beda8](https://github.com/swc-project/swc/commit/a6beda81ca9812d95c4ac21b8ff67e672d10f57a))
176
+
177
+ ## [1.2.194] - 2022-05-25
178
+
179
+ ### Bug Fixes
180
+
181
+
182
+
183
+ - **(common)** Fix jemalloc (#4794) ([adf70f6](https://github.com/swc-project/swc/commit/adf70f6c0747e5a61d79897e11c70be0b41680d4))
184
+
185
+ ### Features
186
+
187
+
188
+
189
+ - **(html/minifier)** Improve script type compression (#4785) ([b5e481c](https://github.com/swc-project/swc/commit/b5e481c114bba00c4f69f8df2a6309cd46ba8962))
190
+
191
+
192
+ - **(html/minifier)** Sort classes (#4783) ([11aa6be](https://github.com/swc-project/swc/commit/11aa6bee9e1a0f31d2aec9b5111a4682e4c633ea))
193
+
194
+
195
+ - **(plugin)** Implement `SourceMap.span_to_*` (#4781) ([a937357](https://github.com/swc-project/swc/commit/a937357d47471222db4e62021ec507cd96597d9c))
196
+
197
+ ### Performance
198
+
199
+
200
+
201
+ - **(common)** Use `jemalloc` for linux (#4791) ([6f04e84](https://github.com/swc-project/swc/commit/6f04e846394df4bcf1e82748cd5df739b7df7a96))
202
+
203
+ ### Testing
204
+
205
+
206
+
207
+ - **(es)** Make execution tests faster (#4789) ([38a866a](https://github.com/swc-project/swc/commit/38a866a900ff979b070bc2152459d41d75f414df))
208
+
209
+ ## [1.2.192] - 2022-05-24
210
+
211
+ ### Bug Fixes
212
+
213
+
214
+
8
215
  - **(css/parser)** Allow `var()` call in color functions (#4713) ([07d31aa](https://github.com/swc-project/swc/commit/07d31aa50ab8420ee2e8e2751833385470337eae))
9
216
 
10
217
 
@@ -101,6 +308,9 @@
101
308
  - **(ci)** Fix CI (#4747) ([0f85f7b](https://github.com/swc-project/swc/commit/0f85f7b9de970648509aff8ac466fe25ab004cdb))
102
309
 
103
310
 
311
+ - **(ci)** Fix CI (#4779) ([c31b0a3](https://github.com/swc-project/swc/commit/c31b0a38ea16b784489bb4125403c1625d3895f1))
312
+
313
+
104
314
  - **(es/minifier)** Add `#[doc(hidden)]` (#4751) ([22bf5f0](https://github.com/swc-project/swc/commit/22bf5f014e35ac4994d70660ae7e25cfb4659caf))
105
315
 
106
316
  ### Performance
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.192",
3
+ "version": "1.2.197",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -135,18 +135,18 @@
135
135
  "url": "https://opencollective.com/swc"
136
136
  },
137
137
  "optionalDependencies": {
138
- "@swc/core-win32-x64-msvc": "1.2.192",
139
- "@swc/core-darwin-x64": "1.2.192",
140
- "@swc/core-linux-x64-gnu": "1.2.192",
141
- "@swc/core-linux-x64-musl": "1.2.192",
142
- "@swc/core-freebsd-x64": "1.2.192",
143
- "@swc/core-win32-ia32-msvc": "1.2.192",
144
- "@swc/core-linux-arm64-gnu": "1.2.192",
145
- "@swc/core-linux-arm-gnueabihf": "1.2.192",
146
- "@swc/core-darwin-arm64": "1.2.192",
147
- "@swc/core-android-arm64": "1.2.192",
148
- "@swc/core-linux-arm64-musl": "1.2.192",
149
- "@swc/core-win32-arm64-msvc": "1.2.192",
150
- "@swc/core-android-arm-eabi": "1.2.192"
138
+ "@swc/core-win32-x64-msvc": "1.2.197",
139
+ "@swc/core-darwin-x64": "1.2.197",
140
+ "@swc/core-linux-x64-gnu": "1.2.197",
141
+ "@swc/core-linux-x64-musl": "1.2.197",
142
+ "@swc/core-freebsd-x64": "1.2.197",
143
+ "@swc/core-win32-ia32-msvc": "1.2.197",
144
+ "@swc/core-linux-arm64-gnu": "1.2.197",
145
+ "@swc/core-linux-arm-gnueabihf": "1.2.197",
146
+ "@swc/core-darwin-arm64": "1.2.197",
147
+ "@swc/core-android-arm64": "1.2.197",
148
+ "@swc/core-linux-arm64-musl": "1.2.197",
149
+ "@swc/core-win32-arm64-msvc": "1.2.197",
150
+ "@swc/core-android-arm-eabi": "1.2.197"
151
151
  }
152
152
  }
package/types.d.ts CHANGED
@@ -731,6 +731,10 @@ export interface BaseModuleConfig {
731
731
  * Defaults to `false`.
732
732
  */
733
733
  noInterop?: boolean;
734
+ /**
735
+ * If set to true, dynamic imports will be preserved.
736
+ */
737
+ ignoreDynamic?: boolean;
734
738
  }
735
739
  export interface Es6Config extends BaseModuleConfig {
736
740
  type: "es6";