Donny/강동윤
8549c47807
feat(dbg-swc): Remove comments from the output of terser
( #6119 )
...
**Description:**
This PR removes comments by parsing and printing using swc APIs because the comments disturb looking at diffs.
2022-10-11 19:43:09 +09:00
SWC Bot
fe9ca12081
chore: Publish crates
2022-10-11 08:27:41 +00:00
Donny/강동윤
6365acc9f5
test(es/minifier): Organize terser tests ( #6116 )
...
**Description:**
Our minifier is better than terser in some cases, so we don't need to match the output of terser exactly.
2022-10-11 08:25:11 +00:00
SWC Bot
86b5641d5e
chore: Publish crates
2022-10-11 05:38:58 +00:00
Alexander Akait
6b3f4bb1c6
feat(css/ast): Add AST types for gradients ( #6111 )
2022-10-11 14:36:05 +09:00
SWC Bot
5966aab27e
chore: Publish crates
2022-10-11 04:33:40 +00:00
Alexander Akait
a920997f4b
feat(css/codegen): Support lowercase case insensitivity ( #6113 )
2022-10-11 04:31:17 +00:00
SWC Bot
3a3aa8d25a
chore: Publish crates
2022-10-11 03:58:58 +00:00
Alexander Akait
1938ed26a1
feat(css/ast): Support ::highlight()
( #6109 )
2022-10-11 03:56:32 +00:00
SWC Bot
a0b0fd3e0d
chore: Publish crates
2022-10-11 02:39:20 +00:00
Donny/강동윤
5fd0e97c15
fix(swc_core): Reexport swc_css_compat
correctly ( #6114 )
2022-10-11 02:36:56 +00:00
SWC Bot
018ca946e7
chore: Publish crates
2022-10-10 13:09:51 +00:00
Donny/강동윤
8d4d32664d
fix(es/preset-env): Update data ( #6106 )
2022-10-10 13:07:25 +00:00
SWC Bot
221818e85c
chore: Publish crates
2022-10-10 09:08:09 +00:00
Donny/강동윤
16dc746cd3
feat(swc_core): Reexport swc_css_compat
( #6102 )
2022-10-10 18:05:43 +09:00
SWC Bot
675da485fc
chore: Publish crates
2022-10-10 05:40:39 +00:00
Donny/강동윤
3c6cdbc61c
feat(es/minifier): Enable reduce_funcs
by default ( #6097 )
2022-10-10 05:38:17 +00:00
SWC Bot
0808c927c6
chore: Publish crates
2022-10-10 05:05:22 +00:00
Anthony Morris
ca67d5244d
doc(es/parser): Change file extension in TypeScript example ( #6094 )
2022-10-10 05:02:02 +00:00
SWC Bot
f5f293e72e
chore: Publish crates
2022-10-10 00:56:50 +00:00
Austaras
657e5b3111
feat(es/minifier): Inline more lazily initialized vars ( #6089 )
2022-10-10 09:53:50 +09:00
SWC Bot
fe51d7aaa2
chore: Publish crates
2022-10-09 00:24:46 +00:00
Donny/강동윤
b0c57458c8
feat(es/minifier): Mark ref to fn as non-call in alias analyzer ( #6088 )
2022-10-09 09:21:54 +09:00
SWC Bot
516320009a
chore: Publish crates
2022-10-08 04:41:25 +00:00
SWC Bot
818a5cc1eb
chore: Publish crates
2022-10-08 04:08:55 +00:00
Donny/강동윤
d0418ebe5b
doc(es/minifier): Document assumptions ( #6085 )
2022-10-08 13:05:57 +09:00
SWC Bot
969c6eeeeb
chore: Publish crates
2022-10-08 03:17:53 +00:00
Donny/강동윤
9ce3df091f
feat(es/minifier): Distinguish calls in alias analyzer ( #6080 )
...
**Description:**
This PR improves the alias analyzer by distinguishing call and reference, thus reducing the number of identifiers.
---
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2022-10-08 03:15:18 +00:00
SWC Bot
da1b2b32a2
chore: Publish crates
2022-10-08 00:53:47 +00:00
Will Binns-Smith
4cde4f9ace
feat(swc_core): Expose swc_ecma_preset_env
( #6083 )
2022-10-08 09:51:18 +09:00
SWC Bot
17a2f6b893
chore: Publish crates
2022-10-07 14:54:27 +00:00
Alexander Akait
b71dd3ec05
feat(css/ast): Support <general-enclosed>
for @media
at-rules ( #6082 )
2022-10-07 14:51:53 +00:00
SWC Bot
3171718e07
chore: Publish crates
2022-10-07 07:48:18 +00:00
IWANABETHATGUY
8003dc8563
feat(es/codegen): Remove the trailing comma of binding patterns ( #6078 )
2022-10-07 16:45:20 +09:00
SWC Bot
477626b9ff
chore: Publish crates
2022-10-07 05:55:53 +00:00
Donny/강동윤
e6b1dd4731
feat(es/testing): Add an option to test sourcemap ( #6079 )
2022-10-07 05:52:22 +00:00
SWC Bot
d0214c33f1
chore: Publish crates
2022-10-07 05:21:25 +00:00
Donny/강동윤
347d4b7602
feat(css/compat): Implement transform for nested css ( #6077 )
2022-10-07 05:18:14 +00:00
SWC Bot
5c486c5234
chore: Publish crates
2022-10-07 04:11:21 +00:00
Alexander Akait
0a61374d02
feat(css/ast): Support @container
at-rule ( #6076 )
2022-10-07 04:07:49 +00:00
SWC Bot
15044a35b4
chore: Publish crates
2022-10-06 17:30:14 +00:00
Austaras
ac150c7ced
feat(es/minifier): Use usage_count
in sequential inliner ( #6071 )
2022-10-06 17:27:34 +00:00
SWC Bot
d750f0e03c
chore: Publish crates
2022-10-06 16:11:15 +00:00
Donny/강동윤
e88c1c04e1
perf(es/minifier): Remove double-visit of DCE ( #6069 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6066 .
2022-10-06 16:08:03 +00:00
SWC Bot
5f49ac012e
chore: Publish crates
2022-10-06 11:38:55 +00:00
IWANABETHATGUY
047da86baa
chore(common): Make Mark::root
const fn ( #6072 )
2022-10-06 11:36:08 +00:00
SWC Bot
9d6217f036
chore: Publish crates
2022-10-06 09:15:00 +00:00
Austaras
c9427f1ec4
fix(es/minifier): Improve infection analysis ( #6044 )
2022-10-06 18:12:09 +09:00
SWC Bot
07611a935c
chore: Publish crates
2022-10-06 04:50:27 +00:00
Donny/강동윤
38df5978c1
fix(es/minifier): Mark delete
as a property mutation ( #6063 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6004 .
2022-10-06 04:47:58 +00:00
SWC Bot
d02ec8beef
chore: Publish crates
2022-10-06 04:19:31 +00:00
SWC Bot
39874529e0
chore: Publish crates
2022-10-06 03:46:53 +00:00
SWC Bot
69f98b17c0
chore: Publish crates
2022-10-06 03:21:46 +00:00
Mohamed Lamine Allal
69da081798
fix(es): Respect exclude option ( #6054 )
2022-10-06 03:18:03 +00:00
SWC Bot
02a0cd37d7
chore: Publish crates
2022-10-06 02:49:43 +00:00
Donny/강동윤
d65fba134d
fix(es/minifier): Fix infection analysis of sequential inliner ( #6053 )
...
**Description:**
This PR fixes the callee issue by fixing the infection analyzer.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6047
2022-10-06 02:46:22 +00:00
SWC Bot
62dd127e3c
chore: Publish crates
2022-10-06 02:13:20 +00:00
Donny/강동윤
36d467e7d7
fix(es/minifier): Fix analysis of var declaration after usage ( #6043 )
...
**Description:**
`var_initialized` should be `true` even if the declaration of variable comes after its usage.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6039 .
2022-10-06 02:09:13 +00:00
SWC Bot
ad58d5daf8
chore: Publish crates
2022-10-06 01:40:03 +00:00
OJ Kwon
fff4b9ce65
build(cargo): Dedup indexmap
with known version ( #6060 )
2022-10-06 01:36:13 +00:00
Donny/강동윤
d8fc0298e2
chore: Publish crates
2022-10-05 21:36:15 +09:00
SWC Bot
f955f34afc
chore: Publish crates
2022-10-05 12:25:56 +00:00
Donny/강동윤
e3b55e4bcf
fix(es/minifier): Fix optimization of numeric keys ( #6052 )
...
**Description:**
We should not optimize if the key starts with `0`.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6051 .
2022-10-05 12:22:28 +00:00
SWC Bot
cad80e39c8
chore: Publish crates
2022-10-05 11:48:18 +00:00
Donny/강동윤
c5fb774487
fix(es/minifier): Don't skip unresolved identifiers ( #6050 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/6049
2022-10-05 11:44:51 +00:00
SWC Bot
d01887e3d1
chore: Publish crates
2022-10-05 09:01:11 +00:00
Donny/강동윤
51e935eb4a
feat(css/modules): Support :global
in @keyframes
( #6046 )
2022-10-05 08:57:43 +00:00
SWC Bot
73362fc8a2
chore: Publish crates
2022-10-05 07:42:12 +00:00
Donny/강동윤
10d0f8e001
feat(css/modules): Support :local
and :global
( #6045 )
...
**Description:**
This PR adds support for `:local` and `:global` directives.
2022-10-05 07:33:40 +00:00
SWC Bot
5618702554
chore: Publish crates
2022-10-05 05:51:59 +00:00
Donny/강동윤
2cce1c82b2
feat(css/modules): Implement css modules ( #6000 )
2022-10-05 05:48:28 +00:00
SWC Bot
37286e369e
chore: Publish crates
2022-10-04 15:22:12 +00:00
Donny/강동윤
7554482205
fix(es/compat): Fix handling of op-assignment in generator
( #6036 )
2022-10-04 15:17:50 +00:00
SWC Bot
5df3eb1f43
chore: Publish crates
2022-10-04 14:37:35 +00:00
Donny/강동윤
0c67a3adba
fix(es/compat): Fix handling of deep array pattern of object rest pass ( #6035 )
2022-10-04 23:34:03 +09:00
SWC Bot
676831477c
chore: Publish crates
2022-10-04 12:46:12 +00:00
Donny/강동윤
80da0981bd
feat(es/compat): Support iterator protocol on loose mode ( #6034 )
2022-10-04 21:42:39 +09:00
SWC Bot
6749e6948e
chore: Publish crates
2022-10-04 07:58:11 +00:00
Donny/강동윤
197c4e269d
fix(es/minifier): Don't evaluate String.fromCharCode
for non-ascii values ( #6033 )
2022-10-04 16:46:59 +09:00
SWC Bot
7746bfb31b
chore: Publish crates
2022-10-03 09:02:17 +00:00
Austaras
c4850997a2
feat(es/minifier): Inline vars initialized before the declaration ( #6027 )
2022-10-03 08:58:38 +00:00
SWC Bot
8e67fcc357
chore: Publish crates
2022-10-03 07:31:41 +00:00
Donny/강동윤
877936f626
feat(es/minifier): Clone trivial literals in sequential inliner ( #6005 )
...
**Description:**
As our minifier is two-pass by default, this is enough.
At the first pass, we inline all numeric literals using sequential inliner, and minifier can then inline constants correctly in the second pass.
2022-10-03 07:20:48 +00:00
SWC Bot
d620ce60ff
chore: Publish crates
2022-10-02 15:36:08 +00:00
IWANABETHATGUY
5ea2d81aa3
perf(common): Split the mutex for the hygiene system ( #6019 )
2022-10-03 00:32:22 +09:00
SWC Bot
b450e3829b
chore: Publish crates
2022-10-02 11:05:09 +00:00
Donny/강동윤
2b627524ac
feat(es/minifier): Ignore return values of ignored IIFEs ( #6020 )
...
**Description:**
As we are not using the return value of the function, we can call `ignore_return_value` on the argument of the return statements of IIFE.
2022-10-02 20:01:56 +09:00
SWC Bot
5000d05af1
chore: Publish crates
2022-10-02 10:32:44 +00:00
SWC Bot
59ce1f4e82
chore: Publish crates
2022-10-02 07:03:11 +00:00
Donny/강동윤
1aae503913
test(es/minifier): Organize terser tests ( #6015 )
2022-10-02 07:00:10 +00:00
SWC Bot
55ea637450
chore: Publish crates
2022-10-01 09:27:16 +00:00
Austaras
61807abf6e
feat(es/minifier): Inline function calls in more cases ( #6010 )
2022-10-01 18:18:45 +09:00
SWC Bot
b6824ff254
chore: Publish crates
2022-10-01 03:36:56 +00:00
Austaras
31ffd5a01d
fix(es/renamer): Use a separate scope for the name of FnExpr
( #6008 )
2022-10-01 12:33:19 +09:00
SWC Bot
628b1a8455
chore: Publish crates
2022-09-30 09:47:09 +00:00
Donny/강동윤
286334c4d0
feat(es/minifier): Drop vars from sequential inliner ( #5993 )
...
**Description:**
This PR renames `CloningMultiReplacer` to `Finalizer` and makes it handle the removal of unused variables. Also, this PR improves the sequential inliner so we can drop variables within a single pass.
2022-09-30 09:43:31 +00:00
SWC Bot
97c2e3bf71
chore: Publish crates
2022-09-30 08:57:12 +00:00
Donny/강동윤
2ee3ad0066
fix(es/minifier): Don't inline into nested scope ( #6002 )
...
**Related issue:**
- https://github.com/vercel/next.js/discussions/30237#discussioncomment-3768734
2022-09-30 08:53:20 +00:00
SWC Bot
77836e58e9
chore: Publish crates
2022-09-30 08:00:38 +00:00
Donny/강동윤
10fb645552
chore(ci): Merge CI scripts ( #5999 )
...
**Description:**
This PR merges CI scripts, and make integration tests use patched crates.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5540 .
2022-09-30 16:57:15 +09:00
SWC Bot
2f626e95eb
chore: Publish crates
2022-09-30 07:16:28 +00:00
Donny/강동윤
8b31b65059
fix(es/codegen): Improve performance of debug build ( #6003 )
2022-09-30 16:12:56 +09:00
OJ Kwon
3204ac3e0c
build(cargo): Use workspace deps for internal pkg ( #6001 )
2022-09-30 15:48:23 +09:00
SWC Bot
b2da9f6c8f
chore: Publish crates
2022-09-30 05:33:21 +00:00
Alexander Akait
35da76241d
feat(html/codegen): Add an option to keep quotes while minifying ( #5996 )
2022-09-30 05:29:58 +00:00
SWC Bot
3f23de8b86
chore: Publish crates
2022-09-30 04:47:02 +00:00
OJ Kwon
af64217f19
build(cargo): Introduce workspace deps ( #5997 )
2022-09-30 13:43:32 +09:00
SWC Bot
ff7da14184
chore: Publish crates
2022-09-30 02:15:49 +00:00
Alexander Akait
a716b40d05
chore(html/minifier): Typo ( #5995 )
2022-09-30 02:11:47 +00:00
SWC Bot
447e2449d9
chore: Publish crates
2022-09-29 11:06:36 +00:00
Donny/강동윤
aeb7f300a8
feat(es/minifier): Invoke sequential inliner for inlined IIFEs ( #5991 )
...
**Description:**
Inlined IIFEs have the exact pattern sequential inliner wants, so it's good to invoke it.
2022-09-29 11:03:06 +00:00
SWC Bot
da7ced9de1
chore: Publish crates
2022-09-29 10:20:18 +00:00
Donny/강동윤
f8358fbe2b
fix(es/minifier): Remove wrong variable joiner pass ( #5992 )
...
**Description:**
We had two passes for joining variables. This PR removes one in the full optimizer, which is wrong.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5989 .
2022-09-29 19:11:18 +09:00
Donny/강동윤
48b83fb69d
chore: Publish crates
2022-09-29 15:50:48 +09:00
Donny/강동윤
af8236d689
fix(es/minifier): Remove print
2022-09-29 15:50:21 +09:00
SWC Bot
f86ff4fa7c
chore: Publish crates
2022-09-29 05:19:48 +00:00
Austaras
1a11cfd46f
feat(es/minifier): Improve fn-local analysis for better inlining ( #5955 )
2022-09-29 14:16:28 +09:00
SWC Bot
783c9dcc23
chore: Publish crates
2022-09-29 03:01:40 +00:00
Alexander Akait
6c08971a53
perf(html/minifier): Improve performance ( #5983 )
2022-09-29 02:58:09 +00:00
SWC Bot
18123fb7b0
chore: Publish crates
2022-09-29 02:19:57 +00:00
Donny/강동윤
c411e5d552
feat(es/minifier): Drop more variables while invoking IIFE ( #5987 )
2022-09-29 02:15:56 +00:00
SWC Bot
c2d8c99411
chore: Publish crates
2022-09-29 01:39:48 +00:00
Alexander Akait
b3a05a057a
feat(css/codegen): Minify idents ( #5972 )
2022-09-29 01:35:33 +00:00
SWC Bot
f2e56d9210
chore: Publish crates
2022-09-29 00:45:22 +00:00
Donny/강동윤
0cfc724018
test(es/minifier): Add tests for benchmark files ( #5986 )
2022-09-29 09:41:13 +09:00
SWC Bot
189f9b482f
chore: Publish crates
2022-09-29 00:08:42 +00:00
Donny/강동윤
0067f719dd
fix(es/minifier): Don't panic on jsx or ts ( #5984 )
2022-09-29 00:05:13 +00:00
SWC Bot
c499e2054d
chore: Publish crates
2022-09-28 22:57:51 +00:00
Alexander Akait
7d7c2d3a9c
perf(css/minifier): Merge all passes ( #5971 )
2022-09-28 22:54:08 +00:00
SWC Bot
57ef438d9b
chore: Publish crates
2022-09-28 14:23:58 +00:00
Donny/강동윤
08f6e81d8e
feat(es/minifier): Ignore more return values ( #5981 )
2022-09-28 14:20:37 +00:00
SWC Bot
1c9870a744
chore: Publish crates
2022-09-28 13:44:08 +00:00
Donny/강동윤
bc2c0f4133
fix(es/codegen): Fix codegen of a negative number ( #5980 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5912 .
2022-09-28 13:40:07 +00:00
SWC Bot
a3d8e4c8bc
chore: Publish crates
2022-09-28 12:40:16 +00:00
Donny/강동윤
8c4873f81e
test(es/minifier): Remove mangle-only snapshots ( #5979 )
...
**Description:**
We don't have to store snapshots of all fixtures.
2022-09-28 21:35:52 +09:00
SWC Bot
883bd1f642
chore: Publish crates
2022-09-28 12:10:32 +00:00
Donny/강동윤
f7128d20f0
chore(ci): Fix benchmark action ( #5978 )
2022-09-28 21:06:43 +09:00
SWC Bot
d75addbdec
chore: Publish crates
2022-09-28 10:37:40 +00:00
Donny/강동윤
19131e168e
perf(es): Don't share Globals
( #5975 )
...
**Description:**
We don't need to share an instance of `Globals`.
2022-09-28 10:34:30 +00:00
SWC Bot
7c2d6a9f67
chore: Publish crates
2022-09-28 09:23:36 +00:00
Donny/강동윤
e37bb55101
perf(es/minifier): Optimize MultiReplacer
( #5977 )
...
**Description:**
This PR splits the `MultiReplacer` into two variants. The first one is the cloning version, and this is parallel. The other one is the non-cloning version, which is not parallel.
2022-09-28 09:19:30 +00:00
SWC Bot
c23c07fc50
chore: Publish crates
2022-09-28 08:16:52 +00:00
Donny/강동윤
0e69890764
feat(es/minifier): Evaluate more literals in comparison ( #5976 )
...
**Description:**
I'll fix the performance issue with a follow-up PR.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/4415 .
2022-09-28 08:07:55 +00:00
SWC Bot
8a4fefd12a
chore: Publish crates
2022-09-28 06:44:08 +00:00
Donny/강동윤
8066d8f60e
chore(es/transforms): Setup parallel benchmark ( #5974 )
2022-09-28 06:40:31 +00:00
SWC Bot
b5be765a87
chore: Publish crates
2022-09-28 05:39:30 +00:00
Austaras
aff4ea5f44
fix(es/minifier): Preserve exports in DCE ( #5973 )
2022-09-28 05:35:51 +00:00
SWC Bot
cc312eca50
chore: Publish crates
2022-09-28 02:58:55 +00:00
Alexander Akait
dfdad69c03
feat(css/minifier): Remove duplicate @counter-style
at-rules ( #5970 )
2022-09-28 02:55:17 +00:00
SWC Bot
c4a7f21a71
chore: Publish crates
2022-09-28 01:58:17 +00:00
SWC Bot
f655488cfa
chore: Publish crates
2022-09-27 13:57:39 +00:00
Finn Böger
1f892cd979
fix(es/compat): Fix unrolling of arrays in generator
( #5965 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5951 .
2022-09-27 13:53:51 +00:00
SWC Bot
a5918422bf
chore: Publish crates
2022-09-27 11:52:21 +00:00
Donny/강동윤
e410102633
fix(es/compat): Fix the order of initialization for decorators on computed keys ( #5964 )
2022-09-27 11:48:42 +00:00
SWC Bot
3eecf954b3
chore: Publish crates
2022-09-27 08:41:58 +00:00
Donny/강동윤
0fb2c1d5a5
fix(es/minifier): Fix analysis of nested function-like properties ( #5963 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5950 .
2022-09-27 08:38:14 +00:00
SWC Bot
cf474a3eac
chore: Publish crates
2022-09-27 07:54:26 +00:00
Donny/강동윤
dcd516d2bd
feat(es/minifier): Ignore more expressions in sequential inliner ( #5961 )
...
**Description:**
We can skip **member access** to `console` as it does not have any side effects.
2022-09-27 07:45:44 +00:00
SWC Bot
301f99023c
chore: Publish crates
2022-09-27 06:22:51 +00:00
Donny/강동윤
48cddc16f6
test(es/minifier): Categorize terser tests ( #5960 )
...
**Description:**
I'm going to focus on rules enabled by default. I updated some tests because our one was better, and postponed `unsafe` tests.
2022-09-27 15:18:57 +09:00
SWC Bot
1682095813
chore: Publish crates
2022-09-27 05:54:04 +00:00
Austaras
573418fc96
fix(es/resolver): Use a separate mark for the name of FnExpr
( #5959 )
2022-09-27 14:50:35 +09:00
SWC Bot
3d393dd709
chore: Publish crates
2022-09-27 03:22:48 +00:00
Donny/강동윤
33a15c8d82
fix(es/minifier): Fix analysis of parameters ( #5954 )
...
**Description:**
Although the author of the issue talked about `@react-pdf/renderer`, it's a bug related to `brotli`, not react pdf renderer.
After investigation, I found that the bug is caused by not marking parameters as initialized. So I fixed the analyzer.
**Related issue:**
- https://github.com/vercel/next.js/issues/40803 .
2022-09-27 12:19:36 +09:00
SWC Bot
132a9380df
chore: Publish crates
2022-09-26 15:12:03 +00:00
Donny/강동윤
9d1974248d
fix(es/minifier): Fix skipping logic of sequential inliner ( #5956 )
...
**Description:**
This PR implements `is_skippable_for_seq` fully.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5935 .
2022-09-26 15:05:52 +00:00
Donny/강동윤
d0e2e3c43b
fix(es/testing): Remove cycle
2022-09-26 18:25:05 +09:00
SWC Bot
e001226674
chore: Publish crates
2022-09-26 09:21:39 +00:00
Donny/강동윤
2ba88154fc
fix(es/codegen): Align sourcemap with terser ( #5657 )
2022-09-26 18:12:42 +09:00
SWC Bot
b5027f00a0
chore: Publish crates
2022-09-25 02:23:02 +00:00
Donny/강동윤
b219fa2f01
feat(dbg-swc): Add a size debugger for next.js ( #5945 )
2022-09-25 11:18:53 +09:00
SWC Bot
e1f421b6af
chore: Publish crates
2022-09-25 01:36:48 +00:00
John Daly
cdd69d0145
fix(es/parser): Allow as
in destructuring assignment ( #5948 )
2022-09-25 10:29:33 +09:00
SWC Bot
e5ba9636ac
chore: Publish crates
2022-09-24 03:36:47 +00:00
Donny/강동윤
3c3529cb84
build(rustc): Update rustc ( #5943 )
...
**Description:**
This PR updates rustc, and fix some performance bugs of `swc_common`.
2022-09-24 03:33:47 +00:00
SWC Bot
8a5ed1e0ba
chore: Publish crates
2022-09-23 07:50:26 +00:00
Donny/강동윤
5cddb4c734
feat(es/typescript): Support TS 4.9 ( #5938 )
...
**Description:**
This PR adds satisfaction expression to the AST and parser.
2022-09-23 16:41:56 +09:00
SWC Bot
ae14211f04
chore: Publish crates
2022-09-23 05:25:48 +00:00
Donny/강동윤
97647861bf
fix(es/minifier): Track aliasing via assignments ( #5940 )
2022-09-23 14:22:41 +09:00
SWC Bot
ae6c344fe5
chore: Publish crates
2022-09-23 04:19:14 +00:00
Donny/강동윤
93964a82ea
test(es/minifier): Remove analysis snapshot ( #5939 )
...
**Description:**
This PR removes analysis snapshots as it disturbs code review process
2022-09-23 13:14:42 +09:00
SWC Bot
15d21651c9
chore: Publish crates
2022-09-22 14:28:07 +00:00
Donny/강동윤
7bcaaef4f7
feat(es/minifier): Mangle labels ( #5934 )
...
**Description:**
This PR adds code to mangle labels.
2022-09-22 23:24:05 +09:00
SWC Bot
8dbef496cf
chore: Publish crates
2022-09-22 13:58:09 +00:00
Donny/강동윤
e16827cc9d
feat(es/minifier): Drop cycles in nested functions ( #5933 )
2022-09-22 13:54:49 +00:00
SWC Bot
098a021a43
chore: Publish crates
2022-09-22 13:18:22 +00:00
Donny/강동윤
5314ac5d02
feat(es/minifier): Use char frequency data for property manglers ( #5932 )
2022-09-22 22:14:26 +09:00
SWC Bot
0879a0504a
chore: Publish crates
2022-09-22 10:25:54 +00:00
Donny/강동윤
e9c704182b
feat(es/minifier): Improve analysis of reassignments ( #5931 )
2022-09-22 10:22:18 +00:00
SWC Bot
60bcdf768a
chore: Publish crates
2022-09-22 09:22:14 +00:00
Donny/강동윤
f2224132c1
fix(es/minifier): Prepend vars when dropping vars in a for loop initializer ( #5930 )
...
**Description:**
The minifier appends initializer of for statements instead of prepending it.
**Related issue:**
- https://github.com/vercel/next.js/discussions/30237#discussioncomment-3704795
2022-09-22 09:18:41 +00:00
SWC Bot
a2b3063784
chore: Publish crates
2022-09-22 06:57:15 +00:00
Jason
64694dc7d5
fix(css/parser): Report an error for invalid layer
in @import
( #5928 )
2022-09-22 06:53:34 +00:00
SWC Bot
5e82dd63af
chore: Publish crates
2022-09-22 06:19:31 +00:00
Donny/강동윤
ac7b066d9a
feat(es/minifier): Inline rest parameters of IIFE ( #5929 )
2022-09-22 06:16:29 +00:00
SWC Bot
f5d42aa2b6
chore: Publish crates
2022-09-22 03:56:27 +00:00
Donny/강동윤
565bf317f6
feat(es/minifier): Evaluate more expressions ( #5926 )
2022-09-22 03:53:14 +00:00
SWC Bot
4c3813dbcc
chore: Publish crates
2022-09-22 03:16:22 +00:00
Jason
1dc5307069
feat(css/minifier): Minify the name of @keyframes
( #5894 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5889 .
Co-authored-by: 一丝 <percyley@qq.com>
2022-09-22 03:12:50 +00:00
SWC Bot
043c95307e
chore: Publish crates
2022-09-21 15:12:52 +00:00
Donny/강동윤
19ce2737b1
feat(es/minifier): Collapse let
without init ( #5909 )
...
**Description:**
This patch applies the variable collapsing logic for the variables declared with `var` to the variables declared with `let`. This requires some patch about the behavior of visitors about `BlockStmt`, so this patch includes relevant changes.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5696 .
2022-09-21 15:04:29 +00:00
SWC Bot
1cf0e2369b
chore: Publish crates
2022-09-21 12:22:25 +00:00
Donny/강동윤
31711e76af
test(es/minifier): Add an execution test for a fixed issue ( #5925 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5914 .
2022-09-21 12:19:14 +00:00
SWC Bot
a9270a8475
chore: Publish crates
2022-09-21 11:36:41 +00:00
Donny/강동윤
e303f7e853
fix(es/minifier): Fix analysis of assignments ( #5924 )
...
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5910
2022-09-21 11:33:25 +00:00
SWC Bot
60417bdf77
chore: Publish crates
2022-09-21 10:58:05 +00:00
Donny/강동윤
0b34bcb40e
test(es/minifier): Add a test for a wrong issue ( #5923 )
2022-09-21 19:52:52 +09:00
SWC Bot
6e560644e5
chore: Publish crates
2022-09-21 08:24:14 +00:00
Jason
10cdbed05e
fix(css/parser): Fix infinite loop about @import
and layer
( #5919 )
2022-09-21 08:21:04 +00:00
SWC Bot
ce6b0886d1
chore: Publish crates
2022-09-21 07:40:12 +00:00
Shu Ding
72429d8801
feat(swc_core): Expose tty feature of swc_common
as common_tty
( #5920 )
...
**Description:**
This PR adds a `common_tty` feature to swc_core which enables `tty-emitter` for `swc_common` to make the colored terminal output available.
2022-09-21 16:37:08 +09:00
SWC Bot
8a9cc7dd2a
chore: Publish crates
2022-09-21 07:33:40 +00:00
Donny/강동윤
fe40d8312b
test(es): Accept arguments ( #5916 )
...
**Description:**
This PR adds a way to provide arguments to `exec_node_js`.
2022-09-21 16:23:10 +09:00
Donny/강동윤
6d1e5c77f1
chore: Publish crates
2022-09-21 09:59:44 +09:00
SWC Bot
be81c4737e
chore: Publish crates
2022-09-20 08:32:27 +00:00
Donny/강동윤
a9873e505d
perf(es/minifier): Optimize analyzer ( #5908 )
2022-09-20 08:21:39 +00:00
SWC Bot
1898d6686a
chore: Publish crates
2022-09-20 06:44:48 +00:00
Donny/강동윤
1df72430a5
perf(es/minifier): Invoke DCE only before the first compression ( #5907 )
...
**Description:**
Invoke DCE only before the first compression. I verified that this patch does not affect the compression rate of the real-world inputs greatly.
2022-09-20 15:41:26 +09:00
SWC Bot
cb2044234a
chore: Publish crates
2022-09-20 04:32:30 +00:00
Donny/강동윤
6bbd3f4c14
perf(es/minifier): Make more passes parallel ( #5906 )
...
**Description:**
We only unwrap parenthesis in precompress optimizer, so I refactored it. Also, as it's embarrassingly parallel, I parallelized it.
2022-09-20 04:29:08 +00:00
SWC Bot
5c2b1bb15d
chore: Publish crates
2022-09-20 03:51:28 +00:00
Donny/강동윤
1a182ef8d9
perf(es): Optimize memory layout of AST ( #5829 )
2022-09-20 12:47:21 +09:00
SWC Bot
26b9f1fc23
chore: Publish crates
2022-09-20 01:50:11 +00:00
Alexander Akait
2bf24195f2
feat(css/parser): Parse more math functions in @media
( #5904 )
2022-09-20 10:45:49 +09:00
SWC Bot
8c112c371b
chore: Publish crates
2022-09-19 15:11:28 +00:00
Donny/강동윤
aacf7aaf80
feat(es/minifier): Drop function identifier in a single pass ( #5901 )
...
**Description:**
We only inline function declarations if `ref_count` is 1, so we don't need to preserve the name of the function.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5682 .
2022-09-19 15:07:56 +00:00
SWC Bot
345e955265
chore: Publish crates
2022-09-19 13:37:22 +00:00
SWC Bot
a18625c0d0
chore: Publish crates
2022-09-19 12:25:00 +00:00
Austaras
83c7887600
fix(es/minifier): Remove more pure calls ( #5900 )
2022-09-19 12:21:15 +00:00
SWC Bot
65296b4a68
chore: Publish crates
2022-09-19 08:28:54 +00:00
Donny/강동윤
0bbcfe15ee
test(es/minifier): Add a test for a fixed issue ( #5897 )
2022-09-19 17:25:49 +09:00
SWC Bot
b93d740396
chore: Publish crates
2022-09-19 07:49:46 +00:00
Donny/강동윤
4e656af1ec
feat(es/minifier): Drop variable from the sequential inliner ( #5896 )
...
**Description:**
We now drop variable declarations if we are going to eliminate the only usage.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5693 .
2022-09-19 07:40:04 +00:00
SWC Bot
7db72e8232
chore: Publish crates
2022-09-18 10:02:24 +00:00
Donny/강동윤
20d071bdc7
test(es/plugin): Add a noop plugin ( #5892 )
...
**Description:**
The plugin is used for benchmark and verification of rkyv.
2022-09-18 09:54:06 +00:00
SWC Bot
473f5c4111
chore: Publish crates
2022-09-17 00:13:31 +00:00
Alexander Akait
5645e810df
perf(html/parser): Improve performance ( #5884 )
2022-09-17 00:10:08 +00:00
SWC Bot
6b684ca162
chore: Publish crates
2022-09-16 23:17:15 +00:00
OJ Kwon
2d4d04d06b
feat(es/plugin): Enable plugin for bytecheck flags ( #5885 )
...
**Description:**
Fixes oversight to enabling plugin when plugin-bytecheck is enabled.
2022-09-16 23:07:11 +00:00
IWANABETHATGUY
7d6d04b421
fix(es/codegen): Drop the last comma in an array literal ( #5877 )
...
**Description:**
Drop the last comma in an array literal.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/5692 .
2022-09-16 15:48:28 +09:00
Donny/강동윤
f0ca487848
chore: Publish crates
2022-09-16 15:46:25 +09:00
SWC Bot
c953ff414c
chore: Publish crates
2022-09-16 03:28:09 +00:00
Alexander Akait
57e9f9c88e
fix(html/parser): Reflect the fix for a bug in spec ( #5779 )
2022-09-16 03:24:49 +00:00
SWC Bot
99094def0e
chore: Publish crates
2022-09-16 02:47:08 +00:00
OJ Kwon
1ba151fe95
feat(swc_core): Enable bytecheck
for plugin ( #5878 )
2022-09-16 11:43:59 +09:00
SWC Bot
ca6325ca7d
chore: Publish crates
2022-09-16 01:07:09 +00:00
Will Binns-Smith
73c48a8e6e
feat(preset-env/base): Implement more traits for BrowserData
and Version
( #5879 )
...
**Description:**
This derives additional common traits for these public structs.
2022-09-16 01:04:13 +00:00
SWC Bot
52c17f3056
chore: Publish crates
2022-09-15 14:49:03 +00:00
Donny/강동윤
c3fa96b21b
fix(es/minifier): Fix unicode handling ( #5875 )
2022-09-15 14:45:33 +00:00
SWC Bot
5cf78b0213
chore: Publish crates
2022-09-15 13:20:59 +00:00