@swc/core 1.2.177 → 1.2.181
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 +62 -0
- package/.prettierrc.json +1 -0
- package/CHANGELOG.md +203 -0
- package/package.json +27 -14
package/.prettierignore
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Bundler cache files
|
|
2
|
+
.cache/
|
|
3
|
+
|
|
4
|
+
# Generated
|
|
5
|
+
CHANGELOG.md
|
|
6
|
+
target/
|
|
7
|
+
node_modules/
|
|
8
|
+
|
|
9
|
+
# Space sensitive
|
|
10
|
+
crates/jsdoc/tests/
|
|
11
|
+
crates/swc/tests/errors/
|
|
12
|
+
crates/swc/tests/projects/
|
|
13
|
+
crates/swc/tests/serde/
|
|
14
|
+
crates/swc_css_codegen/tests/
|
|
15
|
+
crates/swc_css_lints/tests/
|
|
16
|
+
crates/swc_css_minifier/tests/
|
|
17
|
+
crates/swc_css_parser/tests/
|
|
18
|
+
crates/swc_css_prefixer/tests/
|
|
19
|
+
crates/swc_ecma_codegen/tests/
|
|
20
|
+
crates/swc_ecma_lints/tests/
|
|
21
|
+
crates/swc_ecma_parser/tests/
|
|
22
|
+
crates/swc_estree_compat/tests/
|
|
23
|
+
crates/swc_html_codegen/tests/
|
|
24
|
+
crates/swc_html_minifier/tests/
|
|
25
|
+
crates/swc_html_parser/tests/
|
|
26
|
+
crates/swc_webpack_ast/tests/
|
|
27
|
+
|
|
28
|
+
# Generated by testing system
|
|
29
|
+
output/
|
|
30
|
+
output.js
|
|
31
|
+
output.full.js
|
|
32
|
+
output.mjs
|
|
33
|
+
index.g.js
|
|
34
|
+
output.json
|
|
35
|
+
output.ts
|
|
36
|
+
output.css
|
|
37
|
+
output.min.css
|
|
38
|
+
output.html
|
|
39
|
+
output.min.html
|
|
40
|
+
|
|
41
|
+
# Generated
|
|
42
|
+
crates/swc_ecma_preset_env/data
|
|
43
|
+
crates/swc_ecma_preset_env/**/*.json
|
|
44
|
+
crates/swc/tests/tsc-references
|
|
45
|
+
scripts/npm
|
|
46
|
+
|
|
47
|
+
# Downloaded
|
|
48
|
+
benches/
|
|
49
|
+
|
|
50
|
+
# TODO: Enable formatting
|
|
51
|
+
helpers/
|
|
52
|
+
packages/swc-helpers
|
|
53
|
+
node-swc/__tests__
|
|
54
|
+
node-swc/src
|
|
55
|
+
node-swc/tests
|
|
56
|
+
crates/swc/tests/srcmap/
|
|
57
|
+
crates/swc/tests/stacktrace/
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# git submodules
|
|
61
|
+
crates/swc_ecma_parser/tests/test262-parser
|
|
62
|
+
crates/swc_html_parser/tests/html5lib-tests
|
package/.prettierrc.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,209 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(es/minifier)** Fix handling of `NaN` (#4593) ([dd09cdf](https://github.com/swc-project/swc/commit/dd09cdf8b12d53aa6060e14857fa3efeddf41334))
|
|
9
|
+
|
|
10
|
+
## [1.2.180] - 2022-05-09
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
- **(es)** Use `unresolved_mark` (#4573) ([0868409](https://github.com/swc-project/swc/commit/086840956d696816c694fc2fd96258351aab9573))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
- **(es/minifier)** Improve sequential inliner (#4570) ([af368ee](https://github.com/swc-project/swc/commit/af368eead2529c3340e985acddf2948af44aba2e))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
- **(es/minifier)** Preserve more identifiers if `eval` or `with` exists (#4580) ([e43689b](https://github.com/swc-project/swc/commit/e43689b7d58354bf2847cb47bfc82eb208d5b5e6))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
- **(es/minifier)** Don't create an invalid labeled statement (#4581) ([7e80c10](https://github.com/swc-project/swc/commit/7e80c10cba50a8a1f74875ba8a90c4f282b33fc0))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
- **(es/minifier)** Unwrap blocks more carefully (#4586) ([8db3442](https://github.com/swc-project/swc/commit/8db3442216e84b0535fa2884208e19020f22ec19))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
- **(es/minifier)** Consider more aliases in sequences pass (#4583) ([3521ce0](https://github.com/swc-project/swc/commit/3521ce09e7a2c3168f17491196f6fbc835637380))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
- **(es/resolver)** Fix handling of a complex try catch (#4574) ([9e79f9c](https://github.com/swc-project/swc/commit/9e79f9ced697df4aba51219ce4759238a53c11e3))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
- **(es/resolver)** Fix more try catch issues (#4582) ([56c3010](https://github.com/swc-project/swc/commit/56c3010f6ba0cdebf4a1631c4ad54e10584c0422))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
- **(html/parser)** Add recovery for attributes on html and body (#4566) ([c7d20e4](https://github.com/swc-project/swc/commit/c7d20e43e63cb2c45cd589e3c72811575fca2f07))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
- **(node)** Use `jemallocator` on linux (#4591) ([af91094](https://github.com/swc-project/swc/commit/af91094b2db0809f02e6f0a6f07b021d12aa1512))
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
- **(config)** Make all configuration overridable (#4575) ([7fc9bbc](https://github.com/swc-project/swc/commit/7fc9bbccd9ce867d9851cb3518501509b5a3f97e))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
- **(es/ast)** Add methods for parens (#4576) ([55d0ee6](https://github.com/swc-project/swc/commit/55d0ee6cba32d3a9d15cdb5485fb65a84bebe123))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- **(html/parser)** Parse document fragment (#4579) ([a34dea1](https://github.com/swc-project/swc/commit/a34dea11d0425dde75c45b6ba16682cc4df087a8))
|
|
56
|
+
|
|
57
|
+
### Miscellaneous Tasks
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
- **(ci)** Improve CI scripts (#4572) ([f23c943](https://github.com/swc-project/swc/commit/f23c943227e8438dabeaa951bab552cd3d076e41))
|
|
62
|
+
|
|
63
|
+
### Refactor
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
- **(html/parser)** Resolve TODO (#4577) ([4cc247f](https://github.com/swc-project/swc/commit/4cc247f39f53ee2c4183c3881c3b686a109a3419))
|
|
68
|
+
|
|
69
|
+
### Testing
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
- **(es/minifier)** Fix test system (#4571) ([bf5ee01](https://github.com/swc-project/swc/commit/bf5ee018b3d2cbf235b48e2325374f3ec545703a))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
- **(html/parser)** Add tests (#4565) ([adbce64](https://github.com/swc-project/swc/commit/adbce64f28ba72f73de375b91d72382d98362824))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
- **(html/parser)** Improve script on/off tests (#4564) ([4838267](https://github.com/swc-project/swc/commit/4838267015d19299f09e90efc2e41d22502be390))
|
|
80
|
+
|
|
81
|
+
## [1.2.179] - 2022-05-08
|
|
82
|
+
|
|
83
|
+
### Bug Fixes
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
- **(es/minifier)** Distinguish `raw` and `cooked` while joining template literals (#4559) ([f9b6016](https://github.com/swc-project/swc/commit/f9b6016d4b990032505c0dbb5b5bf82949c7d74d))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
- **(es/minifier)** Fix handling of template literals (#4563) ([920d9a7](https://github.com/swc-project/swc/commit/920d9a76784b6e2ac9ccbfd826f2253410bf2be5))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
- **(html/parser)** Fix for noah's ark clause (#4558) ([7ef6372](https://github.com/swc-project/swc/commit/7ef637263e57b9c995de1a847606f878991054fd))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
- **(html/parser)** Fix adoption agency algorithm (#4552) ([d6e4885](https://github.com/swc-project/swc/commit/d6e48850b65ada6dae4da75347c6669161cb036a))
|
|
97
|
+
|
|
98
|
+
### Documentation
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
- **(es/resolver)** Add docs for top-level mark (#4560) ([13cc228](https://github.com/swc-project/swc/commit/13cc2282627f852d5b114332a83816de2a47742b))
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
- **(es/minifier)** Drop vars using sequential inliner (#4547) ([c5b4ef4](https://github.com/swc-project/swc/commit/c5b4ef4377874d8659d5b4e6c4099e1eac6c40f1))
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
- **(es/minifier)** Remove duplicate control flow in nested blocks (#4569) ([b3b6fd4](https://github.com/swc-project/swc/commit/b3b6fd448c35fc25cd99d210c684e90c68da0b04))
|
|
112
|
+
|
|
113
|
+
### Refactor
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
- **(plugin)** Align deps (#4568) ([846a319](https://github.com/swc-project/swc/commit/846a31919eba58b7b14788ccc26b0ff23e488044))
|
|
118
|
+
|
|
119
|
+
## [1.2.178] - 2022-05-07
|
|
120
|
+
|
|
121
|
+
### Bug Fixes
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
- **(es/compat)** Memorize computed props in logical assignment (#4525) ([2e74787](https://github.com/swc-project/swc/commit/2e7478787040645ef9cd162ef18e948c112c93d8))
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
- **(es/minifier)** Respect `keepClassNames` for class expressions (#4536) ([3d5d234](https://github.com/swc-project/swc/commit/3d5d234047bb7e3f76189fa586030014c7c29f46))
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
- **(es/minifier)** Skip getter/setter when collapsing vars (#4557) ([5d3a01a](https://github.com/swc-project/swc/commit/5d3a01ad352fcea33db46de3b144950944b18b62))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
- **(es/modules)** Preserve extensions (#4524) ([f3b262e](https://github.com/swc-project/swc/commit/f3b262e340cdd5aaa5ce4008936e3ba696f3dc06))
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
- **(es/parser)** Revert #4067 (#4540) ([2831059](https://github.com/swc-project/swc/commit/28310596a6c2c62cab3e5124c9b68439e152ba18))
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
- **(es/parser)** Revert #4287 (#4542) ([e2fde1a](https://github.com/swc-project/swc/commit/e2fde1a9a7ea702439666fdee6b2a378e70d9a7e))
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
- **(html/lexer)** Fix lexing of numeric characters (#4544) ([6980381](https://github.com/swc-project/swc/commit/698038107de8f7ec9ee2b2981b4137d47182a022))
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
- **(html/parser)** Fix a bug related to parsing foreign elements (#4527) ([2f6f8fa](https://github.com/swc-project/swc/commit/2f6f8fa717c4a969221958bc2c70a3f68590d93b))
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
- **(html/parser)** Fix parsing of cdata in foreign context (#4531) ([5dc9376](https://github.com/swc-project/swc/commit/5dc9376a4ba4d449d1c3f2755a6aca6a77919f6f))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
- **(html/parser)** Fix a bug with optional `li` (#4526) ([6310eab](https://github.com/swc-project/swc/commit/6310eab96652bbe747eaf1b467894b2dbacfab98))
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
- **(html/parser)** Fix parsing of comments in `textarea` (#4530) ([79090e1](https://github.com/swc-project/swc/commit/79090e1b2abce3dc396f25a5851637c675b6c87e))
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
- **(html/parser)** Fix parsing of `nobr` (#4535) ([e6042a5](https://github.com/swc-project/swc/commit/e6042a5e692c785bb12058f1eb63e728f3191cef))
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
- **(html/parser)** Fix parsing of cdata (#4537) ([07cf28a](https://github.com/swc-project/swc/commit/07cf28a168c0e4619c3293ece180922d5e9a632d))
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
- **(html/parser)** Fix parsing of newline in `textarea` (#4543) ([dd40e7b](https://github.com/swc-project/swc/commit/dd40e7bf69b355f00b68819785365603bc7634a2))
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
- **(html/parser)** Fix support for document mode (#4539) ([e11ee88](https://github.com/swc-project/swc/commit/e11ee88ea09ef1a67e2a2e063e91ce1df40ca8fb))
|
|
168
|
+
|
|
169
|
+
### Features
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
- **(plugin)** Make plugin source map api use `SourceMapper` (#4541) ([10f903d](https://github.com/swc-project/swc/commit/10f903dd3952286f84c0957d96b9c43236938de5))
|
|
174
|
+
|
|
175
|
+
### Miscellaneous Tasks
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
- **(repo)** Configure `prettier` (#4523) ([a6d404a](https://github.com/swc-project/swc/commit/a6d404a8c28ab82f15d9f7fbd849e27713a49872))
|
|
180
|
+
|
|
181
|
+
### Refactor
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
- **(html/parser)** Cleanup (#4545) ([446172f](https://github.com/swc-project/swc/commit/446172f14575b56d36ef72175c16fa05f374736c))
|
|
186
|
+
|
|
187
|
+
### Testing
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
- **(es/minifier)** Categorize more tests (#4538) ([3d3e3bb](https://github.com/swc-project/swc/commit/3d3e3bb1d27ba4a75464c925d8fe03f703902e49))
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
- **(es/minifier)** Ignore difference of parens (#4546) ([b0efd00](https://github.com/swc-project/swc/commit/b0efd00f38edb7ecb87c53590821d908316cfcba))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
- **(html/parser)** Add integration tests from html5lib-test (#4517) ([a4a815b](https://github.com/swc-project/swc/commit/a4a815b28815b1c875c73f0a153fb219558e26ce))
|
|
198
|
+
|
|
199
|
+
### Build
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
- **(plugin)** Update `swc_plugin_proxy` (#4551) ([b5a2033](https://github.com/swc-project/swc/commit/b5a203399455304f3be7941b751e8a9847b0bb97))
|
|
204
|
+
|
|
205
|
+
## [1.2.177] - 2022-05-04
|
|
206
|
+
|
|
207
|
+
### Bug Fixes
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
8
211
|
- **(html/parser)** Fix a bug of unwrapping element without parent (#4505) ([597c0c6](https://github.com/swc-project/swc/commit/597c0c672a9111b1a0b6e7219edb577866252343))
|
|
9
212
|
|
|
10
213
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.181",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -70,6 +70,18 @@
|
|
|
70
70
|
],
|
|
71
71
|
"*.rs": [
|
|
72
72
|
"rustfmt --"
|
|
73
|
+
],
|
|
74
|
+
"*.js": [
|
|
75
|
+
"prettier --write"
|
|
76
|
+
],
|
|
77
|
+
"*.ts": [
|
|
78
|
+
"prettier --write"
|
|
79
|
+
],
|
|
80
|
+
"*.jsx": [
|
|
81
|
+
"prettier --write"
|
|
82
|
+
],
|
|
83
|
+
"*.tsx": [
|
|
84
|
+
"prettier --write"
|
|
73
85
|
]
|
|
74
86
|
},
|
|
75
87
|
"devDependencies": {
|
|
@@ -104,6 +116,7 @@
|
|
|
104
116
|
"lodash": "^4.17.21",
|
|
105
117
|
"mocha": "^9.1.3",
|
|
106
118
|
"npm-run-all": "^4.1.5",
|
|
119
|
+
"prettier": "^2.6.2",
|
|
107
120
|
"progress": "^2.0.3",
|
|
108
121
|
"prop-types": "^15.7.2",
|
|
109
122
|
"react": "^17.0.2",
|
|
@@ -121,18 +134,18 @@
|
|
|
121
134
|
"url": "https://opencollective.com/swc"
|
|
122
135
|
},
|
|
123
136
|
"optionalDependencies": {
|
|
124
|
-
"@swc/core-win32-x64-msvc": "1.2.
|
|
125
|
-
"@swc/core-darwin-x64": "1.2.
|
|
126
|
-
"@swc/core-linux-x64-gnu": "1.2.
|
|
127
|
-
"@swc/core-linux-x64-musl": "1.2.
|
|
128
|
-
"@swc/core-freebsd-x64": "1.2.
|
|
129
|
-
"@swc/core-win32-ia32-msvc": "1.2.
|
|
130
|
-
"@swc/core-linux-arm64-gnu": "1.2.
|
|
131
|
-
"@swc/core-linux-arm-gnueabihf": "1.2.
|
|
132
|
-
"@swc/core-darwin-arm64": "1.2.
|
|
133
|
-
"@swc/core-android-arm64": "1.2.
|
|
134
|
-
"@swc/core-linux-arm64-musl": "1.2.
|
|
135
|
-
"@swc/core-win32-arm64-msvc": "1.2.
|
|
136
|
-
"@swc/core-android-arm-eabi": "1.2.
|
|
137
|
+
"@swc/core-win32-x64-msvc": "1.2.181",
|
|
138
|
+
"@swc/core-darwin-x64": "1.2.181",
|
|
139
|
+
"@swc/core-linux-x64-gnu": "1.2.181",
|
|
140
|
+
"@swc/core-linux-x64-musl": "1.2.181",
|
|
141
|
+
"@swc/core-freebsd-x64": "1.2.181",
|
|
142
|
+
"@swc/core-win32-ia32-msvc": "1.2.181",
|
|
143
|
+
"@swc/core-linux-arm64-gnu": "1.2.181",
|
|
144
|
+
"@swc/core-linux-arm-gnueabihf": "1.2.181",
|
|
145
|
+
"@swc/core-darwin-arm64": "1.2.181",
|
|
146
|
+
"@swc/core-android-arm64": "1.2.181",
|
|
147
|
+
"@swc/core-linux-arm64-musl": "1.2.181",
|
|
148
|
+
"@swc/core-win32-arm64-msvc": "1.2.181",
|
|
149
|
+
"@swc/core-android-arm-eabi": "1.2.181"
|
|
137
150
|
}
|
|
138
151
|
}
|