@swc/core 1.2.204 → 1.2.207
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 +138 -0
- package/README.md +3 -1
- package/package.json +14 -14
- package/types.d.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,144 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(es/compat)** Handle classes with accessors and a method with the same name (#5039) ([25bd520](https://github.com/swc-project/swc/commit/25bd5206205d76c1ff93e67b67b3aeca551113d6))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(es/modules)** Handle module references in binding idents (#5055) ([e13364f](https://github.com/swc-project/swc/commit/e13364f976e0c10f879fa0f9678c617a713d052d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(node-swc/types)** Add `nodenext` config type (#5044) ([7d4e6be](https://github.com/swc-project/swc/commit/7d4e6bef96242d6506fb0f51c7002f7bbc84af94))
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- **(es/lints)** Report an error for reassignment to import binding (#5033) ([376c4e1](https://github.com/swc-project/swc/commit/376c4e11af5aa8c0e5bc5900f6168893644473b7))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(es/minifier)** Handle pure annotations on member expressions (#5050) ([a15bb48](https://github.com/swc-project/swc/commit/a15bb485241b2a5fb2ecbbd56558dcb5915b8ff4))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
- **(es/modules)** Optimize a dynamic import with a literal path (#5049) ([2cc229e](https://github.com/swc-project/swc/commit/2cc229e6fb1d0b439e1fe7661be481494f57efa9))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- **(html/minifier)** Allow compressing additional attributes (#5036) ([55e0ea3](https://github.com/swc-project/swc/commit/55e0ea32940ff34de73e7eb4b8c999b58d798272))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
- **(html/minifier)** Add `normalize_attributes` for disabling normalization (#5045) ([0836d29](https://github.com/swc-project/swc/commit/0836d29913e51846a3361837442c18e2011bec71))
|
|
33
|
+
|
|
34
|
+
## [1.2.206] - 2022-06-27
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
- **(es/compat)** Fix name conflict of `Array` (#5034) ([04fc1cb](https://github.com/swc-project/swc/commit/04fc1cb429b274e72bb2a939f4aaa102c158121a))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
- **(es/parser)** Allow initializer of the var of for-in loop in non-strict mode (#5038) ([f238093](https://github.com/swc-project/swc/commit/f238093c3b54e5a6e9d46239c28ab936de7d68e9))
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
- **(html/codegen)** Improve API (#5031) ([8bf924a](https://github.com/swc-project/swc/commit/8bf924ae5f7305d1db65cf5a9b09f76cb7903e2b))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
- **(html/minifier)** Add `remove_comments` option (#5037) ([e6c78d0](https://github.com/swc-project/swc/commit/e6c78d0b1d863c61882c941f62fccd04a501530b))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- **(html/minifier)** Improve smart mode (#5004) ([9202ff9](https://github.com/swc-project/swc/commit/9202ff9700cbea5714a65746d7375fa41f8bb140))
|
|
56
|
+
|
|
57
|
+
### Refactor
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
- **(es/module)** Implement new module transformer (#4758) ([fa68cbd](https://github.com/swc-project/swc/commit/fa68cbd74ad2b36c0f1aaec563320114d5603cae))
|
|
62
|
+
|
|
63
|
+
## [1.2.205] - 2022-06-24
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
- **(css/parser)** Improve lexer errors (#5025) ([c345524](https://github.com/swc-project/swc/commit/c345524e368078a59cdf5376999a5b443f2918e7))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
- **(es/lints)** Allow duplicate function in non-top level (#5011) ([4a422a0](https://github.com/swc-project/swc/commit/4a422a09a4a933b7db085d936d16dbf53e518956))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
- **(es/parser)** Don't panic on an invalid import meta property (#4994) ([53a8cb1](https://github.com/swc-project/swc/commit/53a8cb12094b15aed1667f844abfefea1420d3d2))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
- **(es/parser)** Allow instantiation expression followed by a line break or a binary operator (#5000) ([a62b2b3](https://github.com/swc-project/swc/commit/a62b2b32446613fca0a6193c93c19f1e0b86c3b0))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
- **(es/transforms)** Add custom `Sync` + `Send` for the renamer (#5018) ([fd73895](https://github.com/swc-project/swc/commit/fd73895a7be31b24a2795e38c1e7729086656023))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
- **(es/typescript)** Preserve `export = ` for AMD (#4995) ([d736b31](https://github.com/swc-project/swc/commit/d736b31e08771c3ca243e6875a11bef1a2937c85))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
- **(html/minifier)** Avoid optional attributes (#5016) ([f1fd83d](https://github.com/swc-project/swc/commit/f1fd83dcc70aff7d27d0bd0d4f0954dc5dc8cbbd))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
- **(html/minifier)** Compress more complex attributes (#5024) ([c61babd](https://github.com/swc-project/swc/commit/c61babd9af822491d2af4295638df0483748d2e0))
|
|
91
|
+
|
|
92
|
+
### Documentation
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
- **(readme)** Add a link for discord badge in `README.md` (#5005) ([1f64055](https://github.com/swc-project/swc/commit/1f64055438f1867683fc0fb3b3bef88ca077ff0c))
|
|
97
|
+
|
|
98
|
+
### Features
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
- **(html/minifier)** Compress more svg/mathml attributes (#5001) ([1538649](https://github.com/swc-project/swc/commit/15386492372bd8bf322bd60a71ebdff54a15ebf8))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
- **(html/minifier)** Add an API to minify document fragments (#5002) ([7745fbf](https://github.com/swc-project/swc/commit/7745fbf604d6c3c8daeb61eced8c01b464e385db))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
- **(html/minifier)** Minify js (#4999) ([28bc735](https://github.com/swc-project/swc/commit/28bc735d03987dd965fdefe7284b30bee3346a3a))
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
- **(html/minifier)** Add `remove_redundant_attributes` (#5023) ([03d8a3a](https://github.com/swc-project/swc/commit/03d8a3a0ddb843ded43134265973557dd48e14a7))
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
- **(html/minifier)** Compress `style` and `media` attributes (#5022) ([47d34a3](https://github.com/swc-project/swc/commit/47d34a33d43a6e28a4318ea826513edf380dc13a))
|
|
115
|
+
|
|
116
|
+
### Performance
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
- **(html/parser)** Improve performance (#5028) ([a057183](https://github.com/swc-project/swc/commit/a057183230303cc874a6f7c236cf0ea11fe24f2f))
|
|
121
|
+
|
|
122
|
+
### Refactor
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
- **(webpack-ast)** Remove (#5026) ([17c51fa](https://github.com/swc-project/swc/commit/17c51fa53ca605aea6c3286e1994ab5dbc5f1b74))
|
|
127
|
+
|
|
128
|
+
### Testing
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
- **(es/helpers)** Unify code path for testing external helpers (#5010) ([125549b](https://github.com/swc-project/swc/commit/125549b7a96d5a91101e1a96a0bb39214e252800))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
- **(es/minifier)** Add a test case for the minifier (#5013) ([eedcb11](https://github.com/swc-project/swc/commit/eedcb114a2df09d88995c1b58ea1d1980831a02d))
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
- **(es/parser)** Add a test case for instantiation expr (#5014) ([6bcb925](https://github.com/swc-project/swc/commit/6bcb92598b5c71fee407b4f4be7da85d36a0735d))
|
|
139
|
+
|
|
140
|
+
## [1.2.204] - 2022-06-18
|
|
141
|
+
|
|
142
|
+
### Bug Fixes
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
8
146
|
- **(es/helpers)** Fix `module` field in `package.json` of `@swc/helpers` (#4978) ([5123c20](https://github.com/swc-project/swc/commit/5123c20b5d765db0fa645a1d4ba2820d5eeddc9c))
|
|
9
147
|
|
|
10
148
|
|
package/README.md
CHANGED
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
</p>
|
|
28
28
|
|
|
29
29
|
<p align="center">
|
|
30
|
-
<
|
|
30
|
+
<a href="https://discord.com/invite/GnHbXTdZz6">
|
|
31
|
+
<img alt="Discord" src="https://img.shields.io/discord/889779439272075314">
|
|
32
|
+
</a>
|
|
31
33
|
</p>
|
|
32
34
|
|
|
33
35
|
SWC (stands for `Speedy Web Compiler`) is a super-fast TypeScript / JavaScript compiler written in Rust. It's a library for Rust and JavaScript at the same time. If you are using SWC from Rust, see [rustdoc](https://rustdoc.swc.rs/swc/) and for most users, your entry point for using the library will be [parser](https://rustdoc.swc.rs/swc_ecma_parser/).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.207",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -135,18 +135,18 @@
|
|
|
135
135
|
"url": "https://opencollective.com/swc"
|
|
136
136
|
},
|
|
137
137
|
"optionalDependencies": {
|
|
138
|
-
"@swc/core-win32-x64-msvc": "1.2.
|
|
139
|
-
"@swc/core-darwin-x64": "1.2.
|
|
140
|
-
"@swc/core-linux-x64-gnu": "1.2.
|
|
141
|
-
"@swc/core-linux-x64-musl": "1.2.
|
|
142
|
-
"@swc/core-freebsd-x64": "1.2.
|
|
143
|
-
"@swc/core-win32-ia32-msvc": "1.2.
|
|
144
|
-
"@swc/core-linux-arm64-gnu": "1.2.
|
|
145
|
-
"@swc/core-linux-arm-gnueabihf": "1.2.
|
|
146
|
-
"@swc/core-darwin-arm64": "1.2.
|
|
147
|
-
"@swc/core-android-arm64": "1.2.
|
|
148
|
-
"@swc/core-linux-arm64-musl": "1.2.
|
|
149
|
-
"@swc/core-win32-arm64-msvc": "1.2.
|
|
150
|
-
"@swc/core-android-arm-eabi": "1.2.
|
|
138
|
+
"@swc/core-win32-x64-msvc": "1.2.207",
|
|
139
|
+
"@swc/core-darwin-x64": "1.2.207",
|
|
140
|
+
"@swc/core-linux-x64-gnu": "1.2.207",
|
|
141
|
+
"@swc/core-linux-x64-musl": "1.2.207",
|
|
142
|
+
"@swc/core-freebsd-x64": "1.2.207",
|
|
143
|
+
"@swc/core-win32-ia32-msvc": "1.2.207",
|
|
144
|
+
"@swc/core-linux-arm64-gnu": "1.2.207",
|
|
145
|
+
"@swc/core-linux-arm-gnueabihf": "1.2.207",
|
|
146
|
+
"@swc/core-darwin-arm64": "1.2.207",
|
|
147
|
+
"@swc/core-android-arm64": "1.2.207",
|
|
148
|
+
"@swc/core-linux-arm64-musl": "1.2.207",
|
|
149
|
+
"@swc/core-win32-arm64-msvc": "1.2.207",
|
|
150
|
+
"@swc/core-android-arm-eabi": "1.2.207"
|
|
151
151
|
}
|
|
152
152
|
}
|
package/types.d.ts
CHANGED
|
@@ -666,7 +666,7 @@ export interface GlobalPassOption {
|
|
|
666
666
|
*/
|
|
667
667
|
envs?: string[];
|
|
668
668
|
}
|
|
669
|
-
export declare type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig;
|
|
669
|
+
export declare type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig;
|
|
670
670
|
export interface BaseModuleConfig {
|
|
671
671
|
/**
|
|
672
672
|
* By default, when using exports with babel a non-enumerable `__esModule`
|
|
@@ -739,6 +739,9 @@ export interface BaseModuleConfig {
|
|
|
739
739
|
export interface Es6Config extends BaseModuleConfig {
|
|
740
740
|
type: "es6";
|
|
741
741
|
}
|
|
742
|
+
export interface NodeNextConfig extends BaseModuleConfig {
|
|
743
|
+
type: "nodenext";
|
|
744
|
+
}
|
|
742
745
|
export interface CommonJsConfig extends BaseModuleConfig {
|
|
743
746
|
type: "commonjs";
|
|
744
747
|
}
|