@swc/core 1.3.25 → 1.3.26

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/binding.js +13 -1
  3. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -1,4 +1,66 @@
1
1
  # Changelog
2
+ ## [unreleased]
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+
8
+ - **(common)** Mark `\r` as a line ending (#6752) ([26a0c13](https://github.com/swc-project/swc/commit/26a0c135896098e1e1a8fbb99a623311828af5b2))
9
+
10
+
11
+ - **(es)** Remove useless context (#6777) ([ae3cfa7](https://github.com/swc-project/swc/commit/ae3cfa7d2d4cff7f3246691d24286bc2470792e1))
12
+
13
+
14
+ - **(es/codegen)** Fix LineCol calculation of printed files (#6763) ([2b503c1](https://github.com/swc-project/swc/commit/2b503c16d5f338c6a786a19c7c0acbc4c06bcfee))
15
+
16
+
17
+ - **(es/codegen)** Skip `lo` of a program if body is not empty (#6773) ([3f0f664](https://github.com/swc-project/swc/commit/3f0f664c488b4f51a12d277b29ad17e28a413a2b))
18
+
19
+
20
+ - **(es/decorator)** Fix type detection for template literal types (#6786) ([bbfa97a](https://github.com/swc-project/swc/commit/bbfa97a475fdfe18fe9e3ea29329ecb39ed2ddac))
21
+
22
+
23
+ - **(es/helpers)** Make `_classPrivateFieldLooseBase ` return receiver (#6770) ([1d14760](https://github.com/swc-project/swc/commit/1d147602c0bfe291408c65b2e444cea0b5ceba89))
24
+
25
+
26
+ - **(es/minifier)** Make name mangler respect `toplevel` (#6774) ([ec7e913](https://github.com/swc-project/swc/commit/ec7e9138158426b83d12dc3a29896098fb4c9ffa))
27
+
28
+
29
+ - **(es/minifier)** Don't inline conditionally initialized vars (#6751) ([336b1d8](https://github.com/swc-project/swc/commit/336b1d8b4d6489da8f78731d9e12fef962a005da))
30
+
31
+
32
+ - **(es/minifier)** Make AST compressor respect `toplevel` (#6775) ([06770cf](https://github.com/swc-project/swc/commit/06770cff047055b9cea27970e7ce882d770257ba))
33
+
34
+
35
+ - **(es/parser)** Allow parsing `import.meta` as an expression (#6783) ([ff8face](https://github.com/swc-project/swc/commit/ff8facef64ffe115936cfc154b35ec08359524f8))
36
+
37
+ ### Features
38
+
39
+
40
+
41
+ - **(es/minifier)** Make name mangler understand block scoping (#6670) ([a1ccc8a](https://github.com/swc-project/swc/commit/a1ccc8afdff1f252210d571907124508cf760694))
42
+
43
+
44
+ - **(es/minifier)** Handle boolean in `Evaluator` (#6756) ([8a6a1cb](https://github.com/swc-project/swc/commit/8a6a1cbcf1279b805e740f4d77ebb9fb72d52d41))
45
+
46
+
47
+ - **(es/typescript)** Support const modifier on type parameters (#6672) ([019cf37](https://github.com/swc-project/swc/commit/019cf371994b87a92fd26fc623959a797f35991b))
48
+
49
+ ### Miscellaneous Tasks
50
+
51
+
52
+
53
+ - **(ci)** Fix CI action (#6772) ([6d365de](https://github.com/swc-project/swc/commit/6d365de9e21d57c785f1634f4c19418765d9ca9b))
54
+
55
+ ### Testing
56
+
57
+
58
+
59
+ - **(es)** Add a test for a fixed source map issue (#6768) ([6c126da](https://github.com/swc-project/swc/commit/6c126da1d42922229e9bb1c7594570f701e083ba))
60
+
61
+
62
+ - **(es/module)** Add a test for invalid issue (#6785) ([0ef84e1](https://github.com/swc-project/swc/commit/0ef84e1c0004ec5282d26e9a84ea5729681ff106))
63
+
2
64
  ## [1.3.25] - 2023-01-05
3
65
 
4
66
  ### Bug Fixes
@@ -64,6 +126,15 @@
64
126
 
65
127
  - **(es/jest)** Support chaining of jest function calls (#6747) ([72fb606](https://github.com/swc-project/swc/commit/72fb606eb204fddad5df284afda0955fd6e760ff))
66
128
 
129
+ ### Miscellaneous Tasks
130
+
131
+
132
+
133
+ - **(ci)** Fix publish action ([ed2277f](https://github.com/swc-project/swc/commit/ed2277fc07bc1be133001eefcee707c8e6f194fd))
134
+
135
+
136
+ - **(ci)** Fix publish action (#6757) ([7e6e7b1](https://github.com/swc-project/swc/commit/7e6e7b107e40b7ca2192f6c04f668a526fc2db35))
137
+
67
138
  ### Performance
68
139
 
69
140
 
package/binding.js CHANGED
@@ -9,7 +9,8 @@ function isMusl() {
9
9
  // For Node 10
10
10
  if (!process.report || typeof process.report.getReport !== 'function') {
11
11
  try {
12
- return readFileSync('/usr/bin/ldd', 'utf8').includes('musl');
12
+ const lddPath = require('child_process').execSync('which ldd').toString().trim();
13
+ return readFileSync(lddPath, 'utf8').includes('musl');
13
14
  }
14
15
  catch (e) {
15
16
  return true;
@@ -104,6 +105,17 @@ switch (platform) {
104
105
  }
105
106
  break;
106
107
  case 'darwin':
108
+ localFileExisted = existsSync(join(__dirname, 'swc.darwin-universal.node'));
109
+ try {
110
+ if (localFileExisted) {
111
+ nativeBinding = require('./swc.darwin-universal.node');
112
+ }
113
+ else {
114
+ nativeBinding = require('@swc/core-darwin-universal');
115
+ }
116
+ break;
117
+ }
118
+ catch (_a) { }
107
119
  switch (arch) {
108
120
  case 'x64':
109
121
  localFileExisted = existsSync(join(__dirname, 'swc.darwin-x64.node'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.3.25",
3
+ "version": "1.3.26",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -138,16 +138,16 @@
138
138
  "url": "https://opencollective.com/swc"
139
139
  },
140
140
  "optionalDependencies": {
141
- "@swc/core-win32-x64-msvc": "1.3.25",
142
- "@swc/core-darwin-x64": "1.3.25",
143
- "@swc/core-linux-x64-gnu": "1.3.25",
144
- "@swc/core-linux-x64-musl": "1.3.25",
145
- "@swc/core-win32-ia32-msvc": "1.3.25",
146
- "@swc/core-linux-arm64-gnu": "1.3.25",
147
- "@swc/core-linux-arm-gnueabihf": "1.3.25",
148
- "@swc/core-darwin-arm64": "1.3.25",
149
- "@swc/core-linux-arm64-musl": "1.3.25",
150
- "@swc/core-win32-arm64-msvc": "1.3.25"
141
+ "@swc/core-win32-x64-msvc": "1.3.26",
142
+ "@swc/core-darwin-x64": "1.3.26",
143
+ "@swc/core-linux-x64-gnu": "1.3.26",
144
+ "@swc/core-linux-x64-musl": "1.3.26",
145
+ "@swc/core-win32-ia32-msvc": "1.3.26",
146
+ "@swc/core-linux-arm64-gnu": "1.3.26",
147
+ "@swc/core-linux-arm-gnueabihf": "1.3.26",
148
+ "@swc/core-darwin-arm64": "1.3.26",
149
+ "@swc/core-linux-arm64-musl": "1.3.26",
150
+ "@swc/core-win32-arm64-msvc": "1.3.26"
151
151
  },
152
152
  "files": [
153
153
  "CHANGELOG.md",