@swc/core 1.2.142 → 1.2.145

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 CHANGED
@@ -5,6 +5,204 @@
5
5
 
6
6
 
7
7
 
8
+ - **(es/codegen)** Fix sourcemap of comments (#3723) ([b8b0c92](https://github.com/swc-project/swc/commit/b8b0c920e49c235fb65ca5585d343d2af79f9526))
9
+
10
+
11
+ - **(es/compat)** Throw an error if a private property is initialized multiple times (#3665) ([b6434e5](https://github.com/swc-project/swc/commit/b6434e52e70e79b96a12d48c4cebe2b0f6d8b7f5))
12
+
13
+
14
+ - **(es/parser)** Emit an error for non-last rest element in an object pattern (#3675) ([6a9d778](https://github.com/swc-project/swc/commit/6a9d77808b8513246592129e8c9e154f686fa8a9))
15
+
16
+
17
+ - **(es/parser)** Allow `Expr::TsInstantiation` in extends clause (#3696) ([d499b8c](https://github.com/swc-project/swc/commit/d499b8c14f0f75fd48fd7f5e4b7ad6e790bf4882))
18
+
19
+
20
+ - **(es/parser)** Disallow using reserved words as an expression in typescript (#3697) ([d6522f3](https://github.com/swc-project/swc/commit/d6522f3a37f38aef713c7cbba06349708b56ee27))
21
+
22
+
23
+ - **(es/parser)** Fix a typescript instantiation expression followed by EOF (#3699) ([010fe04](https://github.com/swc-project/swc/commit/010fe048c20bc5a0acfbc65fe43cdd38aeae8fc1))
24
+
25
+
26
+ - **(es/parser)** Fix the span of an export declaration containing a const enum (#3701) ([4318a2e](https://github.com/swc-project/swc/commit/4318a2e73b1ab7df07da809cf3207268942d77b7))
27
+
28
+
29
+ - **(es/parser)** Don't attach comments to `;` (#3720) ([8b87bb4](https://github.com/swc-project/swc/commit/8b87bb48702f22e270574a0a67206b0dcc0b8058))
30
+
31
+
32
+ - **(es/typescript)** Fix `name` of decorated classes (#3689) ([1e49fcd](https://github.com/swc-project/swc/commit/1e49fcd44daa3107a180f7016d72f8138fb56688))
33
+
34
+
35
+ - **(es/typescript)** Support heterogeneous enums (#3721) ([1761cab](https://github.com/swc-project/swc/commit/1761cab6ff1e3989281493adffda07859eb90a0d))
36
+
37
+ ### Features
38
+
39
+
40
+
41
+ - **(cli)** Support stdin (#3688) ([3cf3b20](https://github.com/swc-project/swc/commit/3cf3b20f15e8ddbb2c32405c71183cfdbbb87835))
42
+
43
+
44
+ - **(css/minifier)** Compress urange (#3668) ([b1476d2](https://github.com/swc-project/swc/commit/b1476d2ac6b7ff37653192fe7f46de9ae282b8cd))
45
+
46
+
47
+ - **(css/minifier)** Compress lengths (#3698) ([7079e88](https://github.com/swc-project/swc/commit/7079e88744ece43ebf82b05a376c5683c8015084))
48
+
49
+
50
+ - **(css/minifier)** Compress more properties (#3708) ([cd95ac4](https://github.com/swc-project/swc/commit/cd95ac4caf0af06db9195790707a475938a5fcb7))
51
+
52
+
53
+ - **(css/minifier)** Compress alpha of values (#3707) ([bff04b4](https://github.com/swc-project/swc/commit/bff04b4afecb9a57046352aaa92e4cec0e25363b))
54
+
55
+
56
+ - **(es/lints)** Implement `default-param-last` rule (#3681) ([e252265](https://github.com/swc-project/swc/commit/e252265a3f21a4c0dcef2e9c13aa7365f683b235))
57
+
58
+
59
+ - **(es/typescript)** Inline typescript `enum`s (#3647) ([1743302](https://github.com/swc-project/swc/commit/1743302819cd385f57c8d30aa8869a0765e1c5b6))
60
+
61
+
62
+ - **(node-swc)** Expose the new `swc_cli` as a binary named `swcx` (#3684) ([9cc094a](https://github.com/swc-project/swc/commit/9cc094ab574940f87f78328e8e1c1a346e62e5bf))
63
+
64
+ ### Miscellaneous Tasks
65
+
66
+
67
+
68
+ - **(ci)** Reduce CI time (#3719) ([76ec275](https://github.com/swc-project/swc/commit/76ec275c3cea182386ad6124c264bc809e1b1633))
69
+
70
+
71
+ - **(clippy)** Improve config (#3691) ([e35d73a](https://github.com/swc-project/swc/commit/e35d73adf4efbd7329cae6c63215e1c0a9193f8d))
72
+
73
+ ### Refactor
74
+
75
+
76
+
77
+ - **(css/ast)** Fix the type definitions for an plus b syntax (#3682) ([321ee75](https://github.com/swc-project/swc/commit/321ee756d95f287ed4d81a9568da59c637febf19))
78
+
79
+
80
+ - **(es)** Improve ast apis (#3690) ([135acf3](https://github.com/swc-project/swc/commit/135acf3b42221b8a9e684e39d762ad8481c75f73))
81
+
82
+ ## [1.2.144] - 2022-02-22
83
+
84
+ ### Bug Fixes
85
+
86
+
87
+
88
+ - **(es/ast)** Fix definition of `Expr::TsInstantiation` (#3657) ([68a1551](https://github.com/swc-project/swc/commit/68a155165bd04530e97ef62ecede617d954fa98d))
89
+
90
+
91
+ - **(es/parser)** Allow type arguments inside optional chaining (#3653) ([581b63c](https://github.com/swc-project/swc/commit/581b63cf3640f5cfc35a09819dd927c87a7db2b7))
92
+
93
+ ### Features
94
+
95
+
96
+
97
+ - **(cli)** Improve the template `package.json` for plugins (#3641) ([f237aee](https://github.com/swc-project/swc/commit/f237aeea79e140e5b6e105304fccfc48960462bf))
98
+
99
+
100
+ - **(css/ast)** Improve parsing of colors (#3680) ([003a7b8](https://github.com/swc-project/swc/commit/003a7b85a4b458f50d057af06c9cc6ec69b592da))
101
+
102
+
103
+ - **(css/minifier)** Compress selectors (#3623) ([9e691fe](https://github.com/swc-project/swc/commit/9e691fe75b60c73ff3ab2a7939c36f6cea167d06))
104
+
105
+
106
+ - **(css/minifier)** Compress declarations (#3649) ([7d15316](https://github.com/swc-project/swc/commit/7d15316ee12506327b25d0ab6aaf972ac687709b))
107
+
108
+
109
+ - **(css/minifier)** Compress degrees to zero (#3664) ([0b5f554](https://github.com/swc-project/swc/commit/0b5f5544c60136bde3bd07c9c75459086cf4b0d5))
110
+
111
+
112
+ - **(css/minifier)** Compress urls (#3666) ([fab6473](https://github.com/swc-project/swc/commit/fab6473183e6c3c4a8541e0146514da1264a2db6))
113
+
114
+
115
+ - **(css/minifier)** Compress transform functions (#3663) ([1afbd1b](https://github.com/swc-project/swc/commit/1afbd1b6e961869b001a03a90a9e24f0fe7304a6))
116
+
117
+
118
+ - **(css/minifier)** Compress frequency (#3669) ([9b28d4d](https://github.com/swc-project/swc/commit/9b28d4da792a67275ed5d1e33acafc929f67d86f))
119
+
120
+
121
+ - **(es/ast)** Support TypeScript Instantiation Expression (#3642) ([61e711c](https://github.com/swc-project/swc/commit/61e711c912bc31453a24dce2d1e1d98044aab3df))
122
+
123
+
124
+ - **(es/lints)** Implement `no-new` rule (#3634) ([7ff4cbc](https://github.com/swc-project/swc/commit/7ff4cbcbe12b26ff54ffa2db9d30592f770132a2))
125
+
126
+
127
+ - **(es/lints)** Implement `no-bitwise` rule (#3635) ([5a9d0cf](https://github.com/swc-project/swc/commit/5a9d0cf8a75275f457ae60157f34a14ada2fe852))
128
+
129
+
130
+ - **(es/lints)** Add `no-loop-func` rule (#3630) ([f4af363](https://github.com/swc-project/swc/commit/f4af3634de94076e571836a65b491210e096b2b8))
131
+
132
+
133
+ - **(es/lints)** Implement `no-empty-function` rule (#3565) ([319d501](https://github.com/swc-project/swc/commit/319d501f1733febb5861b55782dc5fe742015d2f))
134
+
135
+
136
+ - **(es/minifier)** Merge exports (#3643) ([10adf1e](https://github.com/swc-project/swc/commit/10adf1e548c381d3ff6beef7929d409b1ff1fb60))
137
+
138
+
139
+ - **(es/minifier)** Improve name mangler (#3638) ([e9fabd6](https://github.com/swc-project/swc/commit/e9fabd61e883edc9089cd7ddca44fda5e387b3b8))
140
+
141
+
142
+ - **(es/minifier)** Drop more unused vars (#3656) ([de6effc](https://github.com/swc-project/swc/commit/de6effc6e16665a0f18f23014aec15c66603a039))
143
+
144
+
145
+ - **(es/preset-env)** Upgrade `browserslist-rs` (#3670) ([3199966](https://github.com/swc-project/swc/commit/319996698d5531ea04afe8a6b3f3ed657620f8b4))
146
+
147
+
148
+ - **(plugin)** Pass `NODE_ENV` to plugins using the plugin context (#3677) ([ca0a448](https://github.com/swc-project/swc/commit/ca0a448e8ff85a4a0d02e3229ebcb2603a0b5d9a))
149
+
150
+ ### Miscellaneous Tasks
151
+
152
+
153
+
154
+ - **(ci)** Kill previous runs (#3678) ([f733c9c](https://github.com/swc-project/swc/commit/f733c9c82f0ab942e4a02e7f97d2fda0ef88bfc1))
155
+
156
+
157
+ - **(cli)** Improve the plugin template (#3632) ([0f1afcb](https://github.com/swc-project/swc/commit/0f1afcb8963b27bc04145bc3e947f7408c8d9a18))- **general**: Typo (#3646) ([c5f0e87](https://github.com/swc-project/swc/commit/c5f0e87ebf20259eae230c478da200530f9430e0))
158
+
159
+ ### Performance
160
+
161
+
162
+
163
+ - **(es/minifier)** Parallelize `join_vars` (#3655) ([da2c77d](https://github.com/swc-project/swc/commit/da2c77d9afe179b4f4f0ca1921294ba311f9306e))
164
+
165
+ ### Refactor
166
+
167
+
168
+
169
+ - **(es/ast)** Change definition of optional chaining expressions (#3645) ([2cb66ae](https://github.com/swc-project/swc/commit/2cb66ae075ba45968f302d5cd756b0ce0dbcee41))
170
+
171
+
172
+ - **(preset-env)** Extract common logic for `browserslist` support (#3674) ([b1d2470](https://github.com/swc-project/swc/commit/b1d24702e3ca857c60b0c91d7f81652fd178ea31))
173
+
174
+ ### Build
175
+
176
+
177
+
178
+ - **(cargo)** Use `lld` for windows-x64 (#3683) ([82914d4](https://github.com/swc-project/swc/commit/82914d4edf709c47e0c3338c961b81b6613b5db7))
179
+
180
+
181
+ - **(swc)** Remove unused dependencies (#3673) ([210f17a](https://github.com/swc-project/swc/commit/210f17af8c028dd9742a2e0ff46ce3b3869c6064))
182
+
183
+ ## [1.2.143] - 2022-02-19
184
+
185
+ ### Features
186
+
187
+
188
+
189
+ - **(es/lints)** Implement `no-restricted-syntax` rule (#3607) ([72343ba](https://github.com/swc-project/swc/commit/72343baf5be311809fe786ee8bbea52515197286))
190
+
191
+
192
+ - **(es/minifier)** Treat `!0` as a literal while inlining (#3631) ([d2c9441](https://github.com/swc-project/swc/commit/d2c94416a8735715f37fc680c7b5178bc88239ce))
193
+
194
+ ### Performance
195
+
196
+
197
+
198
+ - **(es/minifier)** Fix performance bug of the mangler (#3633) ([fd0e952](https://github.com/swc-project/swc/commit/fd0e952aec427e86d276b51e8f6659de8f9eac94))
199
+
200
+ ## [1.2.142] - 2022-02-18
201
+
202
+ ### Bug Fixes
203
+
204
+
205
+
8
206
  - **(css)** Fix recovery mode for functions (#3600) ([5420bcc](https://github.com/swc-project/swc/commit/5420bccc595b7088a8092ebebc589e5532cec55a))
9
207
 
10
208
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.142",
3
+ "version": "1.2.145",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
7
7
  "author": "강동윤 <kdy1997.dev@gmail.com>",
8
- "license": "Apache-2.0 AND MIT",
8
+ "license": "Apache-2.0",
9
9
  "keywords": [
10
10
  "swc",
11
11
  "swcpack",
@@ -104,18 +104,18 @@
104
104
  "url": "https://opencollective.com/swc"
105
105
  },
106
106
  "optionalDependencies": {
107
- "@swc/core-win32-x64-msvc": "1.2.142",
108
- "@swc/core-darwin-x64": "1.2.142",
109
- "@swc/core-linux-x64-gnu": "1.2.142",
110
- "@swc/core-linux-x64-musl": "1.2.142",
111
- "@swc/core-freebsd-x64": "1.2.142",
112
- "@swc/core-win32-ia32-msvc": "1.2.142",
113
- "@swc/core-linux-arm64-gnu": "1.2.142",
114
- "@swc/core-linux-arm-gnueabihf": "1.2.142",
115
- "@swc/core-darwin-arm64": "1.2.142",
116
- "@swc/core-android-arm64": "1.2.142",
117
- "@swc/core-linux-arm64-musl": "1.2.142",
118
- "@swc/core-win32-arm64-msvc": "1.2.142",
119
- "@swc/core-android-arm-eabi": "1.2.142"
107
+ "@swc/core-win32-x64-msvc": "1.2.145",
108
+ "@swc/core-darwin-x64": "1.2.145",
109
+ "@swc/core-linux-x64-gnu": "1.2.145",
110
+ "@swc/core-linux-x64-musl": "1.2.145",
111
+ "@swc/core-freebsd-x64": "1.2.145",
112
+ "@swc/core-win32-ia32-msvc": "1.2.145",
113
+ "@swc/core-linux-arm64-gnu": "1.2.145",
114
+ "@swc/core-linux-arm-gnueabihf": "1.2.145",
115
+ "@swc/core-darwin-arm64": "1.2.145",
116
+ "@swc/core-android-arm64": "1.2.145",
117
+ "@swc/core-linux-arm64-musl": "1.2.145",
118
+ "@swc/core-win32-arm64-msvc": "1.2.145",
119
+ "@swc/core-android-arm-eabi": "1.2.145"
120
120
  }
121
121
  }
package/types.d.ts CHANGED
@@ -454,6 +454,7 @@ export interface TransformConfig {
454
454
  * https://swc.rs/docs/configuring-swc.html#jsctransformdecoratormetadata
455
455
  */
456
456
  decoratorMetadata?: boolean;
457
+ treatConstEnumAsEnum?: boolean;
457
458
  }
458
459
  export interface ReactConfig {
459
460
  /**
package/.kodiak.toml DELETED
@@ -1,15 +0,0 @@
1
- # .kodiak.toml
2
- version = 1
3
-
4
- # We can't use automerge because of version bumping.
5
- # But to make merging faster, we auto-update PRs.
6
- [merge]
7
- do_not_merge = true
8
-
9
- [update]
10
- autoupdate_label = "S-approved"
11
- require_automerge_label = false
12
-
13
- # I want to use auto-merge feature of github
14
- [approve]
15
- auto_approve_usernames = ["kdy1"]
package/clippy.toml DELETED
@@ -1,2 +0,0 @@
1
- cognitive-complexity-threshold = 50
2
- type-complexity-threshold = 25000