@swc/core 1.2.198 → 1.2.205

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 +228 -0
  2. package/README.md +10 -0
  3. package/package.json +15 -15
package/CHANGELOG.md CHANGED
@@ -5,6 +5,234 @@
5
5
 
6
6
 
7
7
 
8
+ - **(css/parser)** Improve lexer errors (#5025) ([c345524](https://github.com/swc-project/swc/commit/c345524e368078a59cdf5376999a5b443f2918e7))
9
+
10
+
11
+ - **(es/lints)** Allow duplicate function in non-top level (#5011) ([4a422a0](https://github.com/swc-project/swc/commit/4a422a09a4a933b7db085d936d16dbf53e518956))
12
+
13
+
14
+ - **(es/parser)** Don't panic on an invalid import meta property (#4994) ([53a8cb1](https://github.com/swc-project/swc/commit/53a8cb12094b15aed1667f844abfefea1420d3d2))
15
+
16
+
17
+ - **(es/parser)** Allow instantiation expression followed by a line break or a binary operator (#5000) ([a62b2b3](https://github.com/swc-project/swc/commit/a62b2b32446613fca0a6193c93c19f1e0b86c3b0))
18
+
19
+
20
+ - **(es/transforms)** Add custom `Sync` + `Send` for the renamer (#5018) ([fd73895](https://github.com/swc-project/swc/commit/fd73895a7be31b24a2795e38c1e7729086656023))
21
+
22
+
23
+ - **(es/typescript)** Preserve `export = ` for AMD (#4995) ([d736b31](https://github.com/swc-project/swc/commit/d736b31e08771c3ca243e6875a11bef1a2937c85))
24
+
25
+
26
+ - **(html/minifier)** Avoid optional attributes (#5016) ([f1fd83d](https://github.com/swc-project/swc/commit/f1fd83dcc70aff7d27d0bd0d4f0954dc5dc8cbbd))
27
+
28
+
29
+ - **(html/minifier)** Compress more complex attributes (#5024) ([c61babd](https://github.com/swc-project/swc/commit/c61babd9af822491d2af4295638df0483748d2e0))
30
+
31
+ ### Documentation
32
+
33
+
34
+
35
+ - **(readme)** Add a link for discord badge in `README.md` (#5005) ([1f64055](https://github.com/swc-project/swc/commit/1f64055438f1867683fc0fb3b3bef88ca077ff0c))
36
+
37
+ ### Features
38
+
39
+
40
+
41
+ - **(html/minifier)** Compress more svg/mathml attributes (#5001) ([1538649](https://github.com/swc-project/swc/commit/15386492372bd8bf322bd60a71ebdff54a15ebf8))
42
+
43
+
44
+ - **(html/minifier)** Add an API to minify document fragments (#5002) ([7745fbf](https://github.com/swc-project/swc/commit/7745fbf604d6c3c8daeb61eced8c01b464e385db))
45
+
46
+
47
+ - **(html/minifier)** Minify js (#4999) ([28bc735](https://github.com/swc-project/swc/commit/28bc735d03987dd965fdefe7284b30bee3346a3a))
48
+
49
+
50
+ - **(html/minifier)** Add `remove_redundant_attributes` (#5023) ([03d8a3a](https://github.com/swc-project/swc/commit/03d8a3a0ddb843ded43134265973557dd48e14a7))
51
+
52
+
53
+ - **(html/minifier)** Compress `style` and `media` attributes (#5022) ([47d34a3](https://github.com/swc-project/swc/commit/47d34a33d43a6e28a4318ea826513edf380dc13a))
54
+
55
+ ### Performance
56
+
57
+
58
+
59
+ - **(html/parser)** Improve performance (#5028) ([a057183](https://github.com/swc-project/swc/commit/a057183230303cc874a6f7c236cf0ea11fe24f2f))
60
+
61
+ ### Refactor
62
+
63
+
64
+
65
+ - **(webpack-ast)** Remove (#5026) ([17c51fa](https://github.com/swc-project/swc/commit/17c51fa53ca605aea6c3286e1994ab5dbc5f1b74))
66
+
67
+ ### Testing
68
+
69
+
70
+
71
+ - **(es/helpers)** Unify code path for testing external helpers (#5010) ([125549b](https://github.com/swc-project/swc/commit/125549b7a96d5a91101e1a96a0bb39214e252800))
72
+
73
+
74
+ - **(es/minifier)** Add a test case for the minifier (#5013) ([eedcb11](https://github.com/swc-project/swc/commit/eedcb114a2df09d88995c1b58ea1d1980831a02d))
75
+
76
+
77
+ - **(es/parser)** Add a test case for instantiation expr (#5014) ([6bcb925](https://github.com/swc-project/swc/commit/6bcb92598b5c71fee407b4f4be7da85d36a0735d))
78
+
79
+ ## [1.2.204] - 2022-06-18
80
+
81
+ ### Bug Fixes
82
+
83
+
84
+
85
+ - **(es/helpers)** Fix `module` field in `package.json` of `@swc/helpers` (#4978) ([5123c20](https://github.com/swc-project/swc/commit/5123c20b5d765db0fa645a1d4ba2820d5eeddc9c))
86
+
87
+
88
+ - **(es/helpers)** Use `.mjs` extension in helper imports (#4979) ([9484cf8](https://github.com/swc-project/swc/commit/9484cf81a1cef43059bea98c20a6fa8cef6802d1))
89
+
90
+
91
+ - **(es/parser)** Fix binary operator parsed as an instantiation expression (#4992) ([36ef3e4](https://github.com/swc-project/swc/commit/36ef3e4507d949187b83c1bf7ecd6b31eef50a73))
92
+
93
+
94
+ - **(es/resolver)** Make catch parameter not disturb resolving (#4976) ([b3f6f20](https://github.com/swc-project/swc/commit/b3f6f20721b90b03a67c1db5d9680147ffe13923))
95
+
96
+
97
+ - **(html/codegen)** Handle optional tags (#4986) ([41dc0a7](https://github.com/swc-project/swc/commit/41dc0a7aa9c7c48dd9a47b3ac61422419c3e879e))
98
+
99
+
100
+ - **(html/minifier)** Fix removal of comments (#4974) ([8e63b0b](https://github.com/swc-project/swc/commit/8e63b0bbd528b48122a3cef1164a512fbd4952e8))
101
+
102
+ ### Documentation
103
+
104
+
105
+
106
+ - **(*)** Add more badges (#4982) ([cb30ba2](https://github.com/swc-project/swc/commit/cb30ba2ad4df7cd04af49f3e7ff41e2be9649dac))
107
+
108
+ ### Features
109
+
110
+
111
+
112
+ - **(es/config)** Add `isModule` to `.swcrc` (#4993) ([e85c0db](https://github.com/swc-project/swc/commit/e85c0db92689d0eaf656ac869b6cb16ebec43b6f))
113
+
114
+
115
+ - **(html/codegen)** Add option for tag omission of self closing void elements (#4971) ([d07ab2c](https://github.com/swc-project/swc/commit/d07ab2cb91a68ef88bd9adbdcc18217818a0c31d))
116
+
117
+
118
+ - **(html/minifier)** Compress CSS (#4973) ([3e6c0f5](https://github.com/swc-project/swc/commit/3e6c0f567a50e1b0a8ba097b3f13b866efd6ebfa))
119
+
120
+
121
+ - **(html/minifier)** Add `preserve_comments` option (#4959) ([2e52c18](https://github.com/swc-project/swc/commit/2e52c18a6b4ea4d58c219253c159af86a189ce26))
122
+
123
+
124
+ - **(html/minifier)** Add an option to set html5 doctype (#4980) ([fb74ace](https://github.com/swc-project/swc/commit/fb74ace19b2aa06f38ef0803bea500a8a5d8f165))
125
+
126
+
127
+ - **(html/minifier)** Minify conditional comments (#4975) ([713a256](https://github.com/swc-project/swc/commit/713a256ed7fe9c3301d751575f298f1462434fc0))
128
+
129
+ ### Performance
130
+
131
+
132
+
133
+ - **(es/hygiene)** Make `hygiene` faster (#4952) ([36d960c](https://github.com/swc-project/swc/commit/36d960c7e908f6924ce9b0fd23ce4cd972dbbba0))
134
+
135
+ ### Refactor
136
+
137
+
138
+
139
+ - **(es/minifier)** Use `Program` instead of `Module` (#4969) ([99a474c](https://github.com/swc-project/swc/commit/99a474cb2d18f2741277a64b8524300d3977cc66))
140
+
141
+ ### Testing
142
+
143
+
144
+
145
+ - **(html)** Remove files which are too large too verify (#4983) ([364a34c](https://github.com/swc-project/swc/commit/364a34cd7093a3bc7ca6e7e5cf2cba0844eba9c8))
146
+
147
+ ## [1.2.203] - 2022-06-14
148
+
149
+ ### Bug Fixes
150
+
151
+
152
+
153
+ - **(ci)** Revert malloc changes ([709ad3e](https://github.com/swc-project/swc/commit/709ad3e087e833c5bc69c887ca963e4b7a9a81f7))
154
+
155
+
156
+ - **(common)** Don't use `get_unchecked` after setting the length to 0 (#4943) ([f479951](https://github.com/swc-project/swc/commit/f479951ef2f1c9eff8e020c9fc46e78e16855a24))
157
+
158
+
159
+ - **(css/parser)** Fix input buffer and improve error recovery (#4948) ([bf74d05](https://github.com/swc-project/swc/commit/bf74d05f3fb6ddb2f29a4808b64860021cbd4f5b))
160
+
161
+
162
+ - **(es/helpers)** Allow using external helpers with `type: module` (#4962) ([4a27e6f](https://github.com/swc-project/swc/commit/4a27e6f84a9a4e99d161664fa1441b1278756023))
163
+
164
+
165
+ - **(es/parser)** Don't assume the length of char (#4967) ([3e03ebf](https://github.com/swc-project/swc/commit/3e03ebf8bb527d3237b309c3df3a24bc9ebf7314))
166
+
167
+ ### Features
168
+
169
+
170
+
171
+ - **(es/lints)** Add `constructor-super` rule (#4912) ([6daeeb0](https://github.com/swc-project/swc/commit/6daeeb0652513af7435c2197d74734c89965d66e))
172
+
173
+
174
+ - **(es/minifier)** Turn `Array`/`Object` calls into literals (#4947) ([47bdc6a](https://github.com/swc-project/swc/commit/47bdc6a6b13c5a4d6b85d4e3a0e729126c7b5f9d))
175
+
176
+
177
+ - **(html)** Support self-closing flag (#4950) ([5c2a918](https://github.com/swc-project/swc/commit/5c2a918946105d26d107b8bd869ee5dc76c9c04d))
178
+
179
+
180
+ - **(html/minifier)** Compress whitespaces (#4916) ([f2690cc](https://github.com/swc-project/swc/commit/f2690cce08bf2e922b7eb9146288ca78ad0eeed4))
181
+
182
+
183
+ - **(html/minifier)** Add `remove_empty_attributes` option (#4958) ([63d630d](https://github.com/swc-project/swc/commit/63d630d47761f1ab9c60a40c5bedf8542366f975))
184
+
185
+
186
+ - **(html/minifier)** Add `collapse_boolean_attributes` option (#4960) ([3957bc6](https://github.com/swc-project/swc/commit/3957bc64b7d278cdf737e9da514fa94780044be2))
187
+
188
+ ### Miscellaneous Tasks
189
+
190
+
191
+
192
+ - **(ci)** Test `concurrent` (#4955) ([1a9f935](https://github.com/swc-project/swc/commit/1a9f93546bf1c9192baa562a419648cfe5d199fc))
193
+
194
+
195
+ - **(ci)** Use macos for release builds (#4968) ([1bf2b80](https://github.com/swc-project/swc/commit/1bf2b80f97c736cc7aae1a9c04325044839d0a3b))
196
+
197
+
198
+ - **(ci)** Fix publish build on Windows (#4970) ([db9f7a5](https://github.com/swc-project/swc/commit/db9f7a5ad4d830b1b1e42e7aa09a2edc935a8ad1))
199
+
200
+ ### Performance
201
+
202
+
203
+
204
+ - **(common)** Add `Atom` type (#4945) ([4ada9c7](https://github.com/swc-project/swc/commit/4ada9c7e05d1d61e061bf6af5830d10580d671eb))
205
+
206
+
207
+ - **(css/parser)** Improve performance of lexer (#4921) ([327969d](https://github.com/swc-project/swc/commit/327969d0d96159ed45a45a92e943d9d426de303c))
208
+
209
+
210
+ - **(es/minifier)** Make more things parallel and reduce call stacks (#4915) ([3580638](https://github.com/swc-project/swc/commit/35806385eab405a3a03d88172c94dfefb2599240))
211
+
212
+
213
+ - **(es/transforms)** Make rename operator parallel (#4951) ([445d585](https://github.com/swc-project/swc/commit/445d58518dc1ea5ab670f4e3d9e8b833108e1cf7))
214
+
215
+ ### Refactor
216
+
217
+
218
+
219
+ - **(es/resolver)** Prepare parallel `resolver` (#4957) ([ea92a6a](https://github.com/swc-project/swc/commit/ea92a6ab8a17a03d6f8d301fe3373d8282d09218))
220
+
221
+
222
+ - **(html/parser)** Remove unused code (#4949) ([42a1d7c](https://github.com/swc-project/swc/commit/42a1d7c7a11120b8be8dbd7a29a6401d60062d70))
223
+
224
+ ### Testing
225
+
226
+
227
+
228
+ - **(css/parser)** Improve tests (#4963) ([1b7b4f0](https://github.com/swc-project/swc/commit/1b7b4f0cb4b331d5ad861e3721c2fcd14322b2e4))
229
+
230
+ ## [1.2.199] - 2022-06-11
231
+
232
+ ### Bug Fixes
233
+
234
+
235
+
8
236
  - **(ci)** Fix android build issue caused by NDK 21 -> 23 (#4942) ([52e2347](https://github.com/swc-project/swc/commit/52e23470e71e769e980f1e0d291ebf4a984bbfb8))
9
237
 
10
238
 
package/README.md CHANGED
@@ -15,11 +15,21 @@
15
15
  <a href="https://crates.io/crates/swc_ecma_parser">
16
16
  <img alt="undefined" src="https://img.shields.io/crates/d/swc_ecma_parser.svg?label=crates.io%20downloads">
17
17
  </a>
18
+ <img alt="GitHub release (latest SemVer)" src="https://img.shields.io/github/v/release/swc-project/swc">
18
19
  </p>
20
+
19
21
  <p align="center">
22
+ <img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/swc-project/swc">
20
23
  <a href="https://github.com/swc-project/swc/actions/workflows/cargo.yml">
21
24
  <img alt="CI Status" src="https://github.com/swc-project/swc/actions/workflows/cargo.yml/badge.svg?event=push">
22
25
  </a>
26
+ <img alt="node-current (scoped)" src="https://img.shields.io/node/v/@swc/core">
27
+ </p>
28
+
29
+ <p align="center">
30
+ <a href="https://discord.com/invite/GnHbXTdZz6">
31
+ <img alt="Discord" src="https://img.shields.io/discord/889779439272075314">
32
+ </a>
23
33
  </p>
24
34
 
25
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.198",
3
+ "version": "1.2.205",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -95,7 +95,7 @@
95
95
  "@babel/preset-typescript": "^7.13.0",
96
96
  "@babel/types": "^7.14.0",
97
97
  "@napi-rs/cli": "^2.10.0",
98
- "@swc/helpers": "^0.3.8",
98
+ "@swc/helpers": "^0.4.2",
99
99
  "@taplo/cli": "^0.3.2",
100
100
  "@types/jest": "^26.0.23",
101
101
  "@types/node": "^14.14.41",
@@ -135,18 +135,18 @@
135
135
  "url": "https://opencollective.com/swc"
136
136
  },
137
137
  "optionalDependencies": {
138
- "@swc/core-win32-x64-msvc": "1.2.199",
139
- "@swc/core-darwin-x64": "1.2.199",
140
- "@swc/core-linux-x64-gnu": "1.2.199",
141
- "@swc/core-linux-x64-musl": "1.2.199",
142
- "@swc/core-freebsd-x64": "1.2.199",
143
- "@swc/core-win32-ia32-msvc": "1.2.199",
144
- "@swc/core-linux-arm64-gnu": "1.2.199",
145
- "@swc/core-linux-arm-gnueabihf": "1.2.199",
146
- "@swc/core-darwin-arm64": "1.2.199",
147
- "@swc/core-android-arm64": "1.2.199",
148
- "@swc/core-linux-arm64-musl": "1.2.199",
149
- "@swc/core-win32-arm64-msvc": "1.2.199",
150
- "@swc/core-android-arm-eabi": "1.2.199"
138
+ "@swc/core-win32-x64-msvc": "1.2.205",
139
+ "@swc/core-darwin-x64": "1.2.205",
140
+ "@swc/core-linux-x64-gnu": "1.2.205",
141
+ "@swc/core-linux-x64-musl": "1.2.205",
142
+ "@swc/core-freebsd-x64": "1.2.205",
143
+ "@swc/core-win32-ia32-msvc": "1.2.205",
144
+ "@swc/core-linux-arm64-gnu": "1.2.205",
145
+ "@swc/core-linux-arm-gnueabihf": "1.2.205",
146
+ "@swc/core-darwin-arm64": "1.2.205",
147
+ "@swc/core-android-arm64": "1.2.205",
148
+ "@swc/core-linux-arm64-musl": "1.2.205",
149
+ "@swc/core-win32-arm64-msvc": "1.2.205",
150
+ "@swc/core-android-arm-eabi": "1.2.205"
151
151
  }
152
152
  }