@swc/core 1.2.150 → 1.2.153
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 +183 -0
- package/package.json +14 -14
- package/types.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,189 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(api/rust)** Fix transform comment api (#3962) ([fcbd3c5](https://github.com/swc-project/swc/commit/fcbd3c5c5849418b911d87d3a0b36eb84bef1a68))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(es)** Adjust tracing span level (#3911) ([ca071fb](https://github.com/swc-project/swc/commit/ca071fb705210ec33698dbce81069156de4fcf7a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/codegen)** Fix sourcemap issue caused by reserved `BytePos` values (#3948) ([e8018c5](https://github.com/swc-project/swc/commit/e8018c54d4581c43c72d27e51d0aa36a64881a9e))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- **(es/compat)** Refer this in constructor when `super_is_callable_constructor` is set (#3944) ([de8a711](https://github.com/swc-project/swc/commit/de8a7116cd587a6ddb8d734ffd96cdacd076f48c))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- **(es/lints)** Don't visit types while collecting `const` (#3967) ([c6b5371](https://github.com/swc-project/swc/commit/c6b5371c51413577165543eddb78e7d051f3d376))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(es/minifier)** Preserve fuction parameters used for template literals in `evaluate` and `reduce_vars` (#3949) ([91a302a](https://github.com/swc-project/swc/commit/91a302a672a70a34fe693fa84d65ba87901d0f36))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
- **(es/parser)** Parse if-else chain iteratively (#3961) ([76e6468](https://github.com/swc-project/swc/commit/76e646804a025e2a451314013a437e79a6cd8ce2))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- **(node-swc/types)** Add `reserved` to `TerserMangleOptions` (#3959) ([70a68a7](https://github.com/swc-project/swc/commit/70a68a785091845c5e66ab3fe0fd52cc47f11a80))
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
- **(css/codegen)** Support source map (#3958) ([5a6ebd3](https://github.com/swc-project/swc/commit/5a6ebd36ee7a35e81e4f3b0961106a41f83f6b7f))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- **(es)** Add an option to preserve all comments (#3815) ([c5a0c9a](https://github.com/swc-project/swc/commit/c5a0c9a0ab2345aa9c41a40100d049a144dfb70f))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
- **(es/lints)** Refine error message (#3952) ([579aeb7](https://github.com/swc-project/swc/commit/579aeb7cfacb38d822634e5c82b209bd311ac9b2))
|
|
42
|
+
|
|
43
|
+
## [1.2.152] - 2022-03-10
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
- **(es)** Don't create `.swc` if not required (#3937) ([46e9d3f](https://github.com/swc-project/swc/commit/46e9d3f62e07b5aaeac9a9f73bb4b5573ad69b27))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
- **(es/compat/es2015)** Fix span handling of `arrow` and `classes` (#3921) ([12b8606](https://github.com/swc-project/swc/commit/12b8606c99994a1ae4fc65105cd380f1a34d632e))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- **(es/minifier)** Skip exported vars while collapsing vars (#3928) ([cc564ff](https://github.com/swc-project/swc/commit/cc564ff6c586db266f0ab8fcb7f25a8d32155d35))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
- **(es/module)** Make exported vars follow specification (#3906) ([534fc52](https://github.com/swc-project/swc/commit/534fc52a727e5be43adfad47ed3fcdd606967c5c))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
- **(es/module)** Fix exported vars with bigint values (#3909) ([8559fc9](https://github.com/swc-project/swc/commit/8559fc96239026d070f7fcf415e5443b096de605))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
- **(es/module)** Use correct return values for suffix update expressions (#3927) ([dc457b4](https://github.com/swc-project/swc/commit/dc457b4883ef23815fcdff952c040e5e1e7d7897))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
- **(es/module/cjs)** Allow re-exports to be lazy (#3856) ([f575b1b](https://github.com/swc-project/swc/commit/f575b1bc4868dd46c572c3ef61767fdd2ee2c2b3))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
- **(es/parser)** Fix the logic for token contexts (#3926) ([4b4aef3](https://github.com/swc-project/swc/commit/4b4aef3270cac8bdd75c79af9be186bf446b23f1))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
- **(es/transform/optimization)** Prevent inlining of vars used as RHS in logical expressions (#3907) ([782a874](https://github.com/swc-project/swc/commit/782a8746963f11a1ada446cb1f744a58f6516cf8))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
- **(es/typescript)** Remove imports used in interfaces and type signatures (#3893) ([5c92b2d](https://github.com/swc-project/swc/commit/5c92b2d4cee64686d0aad788b177b34cd2fd3bfc))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
- **(wasm)** Fix handling of `swc_common::GLOBALS` (#3936) ([45a4374](https://github.com/swc-project/swc/commit/45a4374ee19154238eb24952cffbd9e134831c8b))
|
|
80
|
+
|
|
81
|
+
### Features
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
- **(common)** Align `stable_hasher` to latest rustc (#3895) ([372f298](https://github.com/swc-project/swc/commit/372f298f5f6faae804370a3caaf8dce309fcb9f5))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
- **(css/lints)** Implement `custom-property-no-missing-var-function` rule (#3890) ([19ececc](https://github.com/swc-project/swc/commit/19ececcd507da27993b421ae76fd0f259b516125))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
- **(css/lints)** Implement `no-duplicate-at-import-rules` rule (#3833) ([59c84ac](https://github.com/swc-project/swc/commit/59c84ac8bdd2919bb6c8550bc5d8ec7b814f9cda))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
- **(css/parser)** Improve error recovery (#3901) ([6f781c3](https://github.com/swc-project/swc/commit/6f781c3b43a99ce65e5680665b8101a382adb4ef))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
- **(css/prefixer)** Implement more prefixing rules (#3905) ([b25c479](https://github.com/swc-project/swc/commit/b25c47901e69a04079cbb9ce1e76154a8affbd11))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
- **(css/prefixer)** Handle more properties (#3919) ([c2b9e1c](https://github.com/swc-project/swc/commit/c2b9e1c61aa5f72aa0738349ee330d46b9446ed6))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
- **(css/prefixer)** Implement more rules (#3933) ([62ab179](https://github.com/swc-project/swc/commit/62ab17999eb98312bb03f3ad2f436fbac6ae4acc))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
- **(es/compat)** Add tracing support to remaining compat transforms (#3904) ([bd0a921](https://github.com/swc-project/swc/commit/bd0a9214c3a678a65a814517ffef6c59199ac06b))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
- **(es/compat)** Add pure comments for class fields keys (#3939) ([112f428](https://github.com/swc-project/swc/commit/112f4287343c818c28dc9d422c3df78d9f663397))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
- **(es/fixer)** Remove extra parens around IIFE in statements (#3918) ([7cfa930](https://github.com/swc-project/swc/commit/7cfa930a629da96b30c2d5021a51d15c0b121013))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
- **(es/minifier)** Remove pure calls (#3925) ([bd838ac](https://github.com/swc-project/swc/commit/bd838ac5a9524c1a7f3db34c2110c6ddb9718de0))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
- **(es/minifier)** Improve dropping of unused vars (#3923) ([9e4dea6](https://github.com/swc-project/swc/commit/9e4dea6663eaba794fb4793318865892eecce910))
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
- **(es/parser)** Report errors for non-abstract members in an abstract class (#3917) ([16182d5](https://github.com/swc-project/swc/commit/16182d586f1b54e383ae83a264576267441e49ba))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
- **(es/parser)** Relax MSRV requirement (#3922) ([a8ac7e3](https://github.com/swc-project/swc/commit/a8ac7e39b0fbd3908c4b506a1739a0ddf33ac250))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
- **(es/testing)** Print comments in `test_fixture` (#3920) ([3d43a9b](https://github.com/swc-project/swc/commit/3d43a9b69df6002786654b3c378b9d981447c126))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
- **(preset-env)** Update `browserslist-rs` (#3935) ([aec1a54](https://github.com/swc-project/swc/commit/aec1a54204e2140511442479753b6502448f25cb))
|
|
131
|
+
|
|
132
|
+
### Performance
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
- **(*)** Update `tracing` to improve performance of disabled spans (#3932) ([86ea237](https://github.com/swc-project/swc/commit/86ea23785d911f572474d73462cc8bd9af6afaf6))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
- **(es)** Add fast memory deallocator (#3910) ([f3da349](https://github.com/swc-project/swc/commit/f3da3499c5b2a2a58bdc85f33dd5886f49704932))
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
- **(es/minifier)** Remove needless type parameter (#3897) ([8b3aa6d](https://github.com/swc-project/swc/commit/8b3aa6d3aaf46a7bf4e8972bc867dede950196db))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
- **(es/minifier)** Make optimization of pure calls parallel (#3938) ([f1ec862](https://github.com/swc-project/swc/commit/f1ec8620ac0df2f0325bd0437227b277de099950))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
- **(es/parser)** Improve performance by adjusting inlining (#3902) ([4387813](https://github.com/swc-project/swc/commit/43878137e71894fbb3367473317ba65de5e40616))
|
|
149
|
+
|
|
150
|
+
### Refactor
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
- **(css/parser)** Remove unused codes (#3903) ([3a9af73](https://github.com/swc-project/swc/commit/3a9af7316748641e8b59b59d014513456ecfc606))
|
|
155
|
+
|
|
156
|
+
## [1.2.151] - 2022-03-07
|
|
157
|
+
|
|
158
|
+
### Bug Fixes
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
- **(es/module)** Revert fix for `jest.spyOn` ([8e30d83](https://github.com/swc-project/swc/commit/8e30d83d145061c9ee256e76e77e64ab0b5552ed))
|
|
163
|
+
|
|
164
|
+
### Features
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
- **(es/compat)** Enable `set_public_method` for TypeScript (#3884) ([cb93883](https://github.com/swc-project/swc/commit/cb93883232515cbce46d1f87a0f5feec37bd489c))
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
- **(es/fixer)** Remove extra parens around iife in expression position (#3887) ([9dd0105](https://github.com/swc-project/swc/commit/9dd0105c5b5479e421b36a0fb5ea3f2ea788d8a5))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
- **(es/lints)** Support module/script mode in `duplicate_bindings` (#3880) ([0181fbe](https://github.com/swc-project/swc/commit/0181fbe63b04145b99475a63a81937d8039abcd7))
|
|
175
|
+
|
|
176
|
+
### Performance
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
- **(es/lints)** Extract top level bindings only if the rule is enabled (#3889) ([3e8efac](https://github.com/swc-project/swc/commit/3e8efacf3a804c4dbaa3f92fa2f5f08e425b7866))
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
- **(es/minifier)** Add a fast-path to export merger (#3891) ([a47eed7](https://github.com/swc-project/swc/commit/a47eed7241bb3aa932cd51109c39b7f7fe6d4789))
|
|
184
|
+
|
|
185
|
+
## [1.2.150] - 2022-03-06
|
|
186
|
+
|
|
187
|
+
### Bug Fixes
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
8
191
|
- **(es/module)** Fix `jsc.paths` (#3879) ([a65755f](https://github.com/swc-project/swc/commit/a65755fd9a2dfa9bad929df735bb7b3c21613972))
|
|
9
192
|
|
|
10
193
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.153",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -107,18 +107,18 @@
|
|
|
107
107
|
"url": "https://opencollective.com/swc"
|
|
108
108
|
},
|
|
109
109
|
"optionalDependencies": {
|
|
110
|
-
"@swc/core-win32-x64-msvc": "1.2.
|
|
111
|
-
"@swc/core-darwin-x64": "1.2.
|
|
112
|
-
"@swc/core-linux-x64-gnu": "1.2.
|
|
113
|
-
"@swc/core-linux-x64-musl": "1.2.
|
|
114
|
-
"@swc/core-freebsd-x64": "1.2.
|
|
115
|
-
"@swc/core-win32-ia32-msvc": "1.2.
|
|
116
|
-
"@swc/core-linux-arm64-gnu": "1.2.
|
|
117
|
-
"@swc/core-linux-arm-gnueabihf": "1.2.
|
|
118
|
-
"@swc/core-darwin-arm64": "1.2.
|
|
119
|
-
"@swc/core-android-arm64": "1.2.
|
|
120
|
-
"@swc/core-linux-arm64-musl": "1.2.
|
|
121
|
-
"@swc/core-win32-arm64-msvc": "1.2.
|
|
122
|
-
"@swc/core-android-arm-eabi": "1.2.
|
|
110
|
+
"@swc/core-win32-x64-msvc": "1.2.153",
|
|
111
|
+
"@swc/core-darwin-x64": "1.2.153",
|
|
112
|
+
"@swc/core-linux-x64-gnu": "1.2.153",
|
|
113
|
+
"@swc/core-linux-x64-musl": "1.2.153",
|
|
114
|
+
"@swc/core-freebsd-x64": "1.2.153",
|
|
115
|
+
"@swc/core-win32-ia32-msvc": "1.2.153",
|
|
116
|
+
"@swc/core-linux-arm64-gnu": "1.2.153",
|
|
117
|
+
"@swc/core-linux-arm-gnueabihf": "1.2.153",
|
|
118
|
+
"@swc/core-darwin-arm64": "1.2.153",
|
|
119
|
+
"@swc/core-android-arm64": "1.2.153",
|
|
120
|
+
"@swc/core-linux-arm64-musl": "1.2.153",
|
|
121
|
+
"@swc/core-win32-arm64-msvc": "1.2.153",
|
|
122
|
+
"@swc/core-android-arm-eabi": "1.2.153"
|
|
123
123
|
}
|
|
124
124
|
}
|
package/types.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export interface TerserMangleOptions {
|
|
|
87
87
|
keep_private_props?: boolean;
|
|
88
88
|
ie8?: boolean;
|
|
89
89
|
safari10?: boolean;
|
|
90
|
+
reserved?: string[];
|
|
90
91
|
}
|
|
91
92
|
export interface TerserManglePropertiesOptions {
|
|
92
93
|
}
|
|
@@ -348,6 +349,7 @@ export interface JscConfig {
|
|
|
348
349
|
[from: string]: [string];
|
|
349
350
|
};
|
|
350
351
|
minify?: JsMinifyOptions;
|
|
352
|
+
preserveAllComments?: boolean;
|
|
351
353
|
}
|
|
352
354
|
export declare type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022";
|
|
353
355
|
export declare type ParserConfig = TsParserConfig | EsParserConfig;
|