@swc/core 1.2.123 → 1.2.127
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 +194 -2
- package/binding.js +11 -5
- package/package.json +14 -14
- package/types.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,9 +5,195 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
- **(es/
|
|
8
|
+
- **(es/lints)** Fix incorrect duplicate binding error (#3194) ([913c82a](https://github.com/swc-project/swc/commit/913c82a2ab94e14eb350e1573af736aa87c7f2bb))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(es/minifier)** Fix bugs (#2955) ([1c1c9f0](https://github.com/swc-project/swc/commit/1c1c9f0eaee4993d2a8e7c9714e3bab00123f14b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/visit)** Make `noop_visit_type` visit typescript nodes that executes at runtime (#3192) ([517662c](https://github.com/swc-project/swc/commit/517662c9c243aa56451025563a7b7e57fd24d9d0))
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- **(es/dep-graph)** Improve DependencyDescriptor to combine `import_assertions` with `dynamic_import_assertions` (#3183) ([e5e6e84](https://github.com/swc-project/swc/commit/e5e6e843004b7ad3ce0ffa95f583d2c2a808736a))
|
|
9
21
|
|
|
10
|
-
|
|
22
|
+
|
|
23
|
+
- **(esdiff)** Create a command to determine problematic file (#3181) ([51c792e](https://github.com/swc-project/swc/commit/51c792eb302a4e22104912a1289d19f80610d480))
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Tasks
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- **(*)** Update `rustc` (#3185) ([7d0a8a1](https://github.com/swc-project/swc/commit/7d0a8a12f145c42fba2ec6a80c4d9b720f29c40e))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
- **(ci)** Split cargo docs (#3187) ([46949d3](https://github.com/swc-project/swc/commit/46949d39ebdcb14347156eb00490e53d37d06707))
|
|
33
|
+
|
|
34
|
+
### Refactor
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- **(dbg-swc)** Rename `esdiff` to `dbg-swc` (#3189) ([c758997](https://github.com/swc-project/swc/commit/c758997180793502b76d737cf56ebc10b0d88004))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
- **(plugin)** Add a loader for wasm-based plugin system (#3179) ([fc4c670](https://github.com/swc-project/swc/commit/fc4c6708f24cda39640fbbfe56123f2f6eeb2474))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- **(plugin)** Remove codes related to the plugin system based on `abi_stable` (#3188) ([32d3342](https://github.com/swc-project/swc/commit/32d3342283ec788842a89bf129e4f04cfab13eb6))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
- **(plugin/runner)** Avoid redundant filesystem reads (#3186) ([b61c49f](https://github.com/swc-project/swc/commit/b61c49fe39acf28e09888e7b2163c7be5cceff4b))
|
|
48
|
+
|
|
49
|
+
## [1.2.126] - 2022-01-03
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- **(es/minifier)** Fix comparison of objects, numbers and strings (#3172) ([db51ce4](https://github.com/swc-project/swc/commit/db51ce44614e3661c9c25c562d39b7581e521850))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
- **(node-swc)** Recover from ldd not found ([1dfc2ee](https://github.com/swc-project/swc/commit/1dfc2ee1054d20b0d04699ebef3ab09b2f6fc4f8))
|
|
59
|
+
|
|
60
|
+
### Features
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
- **(es/ast)** Add `ModuleExportName` (#3048) ([07c0489](https://github.com/swc-project/swc/commit/07c0489575188846b82b1af3e4bd711466e006ca))
|
|
65
|
+
|
|
66
|
+
## [1.2.125] - 2022-01-02
|
|
67
|
+
|
|
68
|
+
### Bug Fixes
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
- **(es/compat)** Visit all private class methods (#3150) ([35b6461](https://github.com/swc-project/swc/commit/35b64613bb1f6de52d7362e66d28c50513dbbe12))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
- **(es/compat)** Fix length of async functions (#3136) ([f78d005](https://github.com/swc-project/swc/commit/f78d005a9587d2ea44741c4cef80fa711e8a1d26))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
- **(es/compat)** Fix `new.target` in class properties (#3156) ([e112103](https://github.com/swc-project/swc/commit/e11210309cf2aab4aae77a76e4cdfba0bf9efa40))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
- **(es/minifier)** Fix for modules (#3170) ([790c506](https://github.com/swc-project/swc/commit/790c50631ba1daa124e62bcee299f89031a4ec3d))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
- **(es/typescript)** Fix handling of references in a TypeScript enum (#3163) ([e02307d](https://github.com/swc-project/swc/commit/e02307d4c82e043079131b414198ee5b4b7560e5))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
- **(es/typescript)** Declare the exported variables in a namespace (#3162) ([366dc0e](https://github.com/swc-project/swc/commit/366dc0eec3e19b4e608dc4df8eb728f6d710f9b7))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
- **(es/utils)** Fix handling of `new.target` (#3145) ([356082a](https://github.com/swc-project/swc/commit/356082ad84fa69cf09b5627598a2576bd1b27c36))
|
|
91
|
+
|
|
92
|
+
### Documentation
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
- **(es/ast)** Improve rustdoc (#3142) ([333acb5](https://github.com/swc-project/swc/commit/333acb56223139817c1df0c8b3763190b55a6295))- **general**: Update discord link (#3161) ([fb20480](https://github.com/swc-project/swc/commit/fb2048035f0aa67761aa213c58795accfde7a6d0))
|
|
97
|
+
|
|
98
|
+
### Features
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
- **(es/ast)** Add `rkyv` support (#3166) ([bf751cb](https://github.com/swc-project/swc/commit/bf751cb6905c7520f0846b9f0a6f4f44edecbdb3))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
- **(es/codegen)** Make the output for empty objects and empty statements pretty (#3171) ([5296180](https://github.com/swc-project/swc/commit/52961804d19c413c09ff4e08c327647ffc3d0bea))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
- **(es/diff)** Add a internal CLI program for debugging minifier (#3168) ([1aa55e6](https://github.com/swc-project/swc/commit/1aa55e616a7bc2ffa791600e908ddb10a4009e7b))
|
|
109
|
+
|
|
110
|
+
### Miscellaneous Tasks
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
- **(ci)** Update `github-action-benchmark` (#3148) ([5a3bdc9](https://github.com/swc-project/swc/commit/5a3bdc9ed37ba39a0591c66bd89eddb95f6df850))- **general**: Add `enhancement` label to `feature_request` template (#3164) ([360ad7b](https://github.com/swc-project/swc/commit/360ad7b41c6fa35ce3afc81c2237d9acdae9a549))
|
|
115
|
+
|
|
116
|
+
### Performance
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
- **(es/ast/serde)** Make deserialization faster (#3160) ([7a83c0c](https://github.com/swc-project/swc/commit/7a83c0cb575b0ec6510d8dff6d1bd44d9c97fdb9))
|
|
121
|
+
|
|
122
|
+
### Refactor
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
- **(*)** Drop unused dependencies (#3138) ([72c9636](https://github.com/swc-project/swc/commit/72c963662d63338235378d71ee856c782cdeddfe))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
- **(*)** Use 2021 edition (#3151) ([194b3e9](https://github.com/swc-project/swc/commit/194b3e9b67fb096dee8dbd12fff9167e4217174b))
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
- **(bundler)** Improve test suite (#3144) ([8a1016f](https://github.com/swc-project/swc/commit/8a1016fb406dd04dcf432ccf4e07036f81d4c9c6))
|
|
133
|
+
|
|
134
|
+
### Testing
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
- **(es/parser)** Add tests about null escape (#3147) ([a4e8e53](https://github.com/swc-project/swc/commit/a4e8e53c1958f842206916eade24a269d582d69c))
|
|
139
|
+
|
|
140
|
+
## [1.2.124] - 2021-12-29
|
|
141
|
+
|
|
142
|
+
### Bug Fixes
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
- **(es)** Handle import assertions correctly (#3113) ([c9adf03](https://github.com/swc-project/swc/commit/c9adf0333811b2830fe3f3c06d6fd9706f7bb9ae))
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
- **(es/compat)** Fix handling of hoisted functions in regenerator (#3119) ([ac78a52](https://github.com/swc-project/swc/commit/ac78a527ebba3e8df2342e65b4fd5c2d36240ff0))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
- **(es/compat)** Fix private methods of a class (#3123) ([1b6ac25](https://github.com/swc-project/swc/commit/1b6ac25d5c6c009c38a7097b910f7b6838ab560b))
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
- **(es/compat)** Fix `computed_properties` (#3120) ([27d3fd9](https://github.com/swc-project/swc/commit/27d3fd93b0ad2b5e305ded8145100b060ac6c2a3))
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
- **(es/optimization)** Fix inlining (#3132) ([693c22a](https://github.com/swc-project/swc/commit/693c22aa93ce115aca294f61feefe4582336ada3))
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
- **(es/parser)** Support import assertions in specifier-less imports (#3134) ([2f3ca22](https://github.com/swc-project/swc/commit/2f3ca22ecf7f567256695c39a904f02ff75e2c85))
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
- **(es/renamer)** Fix renamer (#3139) ([43c8cda](https://github.com/swc-project/swc/commit/43c8cda31a89bfc027ea3948bd9653d97d3fc29c))
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
- **(es/utils)** Fix `is_valid_ident` (#3133) ([ec7e0ae](https://github.com/swc-project/swc/commit/ec7e0aee256cc7cc13f81ef22164c29f42bb43be))
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
- **(node-swc)** Recover from `ldd` not found (#3125) ([054a195](https://github.com/swc-project/swc/commit/054a19518ce77f36520a17e146c65632aeab3080))
|
|
171
|
+
|
|
172
|
+
### Features
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
- **(es/preset-env)** Upgrade `browserslist-rs` (#3122) ([83f71c2](https://github.com/swc-project/swc/commit/83f71c2c0b8382e70172b1e2d4d9a18852e7a995))
|
|
177
|
+
|
|
178
|
+
### Miscellaneous Tasks
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
- **(ci)** Reduce CI time (#3128) ([61cd7da](https://github.com/swc-project/swc/commit/61cd7da265bd775605a0e48346f70b41adf9a225))
|
|
183
|
+
|
|
184
|
+
### Refactor
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
- **(es/react/fast-refresh)** Use `VisitMut` (#3129) ([f8f04e0](https://github.com/swc-project/swc/commit/f8f04e031e218393abd8ae5ca6469484b0fe90d3))
|
|
189
|
+
|
|
190
|
+
### Security
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
- **(repo)** Configure `cargo-crev` (#3124) ([cec325b](https://github.com/swc-project/swc/commit/cec325be6329bbdc175d7850443de8aabfcf31d6))
|
|
195
|
+
|
|
196
|
+
## [1.2.123] - 2021-12-26
|
|
11
197
|
|
|
12
198
|
### Bug Fixes
|
|
13
199
|
|
|
@@ -22,6 +208,9 @@
|
|
|
22
208
|
- **(es/compat)** Fix `destructuring` (#3104) ([9f5a8f7](https://github.com/swc-project/swc/commit/9f5a8f728ade23640430d82f9f4bbcb341e30e2a))
|
|
23
209
|
|
|
24
210
|
|
|
211
|
+
- **(es/compat)** Fix handling of class methods with a big int as a key (#3118) ([a1cb4a4](https://github.com/swc-project/swc/commit/a1cb4a4aa57bd54e6718f293a65361952f4ef11d))
|
|
212
|
+
|
|
213
|
+
|
|
25
214
|
- **(es/helpers)** Fix decorators (#3105) ([f66c2cd](https://github.com/swc-project/swc/commit/f66c2cd375f78711fdf6a058003010bce8999aed))
|
|
26
215
|
|
|
27
216
|
### Features
|
|
@@ -42,6 +231,9 @@
|
|
|
42
231
|
|
|
43
232
|
- **(ci)** Fix script for publishing ([f51314c](https://github.com/swc-project/swc/commit/f51314cd51990b2caf8b18a7d8a647236a0ec893))
|
|
44
233
|
|
|
234
|
+
|
|
235
|
+
- **(xi)** Fix publishing script ([e0e7f74](https://github.com/swc-project/swc/commit/e0e7f749551c15eae875457d584b869088794aea))- **general**: Fix `package.json` ([999df43](https://github.com/swc-project/swc/commit/999df436f7b9317167a822d6e0602324c8871dae))
|
|
236
|
+
|
|
45
237
|
## [1.2.122] - 2021-12-22
|
|
46
238
|
|
|
47
239
|
### Bug Fixes
|
package/binding.js
CHANGED
|
@@ -4,8 +4,16 @@ const { join } = require('path');
|
|
|
4
4
|
const { platform, arch } = process;
|
|
5
5
|
let nativeBinding = null;
|
|
6
6
|
let localFileExisted = false;
|
|
7
|
-
let isMusl = false;
|
|
8
7
|
let loadError = null;
|
|
8
|
+
const isMusl = () => {
|
|
9
|
+
try {
|
|
10
|
+
const isMusl = readFileSync('/usr/bin/ldd', 'utf8').includes('musl');
|
|
11
|
+
return isMusl;
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
9
17
|
switch (platform) {
|
|
10
18
|
case 'android':
|
|
11
19
|
if (arch !== 'arm64') {
|
|
@@ -126,8 +134,7 @@ switch (platform) {
|
|
|
126
134
|
case 'linux':
|
|
127
135
|
switch (arch) {
|
|
128
136
|
case 'x64':
|
|
129
|
-
|
|
130
|
-
if (isMusl) {
|
|
137
|
+
if (isMusl()) {
|
|
131
138
|
localFileExisted = existsSync(join(__dirname, 'swc.linux-x64-musl.node'));
|
|
132
139
|
try {
|
|
133
140
|
if (localFileExisted) {
|
|
@@ -157,8 +164,7 @@ switch (platform) {
|
|
|
157
164
|
}
|
|
158
165
|
break;
|
|
159
166
|
case 'arm64':
|
|
160
|
-
|
|
161
|
-
if (isMusl) {
|
|
167
|
+
if (isMusl()) {
|
|
162
168
|
localFileExisted = existsSync(join(__dirname, 'swc.linux-arm64-musl.node'));
|
|
163
169
|
try {
|
|
164
170
|
if (localFileExisted) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.127",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"@node-rs/helper": "^1.0.0"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
|
-
"@swc/core-win32-x64-msvc": "1.2.
|
|
55
|
-
"@swc/core-darwin-x64": "1.2.
|
|
56
|
-
"@swc/core-linux-x64-gnu": "1.2.
|
|
57
|
-
"@swc/core-linux-x64-musl": "1.2.
|
|
58
|
-
"@swc/core-freebsd-x64": "1.2.
|
|
59
|
-
"@swc/core-win32-ia32-msvc": "1.2.
|
|
60
|
-
"@swc/core-linux-arm64-gnu": "1.2.
|
|
61
|
-
"@swc/core-linux-arm-gnueabihf": "1.2.
|
|
62
|
-
"@swc/core-darwin-arm64": "1.2.
|
|
63
|
-
"@swc/core-android-arm64": "1.2.
|
|
64
|
-
"@swc/core-linux-arm64-musl": "1.2.
|
|
65
|
-
"@swc/core-win32-arm64-msvc": "1.2.
|
|
66
|
-
"@swc/core-android-arm-eabi": "1.2.
|
|
54
|
+
"@swc/core-win32-x64-msvc": "1.2.127",
|
|
55
|
+
"@swc/core-darwin-x64": "1.2.127",
|
|
56
|
+
"@swc/core-linux-x64-gnu": "1.2.127",
|
|
57
|
+
"@swc/core-linux-x64-musl": "1.2.127",
|
|
58
|
+
"@swc/core-freebsd-x64": "1.2.127",
|
|
59
|
+
"@swc/core-win32-ia32-msvc": "1.2.127",
|
|
60
|
+
"@swc/core-linux-arm64-gnu": "1.2.127",
|
|
61
|
+
"@swc/core-linux-arm-gnueabihf": "1.2.127",
|
|
62
|
+
"@swc/core-darwin-arm64": "1.2.127",
|
|
63
|
+
"@swc/core-android-arm64": "1.2.127",
|
|
64
|
+
"@swc/core-linux-arm64-musl": "1.2.127",
|
|
65
|
+
"@swc/core-win32-arm64-msvc": "1.2.127",
|
|
66
|
+
"@swc/core-android-arm-eabi": "1.2.127"
|
|
67
67
|
},
|
|
68
68
|
"types": "./index.d.ts",
|
|
69
69
|
"scripts": {
|
package/types.d.ts
CHANGED