@swc/core 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/package.json +16 -15
package/CHANGELOG.md CHANGED
@@ -5,6 +5,226 @@
5
5
 
6
6
 
7
7
 
8
+ - **(es/codegen)** Align sourcemap with terser (#5657) ([2ba8815](https://github.com/swc-project/swc/commit/2ba88154fced01cb6ad0428207cf88ad7ddee75c))
9
+
10
+
11
+ - **(es/codegen)** Fix codegen of a negative number (#5980) ([bc2c0f4](https://github.com/swc-project/swc/commit/bc2c0f413396cc5ab436b1e87e5462f5c2475e4e))
12
+
13
+
14
+ - **(es/compat)** Fix the order of initialization for decorators on computed keys (#5964) ([e410102](https://github.com/swc-project/swc/commit/e41010263379fc9a7676925f089aa9913c8f0f04))
15
+
16
+
17
+ - **(es/compat)** Fix unrolling of arrays in `generator` (#5965) ([1f892cd](https://github.com/swc-project/swc/commit/1f892cd9798cadcbf7cbfa182e164a358410ee2e))
18
+
19
+
20
+ - **(es/minifier)** Fix skipping logic of sequential inliner (#5956) ([9d19742](https://github.com/swc-project/swc/commit/9d1974248dc5424ee20f7c315efadde4c696f720))
21
+
22
+
23
+ - **(es/minifier)** Fix analysis of parameters (#5954) ([33a15c8](https://github.com/swc-project/swc/commit/33a15c8d8275ea6c9d4101d7bc77ecba9f420924))
24
+
25
+
26
+ - **(es/minifier)** Fix analysis of nested function-like properties (#5963) ([0fb2c1d](https://github.com/swc-project/swc/commit/0fb2c1d5a539d656f337d0ef4c9392f01817986d))
27
+
28
+
29
+ - **(es/minifier)** Preserve exports in DCE (#5973) ([aff4ea5](https://github.com/swc-project/swc/commit/aff4ea5f4412c17c58288459a92a1d9b28ba58c4))
30
+
31
+
32
+ - **(es/minifier)** Don't panic on jsx or ts (#5984) ([0067f71](https://github.com/swc-project/swc/commit/0067f719dd0a072ef43e51698f159506287d7f35))
33
+
34
+
35
+ - **(es/minifier)** Remove print ([af8236d](https://github.com/swc-project/swc/commit/af8236d689e29980ef1bc8d7d05ed61e37649b28))
36
+
37
+
38
+ - **(es/minifier)** Remove wrong variable joiner pass (#5992) ([f8358fb](https://github.com/swc-project/swc/commit/f8358fbe2bf17de6a04870c58f58768d0966ec18))
39
+
40
+
41
+ - **(es/parser)** Allow `as` in destructuring assignment (#5948) ([cdd69d0](https://github.com/swc-project/swc/commit/cdd69d0145d22008448f394e8b39ba98291d87fe))
42
+
43
+
44
+ - **(es/resolver)** Use a separate mark for the name of `FnExpr` (#5959) ([573418f](https://github.com/swc-project/swc/commit/573418fc96edbf3f2c5e1a0c4e83a68b4c80b4e1))
45
+
46
+
47
+ - **(es/testing)** Remove cycle ([d0e2e3c](https://github.com/swc-project/swc/commit/d0e2e3c43b01c3e18b2b854213ebc8217f36c73b))
48
+
49
+ ### Features
50
+
51
+
52
+
53
+ - **(css/codegen)** Minify idents (#5972) ([b3a05a0](https://github.com/swc-project/swc/commit/b3a05a057ac39d0ceef60b4227f675a2a2c3556d))
54
+
55
+
56
+ - **(css/minifier)** Remove duplicate `@counter-style` at-rules (#5970) ([dfdad69](https://github.com/swc-project/swc/commit/dfdad69c03d13d8950e89358f6587f2bc66d5912))
57
+
58
+
59
+ - **(dbg-swc)** Add a size debugger for next.js (#5945) ([b219fa2](https://github.com/swc-project/swc/commit/b219fa2f015f39e1f3da17ade777a4bc92b6eabe))
60
+
61
+
62
+ - **(es/minifier)** Ignore more expressions in sequential inliner (#5961) ([dcd516d](https://github.com/swc-project/swc/commit/dcd516d2bd5e9fcdc11a96c014671958ddede1de))
63
+
64
+
65
+ - **(es/minifier)** Evaluate more literals in comparison (#5976) ([0e69890](https://github.com/swc-project/swc/commit/0e698907641bb74f90fa0fffd157c5fffe1298b6))
66
+
67
+
68
+ - **(es/minifier)** Ignore more return values (#5981) ([08f6e81](https://github.com/swc-project/swc/commit/08f6e81d8e9219e73ea8e312f213aa170ba7acc9))
69
+
70
+
71
+ - **(es/minifier)** Drop more variables while invoking IIFE (#5987) ([c411e5d](https://github.com/swc-project/swc/commit/c411e5d55292c83d73f821e3a1e285cf3584b668))
72
+
73
+
74
+ - **(es/minifier)** Improve fn-local analysis for better inlining (#5955) ([1a11cfd](https://github.com/swc-project/swc/commit/1a11cfd46fd8269934f33c1128e48a47d5de093e))
75
+
76
+
77
+ - **(es/minifier)** Invoke sequential inliner for inlined IIFEs (#5991) ([aeb7f30](https://github.com/swc-project/swc/commit/aeb7f300a814b6303c29eda6124cf4dd333f3936))
78
+
79
+ ### Miscellaneous Tasks
80
+
81
+
82
+
83
+ - **(ci)** Fix benchmark action (#5978) ([f7128d2](https://github.com/swc-project/swc/commit/f7128d20f08206a3d4e313af075a2cb28dfdc58b))
84
+
85
+
86
+ - **(es/transforms)** Setup parallel benchmark (#5974) ([8066d8f](https://github.com/swc-project/swc/commit/8066d8f60ece891a555a4c24d63feee85c27da92))
87
+
88
+
89
+ - **(html/minifier)** Typo (#5995) ([a716b40](https://github.com/swc-project/swc/commit/a716b40d05a57065e2f5dbaad5f6a17dceee7860))
90
+
91
+ ### Performance
92
+
93
+
94
+
95
+ - **(css/minifier)** Merge all passes (#5971) ([7d7c2d3](https://github.com/swc-project/swc/commit/7d7c2d3a9c75286a4d12d5f1d1b45501f170b512))
96
+
97
+
98
+ - **(es)** Don't share `Globals` (#5975) ([19131e1](https://github.com/swc-project/swc/commit/19131e168e65b13a4d4ddf823aec4211a2502ceb))
99
+
100
+
101
+ - **(es/minifier)** Optimize `MultiReplacer` (#5977) ([e37bb55](https://github.com/swc-project/swc/commit/e37bb551015b68b108569015a03dc00477f621ee))
102
+
103
+
104
+ - **(html/minifier)** Improve performance (#5983) ([6c08971](https://github.com/swc-project/swc/commit/6c08971a53b8ba87b920173539c1165640e7f2a3))
105
+
106
+ ### Testing
107
+
108
+
109
+
110
+ - **(es/minifier)** Categorize terser tests (#5960) ([48cddc1](https://github.com/swc-project/swc/commit/48cddc16f67ed5ac904a1e67a6ec096da5747cd2))
111
+
112
+
113
+ - **(es/minifier)** Remove mangle-only snapshots (#5979) ([8c4873f](https://github.com/swc-project/swc/commit/8c4873f81efce53356b2eccdcdc32d5df41a89b2))
114
+
115
+
116
+ - **(es/minifier)** Add tests for benchmark files (#5986) ([0cfc724](https://github.com/swc-project/swc/commit/0cfc724018374cef591694d5239c519aa97c1622))
117
+
118
+
119
+ - **(es/plugin)** Reenable compat test (#5969) ([ca38a70](https://github.com/swc-project/swc/commit/ca38a7027ead28ecb9723d7e99e9123af3c6af14))
120
+
121
+ ### Build
122
+
123
+
124
+
125
+ - **(rustc)** Update rustc (#5943) ([3c3529c](https://github.com/swc-project/swc/commit/3c3529cb84052dcde7976fed4d74d17d33317242))
126
+
127
+ ## [1.3.3] - 2022-09-23
128
+
129
+ ### Bug Fixes
130
+
131
+
132
+
133
+ - **(cli)** Add missing comma (#5902) ([ccca6d0](https://github.com/swc-project/swc/commit/ccca6d0a8866b9e34e1778e176ed47d19e30be78))
134
+
135
+
136
+ - **(css/parser)** Fix infinite loop about `@import` and `layer` (#5919) ([10cdbed](https://github.com/swc-project/swc/commit/10cdbed05e3d0f2430a21a7f3c6a185f56ea0861))
137
+
138
+
139
+ - **(css/parser)** Report an error for invalid `layer` in `@import` (#5928) ([64694dc](https://github.com/swc-project/swc/commit/64694dc7d5d92880f17c0669c118df666620a50a))
140
+
141
+
142
+ - **(es/minifier)** Remove more pure calls (#5900) ([83c7887](https://github.com/swc-project/swc/commit/83c7887600bcb391203911f3c82b62e16a217120))
143
+
144
+
145
+ - **(es/minifier)** Fix analysis of assignments (#5924) ([e303f7e](https://github.com/swc-project/swc/commit/e303f7e8530a2c16f908d4132b077540eb1ecc58))
146
+
147
+
148
+ - **(es/minifier)** Prepend vars when dropping vars in a for loop initializer (#5930) ([f222413](https://github.com/swc-project/swc/commit/f2224132c1f000c560b97675b54cb7914bd444fa))
149
+
150
+
151
+ - **(es/minifier)** Track aliasing via assignments (#5940) ([9764786](https://github.com/swc-project/swc/commit/97647861bfcbf111f07b2748ba755b19a7e16844))
152
+
153
+ ### Features
154
+
155
+
156
+
157
+ - **(css/minifier)** Minify the name of `@keyframes` (#5894) ([1dc5307](https://github.com/swc-project/swc/commit/1dc530706915aab6c00564e8c10cc01e1f203204))
158
+
159
+
160
+ - **(css/parser)** Parse more math functions in `@media` (#5904) ([2bf2419](https://github.com/swc-project/swc/commit/2bf24195f2e9803f24f335b637ff9e7ea394402b))
161
+
162
+
163
+ - **(es/minifier)** Drop function identifier in a single pass (#5901) ([aacf7aa](https://github.com/swc-project/swc/commit/aacf7aaf80034509cf20e4b54d87c2e95ae9b3df))
164
+
165
+
166
+ - **(es/minifier)** Collapse `let` without init (#5909) ([19ce273](https://github.com/swc-project/swc/commit/19ce2737b16f2f6daf5f2eb53dc7a70ceefb107d))
167
+
168
+
169
+ - **(es/minifier)** Evaluate more expressions (#5926) ([565bf31](https://github.com/swc-project/swc/commit/565bf317f6a16025f9b026209daafa5983ed7608))
170
+
171
+
172
+ - **(es/minifier)** Inline rest parameters of IIFE (#5929) ([ac7b066](https://github.com/swc-project/swc/commit/ac7b066d9aec13c99a2df87fc47021973c1fed5d))
173
+
174
+
175
+ - **(es/minifier)** Improve analysis of reassignments (#5931) ([e9c7041](https://github.com/swc-project/swc/commit/e9c704182b2f6fb4d9771b358d2919c447723059))
176
+
177
+
178
+ - **(es/minifier)** Use char frequency data for property manglers (#5932) ([5314ac5](https://github.com/swc-project/swc/commit/5314ac5d025737471a9595fa72d4189992b8454e))
179
+
180
+
181
+ - **(es/minifier)** Drop cycles in nested functions (#5933) ([e16827c](https://github.com/swc-project/swc/commit/e16827cc9d4ff7dcbc53fb38f56ba9b15dc9c3c8))
182
+
183
+
184
+ - **(es/minifier)** Mangle labels (#5934) ([7bcaaef](https://github.com/swc-project/swc/commit/7bcaaef4f7219d52e7dd2199d4696d628e4d6de9))
185
+
186
+
187
+ - **(es/typescript)** Support TS 4.9 (#5938) ([5cddb4c](https://github.com/swc-project/swc/commit/5cddb4c7345eba7c3ac87288b5130ecd1a94bbf5))
188
+
189
+
190
+ - **(swc_core)** Expose tty feature of `swc_common` as `common_tty` (#5920) ([72429d8](https://github.com/swc-project/swc/commit/72429d88018bd325af2e552c5d2bc7b255ea600d))
191
+
192
+ ### Performance
193
+
194
+
195
+
196
+ - **(es)** Optimize memory layout of AST (#5829) ([1a182ef](https://github.com/swc-project/swc/commit/1a182ef8d90c2294ac67e8cdee63bfab2c295bae))
197
+
198
+
199
+ - **(es/minifier)** Make more passes parallel (#5906) ([6bbd3f4](https://github.com/swc-project/swc/commit/6bbd3f4c14eb243b697dc12593ada1b196a0cad8))
200
+
201
+
202
+ - **(es/minifier)** Invoke DCE only before the first compression (#5907) ([1df7243](https://github.com/swc-project/swc/commit/1df72430a56cc85ac41c6f9753d7c7e6d5ea279a))
203
+
204
+
205
+ - **(es/minifier)** Optimize analyzer (#5908) ([a9873e5](https://github.com/swc-project/swc/commit/a9873e505d33b4537e341a618f524931870a0db4))
206
+
207
+ ### Testing
208
+
209
+
210
+
211
+ - **(es)** Accept arguments (#5916) ([fe40d83](https://github.com/swc-project/swc/commit/fe40d8312b7153de1e334d552e9f6bcafc9cc161))
212
+
213
+
214
+ - **(es/minifier)** Add a test for a wrong issue (#5923) ([0b34bcb](https://github.com/swc-project/swc/commit/0b34bcb40e844f8a78e8c239ed8b0eeed2ef6992))
215
+
216
+
217
+ - **(es/minifier)** Add an execution test for a fixed issue (#5925) ([31711e7](https://github.com/swc-project/swc/commit/31711e76af84aa52766a511af7b772390144f1ee))
218
+
219
+
220
+ - **(es/minifier)** Remove analysis snapshot (#5939) ([93964a8](https://github.com/swc-project/swc/commit/93964a82eacb1bfe41de270900895b92f61e3670))
221
+
222
+ ## [1.3.2] - 2022-09-19
223
+
224
+ ### Bug Fixes
225
+
226
+
227
+
8
228
  - **(es/codegen)** Drop the last comma in an array literal (#5877) ([7d6d04b](https://github.com/swc-project/swc/commit/7d6d04b4215c5c1ec368a8ccdabdda187cfa647e))
9
229
 
10
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -89,6 +89,7 @@
89
89
  "devDependencies": {
90
90
  "@babel/compat-data": "^7.17.0",
91
91
  "@babel/core": "^7.13.16",
92
+ "@babel/generator": "^7.18.13",
92
93
  "@babel/plugin-proposal-class-properties": "^7.13.0",
93
94
  "@babel/plugin-proposal-decorators": "^7.13.15",
94
95
  "@babel/plugin-proposal-object-rest-spread": "^7.13.8",
@@ -133,7 +134,7 @@
133
134
  "source-map": "^0.7.3",
134
135
  "source-map-support": "^0.5.19",
135
136
  "sourcemap-validator": "^2.1.0",
136
- "swc-plugin-coverage-instrument": "^0.0.12",
137
+ "swc-plugin-coverage-instrument": "^0.0.13",
137
138
  "terser": "^5.7.1",
138
139
  "ts-node": "^10.5.0",
139
140
  "typescript": "^4.5.2"
@@ -143,19 +144,19 @@
143
144
  "url": "https://opencollective.com/swc"
144
145
  },
145
146
  "optionalDependencies": {
146
- "@swc/core-win32-x64-msvc": "1.3.2",
147
- "@swc/core-darwin-x64": "1.3.2",
148
- "@swc/core-linux-x64-gnu": "1.3.2",
149
- "@swc/core-linux-x64-musl": "1.3.2",
150
- "@swc/core-freebsd-x64": "1.3.2",
151
- "@swc/core-win32-ia32-msvc": "1.3.2",
152
- "@swc/core-linux-arm64-gnu": "1.3.2",
153
- "@swc/core-linux-arm-gnueabihf": "1.3.2",
154
- "@swc/core-darwin-arm64": "1.3.2",
155
- "@swc/core-android-arm64": "1.3.2",
156
- "@swc/core-linux-arm64-musl": "1.3.2",
157
- "@swc/core-win32-arm64-msvc": "1.3.2",
158
- "@swc/core-android-arm-eabi": "1.3.2"
147
+ "@swc/core-win32-x64-msvc": "1.3.4",
148
+ "@swc/core-darwin-x64": "1.3.4",
149
+ "@swc/core-linux-x64-gnu": "1.3.4",
150
+ "@swc/core-linux-x64-musl": "1.3.4",
151
+ "@swc/core-freebsd-x64": "1.3.4",
152
+ "@swc/core-win32-ia32-msvc": "1.3.4",
153
+ "@swc/core-linux-arm64-gnu": "1.3.4",
154
+ "@swc/core-linux-arm-gnueabihf": "1.3.4",
155
+ "@swc/core-darwin-arm64": "1.3.4",
156
+ "@swc/core-android-arm64": "1.3.4",
157
+ "@swc/core-linux-arm64-musl": "1.3.4",
158
+ "@swc/core-win32-arm64-msvc": "1.3.4",
159
+ "@swc/core-android-arm-eabi": "1.3.4"
159
160
  },
160
161
  "files": [
161
162
  "CHANGELOG.md",