@swc/core 1.2.123 → 1.2.124

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,9 +5,54 @@
5
5
 
6
6
 
7
7
 
8
- - **(es/compat)** Fix handling of class methods with a big int as a key (#3118) ([a1cb4a4](https://github.com/swc-project/swc/commit/a1cb4a4aa57bd54e6718f293a65361952f4ef11d))
8
+ - **(es)** Handle import assertions correctly (#3113) ([c9adf03](https://github.com/swc-project/swc/commit/c9adf0333811b2830fe3f3c06d6fd9706f7bb9ae))
9
+
10
+
11
+ - **(es/compat)** Fix handling of hoisted functions in regenerator (#3119) ([ac78a52](https://github.com/swc-project/swc/commit/ac78a527ebba3e8df2342e65b4fd5c2d36240ff0))
12
+
13
+
14
+ - **(es/compat)** Fix private methods of a class (#3123) ([1b6ac25](https://github.com/swc-project/swc/commit/1b6ac25d5c6c009c38a7097b910f7b6838ab560b))
15
+
16
+
17
+ - **(es/compat)** Fix `computed_properties` (#3120) ([27d3fd9](https://github.com/swc-project/swc/commit/27d3fd93b0ad2b5e305ded8145100b060ac6c2a3))
18
+
19
+
20
+ - **(es/optimization)** Fix inlining (#3132) ([693c22a](https://github.com/swc-project/swc/commit/693c22aa93ce115aca294f61feefe4582336ada3))
21
+
9
22
 
10
- ## [1.2.123] - 2021-12-25
23
+ - **(es/parser)** Support import assertions in specifier-less imports (#3134) ([2f3ca22](https://github.com/swc-project/swc/commit/2f3ca22ecf7f567256695c39a904f02ff75e2c85))
24
+
25
+
26
+ - **(es/utils)** Fix `is_valid_ident` (#3133) ([ec7e0ae](https://github.com/swc-project/swc/commit/ec7e0aee256cc7cc13f81ef22164c29f42bb43be))
27
+
28
+
29
+ - **(node-swc)** Recover from `ldd` not found (#3125) ([054a195](https://github.com/swc-project/swc/commit/054a19518ce77f36520a17e146c65632aeab3080))
30
+
31
+ ### Features
32
+
33
+
34
+
35
+ - **(es/preset-env)** Upgrade `browserslist-rs` (#3122) ([83f71c2](https://github.com/swc-project/swc/commit/83f71c2c0b8382e70172b1e2d4d9a18852e7a995))
36
+
37
+ ### Miscellaneous Tasks
38
+
39
+
40
+
41
+ - **(ci)** Reduce CI time (#3128) ([61cd7da](https://github.com/swc-project/swc/commit/61cd7da265bd775605a0e48346f70b41adf9a225))
42
+
43
+ ### Refactor
44
+
45
+
46
+
47
+ - **(es/react/fast-refresh)** Use `VisitMut` (#3129) ([f8f04e0](https://github.com/swc-project/swc/commit/f8f04e031e218393abd8ae5ca6469484b0fe90d3))
48
+
49
+ ### Security
50
+
51
+
52
+
53
+ - **(repo)** Configure `cargo-crev` (#3124) ([cec325b](https://github.com/swc-project/swc/commit/cec325be6329bbdc175d7850443de8aabfcf31d6))
54
+
55
+ ## [1.2.123] - 2021-12-26
11
56
 
12
57
  ### Bug Fixes
13
58
 
@@ -22,6 +67,9 @@
22
67
  - **(es/compat)** Fix `destructuring` (#3104) ([9f5a8f7](https://github.com/swc-project/swc/commit/9f5a8f728ade23640430d82f9f4bbcb341e30e2a))
23
68
 
24
69
 
70
+ - **(es/compat)** Fix handling of class methods with a big int as a key (#3118) ([a1cb4a4](https://github.com/swc-project/swc/commit/a1cb4a4aa57bd54e6718f293a65361952f4ef11d))
71
+
72
+
25
73
  - **(es/helpers)** Fix decorators (#3105) ([f66c2cd](https://github.com/swc-project/swc/commit/f66c2cd375f78711fdf6a058003010bce8999aed))
26
74
 
27
75
  ### Features
@@ -42,6 +90,9 @@
42
90
 
43
91
  - **(ci)** Fix script for publishing ([f51314c](https://github.com/swc-project/swc/commit/f51314cd51990b2caf8b18a7d8a647236a0ec893))
44
92
 
93
+
94
+ - **(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))
95
+
45
96
  ## [1.2.122] - 2021-12-22
46
97
 
47
98
  ### 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
- isMusl = readFileSync('/usr/bin/ldd', 'utf8').includes('musl');
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
- isMusl = readFileSync('/usr/bin/ldd', 'utf8').includes('musl');
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.123",
3
+ "version": "1.2.124",
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.123",
55
- "@swc/core-darwin-x64": "1.2.123",
56
- "@swc/core-linux-x64-gnu": "1.2.123",
57
- "@swc/core-linux-x64-musl": "1.2.123",
58
- "@swc/core-freebsd-x64": "1.2.123",
59
- "@swc/core-win32-ia32-msvc": "1.2.123",
60
- "@swc/core-linux-arm64-gnu": "1.2.123",
61
- "@swc/core-linux-arm-gnueabihf": "1.2.123",
62
- "@swc/core-darwin-arm64": "1.2.123",
63
- "@swc/core-android-arm64": "1.2.123",
64
- "@swc/core-linux-arm64-musl": "1.2.123",
65
- "@swc/core-win32-arm64-msvc": "1.2.123",
66
- "@swc/core-android-arm-eabi": "1.2.123"
54
+ "@swc/core-win32-x64-msvc": "1.2.124",
55
+ "@swc/core-darwin-x64": "1.2.124",
56
+ "@swc/core-linux-x64-gnu": "1.2.124",
57
+ "@swc/core-linux-x64-musl": "1.2.124",
58
+ "@swc/core-freebsd-x64": "1.2.124",
59
+ "@swc/core-win32-ia32-msvc": "1.2.124",
60
+ "@swc/core-linux-arm64-gnu": "1.2.124",
61
+ "@swc/core-linux-arm-gnueabihf": "1.2.124",
62
+ "@swc/core-darwin-arm64": "1.2.124",
63
+ "@swc/core-android-arm64": "1.2.124",
64
+ "@swc/core-linux-arm64-musl": "1.2.124",
65
+ "@swc/core-win32-arm64-msvc": "1.2.124",
66
+ "@swc/core-android-arm-eabi": "1.2.124"
67
67
  },
68
68
  "types": "./index.d.ts",
69
69
  "scripts": {
package/types.d.ts CHANGED
@@ -325,8 +325,9 @@ export interface JscConfig {
325
325
  * Keep class names.
326
326
  */
327
327
  keepClassNames?: boolean;
328
- experimetal?: {
328
+ experimental?: {
329
329
  optimizeHygiene?: boolean;
330
+ keepImportAssertions?: boolean;
330
331
  };
331
332
  baseUrl?: string;
332
333
  paths?: {