@swc/core 1.3.42 → 1.3.45
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 +127 -0
- package/package.json +16 -13
- package/types.d.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,133 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(es)** Allow missing `.map` file (#7141) ([3e6a186](https://github.com/swc-project/swc/commit/3e6a1869e84ec01125cf115c3d5f5c5c89645e1a))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(es/compat)** Handle shorthand object prop while renaming (#7176) ([0a80e05](https://github.com/swc-project/swc/commit/0a80e0506b0fd58d31027c348ea0c957a5cc60f7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/helpers)** Use snake_case for helpers (#7147) ([3ca954b](https://github.com/swc-project/swc/commit/3ca954b9f9622ed400308f2af35242583a4bdc3d))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- **(es/modules)** Hint nodejs for multiple `export *` (#7184) ([98f1493](https://github.com/swc-project/swc/commit/98f14931e7fa24b9d888eb5149c647840978b096))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- **(es/parser)** Fix infinite loop on jsx in js (#7191) ([414e669](https://github.com/swc-project/swc/commit/414e66910dc5d9fea254811618f69067ab4a7a67))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(es/typescript)** Mark `A` as a type in `export { type A }` (#7196) ([ddfbc93](https://github.com/swc-project/swc/commit/ddfbc936244c1168c547e134f20d436bfb6227f9))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
- **(swc_core)** Fix a feature name (#7198) ([bfe6544](https://github.com/swc-project/swc/commit/bfe654438f15d875257caf7735f11a79e51780a5))
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
- **(css/modules)** Preserve spans of CSS class names (#7185) ([df7b4e7](https://github.com/swc-project/swc/commit/df7b4e71d22a7174df6f4fe9691044560e8e7f65))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
- **(es/compat)** Implement stage 3 decorator, without auto accessor (#6950) ([7a863ad](https://github.com/swc-project/swc/commit/7a863ad18ffeb45801cc17992634b5c62adfe88b))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- **(es/helpers)** Use named export and unify import path (#7182) ([a13a78e](https://github.com/swc-project/swc/commit/a13a78e3fe2f81f0cbbe4a98da9cbb5a48b6cbed))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
- **(plugin/runner)** Improve cache path (#7188) ([976667f](https://github.com/swc-project/swc/commit/976667f7d98b821940c5325efc092e50c6554dc2))
|
|
42
|
+
|
|
43
|
+
### Testing
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
- **(es/plugin)** Enable E2E plugin test (#7178) ([a785f18](https://github.com/swc-project/swc/commit/a785f18740942c841fede3d625ec2fd4b090d020))
|
|
48
|
+
|
|
49
|
+
## [1.3.44] - 2023-03-30
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- **(css/codegen)** Preserve `raw` of numbers (#7131) ([150c2b6](https://github.com/swc-project/swc/commit/150c2b6fbaef976c6ee97438d1b9b7ffe4b210be))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
- **(css/compat)** Remove usage of `box_syntax` (#7153) ([6f0bf66](https://github.com/swc-project/swc/commit/6f0bf665c29abaa64c60fb43053f96e465d3e041))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
- **(es/compat)** Handle import/export in `reserved_word` (#7165) ([065d11c](https://github.com/swc-project/swc/commit/065d11cb9bd49f36825b3b707e4e9ecfcc64e17b))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
- **(es/compat)** Fix the position for temp var injection (#7171) ([23fb8c5](https://github.com/swc-project/swc/commit/23fb8c5563a8e5f79d256bb27bdbdfd56944ccbc))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
- **(es/react)** Respect `import_source` in new jsx (#7128) ([5d7acfd](https://github.com/swc-project/swc/commit/5d7acfd9cbbb9780879d0d7a046f716572a477f7))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
- **(es/renamer)** Don't use symbols used by declarations if `eval` exists (#7116) ([6d9763e](https://github.com/swc-project/swc/commit/6d9763e8c0f5cef7689961e7eb11dc7199e8cd08))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
- **(es/visit)** Fix handling of `Program` of `AndThen` (#7120) ([d50689e](https://github.com/swc-project/swc/commit/d50689eab0e82a68c84fcacdd8ce5c9009a65100))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
- **(fast-graph)** Use fxhash instead of ahash to make iteration order consistent (#7133) ([b13eb4c](https://github.com/swc-project/swc/commit/b13eb4c81192a57a7e69b10a2d4530ccd91150f8))
|
|
77
|
+
|
|
78
|
+
### Documentation
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
- **(es)** Fix doc url (#7123) ([1e4abcb](https://github.com/swc-project/swc/commit/1e4abcb11d4c5884cc6559db8e86ecd7fbd96e5d))
|
|
83
|
+
|
|
84
|
+
### Features
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
- **(css/parser)** Add `legacy_ie` to the `ParserConfig` (#7109) ([5e58b3e](https://github.com/swc-project/swc/commit/5e58b3e5f6dfe6a7ede97c3e8a2f7436db964113))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
- **(es/react)** Support script within automatic runtime (#7126) ([05a2815](https://github.com/swc-project/swc/commit/05a2815e6ceb6d12e122be4e4ef84281d398f8c2))
|
|
92
|
+
|
|
93
|
+
### Miscellaneous Tasks
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
- **(cargo)** Refactor `Cargo.toml` to reduce merge conflict (#7139) ([2826198](https://github.com/swc-project/swc/commit/28261985b00c23fd1411a8f782c04439d4e4919c))
|
|
98
|
+
|
|
99
|
+
### Refactor
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
- **(ast)** Make serde optional (#7138) ([30bc086](https://github.com/swc-project/swc/commit/30bc0860526c0983042c60a039a1f5acee47830c))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
- **(es)** Remove needless build scripts to reduce compile time (#7129) ([dfe1a3f](https://github.com/swc-project/swc/commit/dfe1a3f4964ba58fdd676c184fdff0919fa78b26))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
- **(es/codegen)** Extract code from generic functions to reduce compile time (#7127) ([08fa94f](https://github.com/swc-project/swc/commit/08fa94fc737c2c3522227c1275e4a1d93c2a8611))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
- **(es/parser)** Remove `EnumKind` to reduce compile time (#7137) ([915f747](https://github.com/swc-project/swc/commit/915f747cb7ba972e47e249b5a5ba9573dd68f607))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
- **(macros)** Reduce compile time (#7132) ([2154a3f](https://github.com/swc-project/swc/commit/2154a3f117d9ea7cc2f12856d6e7f2b33a255d26))
|
|
116
|
+
|
|
117
|
+
### Build
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
- **(cargo)** Update `rustc` to `nightly-2023-03-28` (#7154) ([e445502](https://github.com/swc-project/swc/commit/e445502072d8ebfcbe0da0cb59f3d6a85d4a2087))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
- **(cargo)** Revert rustc upgrade (#7162) ([12546c8](https://github.com/swc-project/swc/commit/12546c853a67210e840efd61452041ef8db00d3a))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
- **(cargo)** Update `rustc` to `nightly-2023-03-20` (#7170) ([0259a74](https://github.com/swc-project/swc/commit/0259a7465fc5122cf2f297f962f7f0209f619251))
|
|
128
|
+
|
|
129
|
+
## [1.3.42] - 2023-03-22
|
|
130
|
+
|
|
131
|
+
### Bug Fixes
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
8
135
|
- **(bindings/node)** Fix loading of `spack.config.js` (#7105) ([a4d1af1](https://github.com/swc-project/swc/commit/a4d1af18deabe79caa959eb654ca1ebc2d9f6867))
|
|
9
136
|
|
|
10
137
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.45",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@napi-rs/cli": "^2.14.1",
|
|
95
95
|
"@swc/core": "=1.2.220",
|
|
96
96
|
"@swc/helpers": "^0.4.2",
|
|
97
|
-
"@swc/plugin-jest": "1.5.
|
|
97
|
+
"@swc/plugin-jest": "1.5.56",
|
|
98
98
|
"@taplo/cli": "^0.3.2",
|
|
99
99
|
"@types/jest": "^28.1.4",
|
|
100
100
|
"@types/node": "^14.14.41",
|
|
@@ -133,21 +133,24 @@
|
|
|
133
133
|
"ts-node": "^10.5.0",
|
|
134
134
|
"typescript": "^4.5.2"
|
|
135
135
|
},
|
|
136
|
+
"peerDependencies": {
|
|
137
|
+
"@swc/helpers": ">0.4.14 <0.5"
|
|
138
|
+
},
|
|
136
139
|
"funding": {
|
|
137
140
|
"type": "opencollective",
|
|
138
141
|
"url": "https://opencollective.com/swc"
|
|
139
142
|
},
|
|
140
143
|
"optionalDependencies": {
|
|
141
|
-
"@swc/core-win32-x64-msvc": "1.3.
|
|
142
|
-
"@swc/core-darwin-x64": "1.3.
|
|
143
|
-
"@swc/core-linux-x64-gnu": "1.3.
|
|
144
|
-
"@swc/core-linux-x64-musl": "1.3.
|
|
145
|
-
"@swc/core-win32-ia32-msvc": "1.3.
|
|
146
|
-
"@swc/core-linux-arm64-gnu": "1.3.
|
|
147
|
-
"@swc/core-linux-arm-gnueabihf": "1.3.
|
|
148
|
-
"@swc/core-darwin-arm64": "1.3.
|
|
149
|
-
"@swc/core-linux-arm64-musl": "1.3.
|
|
150
|
-
"@swc/core-win32-arm64-msvc": "1.3.
|
|
144
|
+
"@swc/core-win32-x64-msvc": "1.3.45",
|
|
145
|
+
"@swc/core-darwin-x64": "1.3.45",
|
|
146
|
+
"@swc/core-linux-x64-gnu": "1.3.45",
|
|
147
|
+
"@swc/core-linux-x64-musl": "1.3.45",
|
|
148
|
+
"@swc/core-win32-ia32-msvc": "1.3.45",
|
|
149
|
+
"@swc/core-linux-arm64-gnu": "1.3.45",
|
|
150
|
+
"@swc/core-linux-arm-gnueabihf": "1.3.45",
|
|
151
|
+
"@swc/core-darwin-arm64": "1.3.45",
|
|
152
|
+
"@swc/core-linux-arm64-musl": "1.3.45",
|
|
153
|
+
"@swc/core-win32-arm64-msvc": "1.3.45"
|
|
151
154
|
},
|
|
152
155
|
"files": [
|
|
153
156
|
"CHANGELOG.md",
|
|
@@ -169,5 +172,5 @@
|
|
|
169
172
|
"postinstall.js",
|
|
170
173
|
"bindings/binding_core_wasm/pkg/binding_core_wasm.d.ts"
|
|
171
174
|
],
|
|
172
|
-
"packageManager": "yarn@3.
|
|
175
|
+
"packageManager": "yarn@3.5.0"
|
|
173
176
|
}
|
package/types.d.ts
CHANGED
|
@@ -763,11 +763,11 @@ export interface BaseModuleConfig {
|
|
|
763
763
|
*
|
|
764
764
|
* "use strict";
|
|
765
765
|
*
|
|
766
|
-
* function
|
|
766
|
+
* function _interop_require_default(obj) {
|
|
767
767
|
* return obj && obj.__esModule ? obj : { default: obj };
|
|
768
768
|
* }
|
|
769
769
|
*
|
|
770
|
-
* var _foo =
|
|
770
|
+
* var _foo = _interop_require_default(require("foo"));
|
|
771
771
|
* var _bar = require("bar");
|
|
772
772
|
*
|
|
773
773
|
* _foo.default;
|
|
@@ -807,7 +807,7 @@ export interface BaseModuleConfig {
|
|
|
807
807
|
* - `none`
|
|
808
808
|
*
|
|
809
809
|
* If you know that the imported file has been transformed with a compiler that stores the `default` export on
|
|
810
|
-
* `exports.default` (such as swc or Babel), you can safely omit the `
|
|
810
|
+
* `exports.default` (such as swc or Babel), you can safely omit the `_interop_require_default` helper.
|
|
811
811
|
*
|
|
812
812
|
* ```javascript
|
|
813
813
|
* import foo from "foo";
|