SWC Bot
8aee432c69
chore: Publish crates
2023-11-07 09:36:20 +00:00
Niklas Mischkulnig
f9f305cc5f
build(preset-env/base): Upgrade browserslist-rs
to v0.13.0
( #8229 )
...
**Description:**
Upgrade browserslist-rs, there was a major version change because wasm-pack functionality was split out into a feature:
https://github.com/browserslist/browserslist-rs/compare/v0.12.4...v0.13.0
---------
Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
2023-11-07 09:33:16 +00:00
SWC Bot
a072819859
chore: Publish crates
2023-11-07 08:55:03 +00:00
David Sherret
37657b8bd5
perf(es/lexer): Remove needless clones of Rc<RefCell<AtomStore>>
( #8231 )
...
Removes some clones of `self.atom`.
`> cargo "bench" "--package" "swc_ecma_parser" "--bench" "parser" "--" "three"`
Main: ~38.2ms
This PR: ~37.8ms
2023-11-07 08:52:14 +00:00
SWC Bot
09b3003e58
chore: Publish crates
2023-11-07 00:54:18 +00:00
Donny/강동윤
aa22746d03
perf(atoms): Replace string-cache
with hstr
( #8126 )
...
**Description:**
`hstr` is an alternative for `string-cache` which does not support static strings and does not use a global mutex.
**Related issue:**
- Closes #4946 .
- Closes #7974 .
2023-11-07 00:51:43 +00:00
SWC Bot
86e83335eb
chore: Publish crates
2023-11-06 10:47:53 +00:00
Donny/강동윤
d4ae44ac45
perf(es/parser): Use smarter lookup table for lexer ( #8226 )
...
**Description:**
`phf` is slower than expected.
2023-11-06 19:45:46 +09:00
SWC Bot
f00238d543
chore: Publish crates
2023-11-06 10:00:55 +00:00
Austaras
495268f126
chore(bindings/node): Upgrade jemalloc ( #8227 )
...
**Description:**
To get rid of rustc warning.
2023-11-06 09:57:49 +00:00
SWC Bot
b070ffe425
chore: Publish crates
2023-11-06 05:31:11 +00:00
Donny/강동윤
e3e439dba6
perf(es/parser): Improve performance ( #8224 )
...
**Description:**
Small things
2023-11-06 05:28:30 +00:00
SWC Bot
1f3726dc64
chore: Publish crates
2023-11-06 04:49:46 +00:00
Donny/강동윤
b745ed7ac8
perf(es/minifier): Remove needless operations for char freq analysis ( #8222 )
...
**Description:**
This skips a string search operation, which is quite costly, without affecting the output.
2023-11-06 13:46:43 +09:00
SWC Bot
48e5c9ad54
chore: Publish crates
2023-11-06 04:18:48 +00:00
Donny/강동윤
3833cf4e55
perf(es/parser): Remove needless strcmp
ops ( #8223 )
...
**Description:**
## The current `main`
```
es/parser/angular time: [7.9848 ms 8.0003 ms 8.0243 ms]
```
## This PR
```
es/parser/angular time: [7.3380 ms 7.3498 ms 7.3663 ms]
```
2023-11-06 13:16:35 +09:00
SWC Bot
968345b7f6
chore: Publish crates
2023-11-06 00:54:22 +00:00
Donny/강동윤
02cd7c2608
fix(css/modules): Fix handling of :global()
selector ( #8219 )
...
**Related issue:**
- Closes #8179
2023-11-06 00:51:09 +00:00
SWC Bot
edb46c3c71
chore: Publish crates
2023-11-04 21:49:01 +00:00
Donny/강동윤
14ea705f27
build(cargo): Update rustc to nightly-2023-11-04
( #8221 )
...
**Breaking Changes**:
- `Mark::default()` is now identical as `Mark::new()`.
**Description:**
I want to see if inlining is improved
2023-11-04 21:47:10 +00:00
SWC Bot
1095bff35a
chore: Publish crates
2023-11-04 08:28:24 +00:00
bohan
67e2c4a4fd
perf(es): Delete useless partition and extend in comments ( #8214 )
...
I've used `bizcharts` as a benchmark, and:
before this PR 17s:
<img width="288" alt="image"
src="https://github.com/web-infra-dev/rspack/assets/30187863/35232863-247a-4825-a08f-977de46e7216 ">
after this PR 1.7s:
<img width="585" alt="image"
src="https://github.com/swc-project/swc/assets/30187863/b802abf0-d699-45c7-b9f3-2f52192f7477 ">
You can get more info at
https://github.com/web-infra-dev/rspack/issues/4525
2023-11-04 08:26:25 +00:00
SWC Bot
71448552e5
chore: Publish crates
2023-11-04 04:19:10 +00:00
Donny/강동윤
1a26be2a27
feat(es/codegen): Respect ascii_only: false
for StrLit
( #8217 )
...
**Related issue:**
- Closes #8189
2023-11-04 04:15:58 +00:00
SWC Bot
34e7c32085
chore: Publish crates
2023-11-04 02:16:21 +00:00
magic-akari
a00f575837
perf(es/typescript): Visit ts import/export only once ( #8213 )
...
**Description:**
Move `visit_mut_for_ts_import_export` into `visit_mut_module` to make sure we only visit the top-level items.
2023-11-04 02:13:27 +00:00
SWC Bot
4594a7bea4
chore: Publish crates
2023-11-04 01:37:57 +00:00
Donny/강동윤
aeb9cafd11
fix(css/modules): Allow out-of-order class names for composes
( #8218 )
...
**Related issue:**
- Closes #7910
2023-11-04 01:35:59 +00:00
강동윤 (Donny)
808547f592
chore: Publish crates
2023-11-04 06:42:43 +09:00
SWC Bot
5bdd8fd9e7
chore: Publish crates
2023-11-02 23:31:51 +00:00
Donny/강동윤
47733a951c
fix(es/react): Visit children nodes in jsx-src
pass ( #8212 )
...
**Related issue:**
- Closes #8210
2023-11-03 08:29:16 +09:00
SWC Bot
2b35e6c159
chore: Publish crates
2023-11-02 22:20:35 +00:00
Donny/강동윤
83a5a0c612
fix(es/compat): Handle private names from class properties pass ( #8090 )
...
**Related issue:**
- Closes #7561
- https://github.com/vercel/next.js/issues/56612
2023-11-02 22:18:17 +00:00
SWC Bot
407aa63cea
chore: Publish crates
2023-11-02 21:40:11 +00:00
magic-akari
abced23b2a
fix(es/typescript): Preserve const enum for named export ( #8208 )
...
**Related issue:**
- Closes : #8204
2023-11-02 21:38:14 +00:00
SWC Bot
f721814fea
chore: Publish crates
2023-11-02 03:32:27 +00:00
Donny/강동윤
c061356b63
fix(es/transforms): Do not add PURE
comment to BytePos(0)
( #8207 )
...
**Related issue:**
- https://github.com/vercel/next.js/pull/57904 (CI failed)
2023-11-02 03:29:59 +00:00
SWC Bot
e87a45bd67
chore: Publish crates
2023-11-02 00:02:22 +00:00
Donny/강동윤
dd805e95a4
feat(es/minifier): Respect inline level and preserve native names ( #8205 )
...
**Description:**
Note: Preserving native names is a hack, but it's used by `terser` and it's the only way to preserve the name of `class AbortSignal` while mangling without `keep_classnames: true`. We can special case `AbortSignal`, but let's just follow `terser`.
**Related issue:**
- https://github.com/vercel/next.js/pull/57904
2023-11-02 08:59:59 +09:00
SWC Bot
d3ce0f1245
chore: Publish crates
2023-11-01 13:46:52 +00:00
Donny/강동윤
c1b255a59c
fix(es/compat): Use dummy span for blocks in parameters
( #8202 )
...
**Related issue:**
- Closes #8199
2023-11-01 13:43:53 +00:00
SWC Bot
9588088b37
chore: Publish crates
2023-10-31 09:29:46 +00:00
SWC Bot
6a9b6f6732
chore: Publish crates
2023-10-30 08:49:00 +00:00
Donny/강동윤
3dc4e1e02d
feat(es/preset-env): Update compat data ( #8194 )
...
**Related issue:**
- Closes #8193 .
2023-10-30 08:46:24 +00:00
SWC Bot
7cfa3213fb
chore: Publish crates
2023-10-30 05:11:33 +00:00
Donny/강동윤
b13bc32027
fix(es/compat): Make block-scoping
pass rename exports correctly ( #8175 )
...
**Related issue:**
- Closes #8148
2023-10-30 05:08:27 +00:00
SWC Bot
b77d99d4b8
chore: Publish crates
2023-10-30 01:41:47 +00:00
Donny/강동윤
0aafa75fef
feat(es/testing): Use __swc_snapshots__
for test!
macro ( #8191 )
...
**Description:**
This implements something similar to `__snapshots__` of `jest`. Instead of storing the expected result as a string literal, we now store it in `$crate/tests/__swc_snapshots__/$path_to_test__$test_name.js`.
**Related issue:**
- Closes #4509
2023-10-30 10:38:59 +09:00
SWC Bot
595a6f78ea
chore: Publish crates
2023-10-29 22:37:25 +00:00
SWC Bot
a78b486d76
chore: Publish crates
2023-10-29 22:28:09 +00:00
Donny/강동윤
e9606147fc
feat(es/testing): Support babel-like fixture testing officially ( #8190 )
2023-10-30 07:24:49 +09:00
강동윤 (Donny)
b74ef5a807
chore: Publish crates
2023-10-27 22:23:14 -07:00
SWC Bot
352208548d
chore: Publish crates
2023-10-27 18:18:40 +00:00
Austaras
bb02cdd26e
refactor(es/minifier): Simplify analyzer context ( #8164 )
2023-10-27 18:16:00 +00:00
SWC Bot
67b0a7f258
chore: Publish crates
2023-10-25 23:01:44 +00:00
Donny/강동윤
7530e9051d
perf(es/minifier): Add has_flag
to Comments
( #8182 )
2023-10-25 22:59:03 +00:00
강동윤 (Donny)
dc21f79176
chore: Publish crates
2023-10-24 04:32:08 -07:00
SWC Bot
19ccd66d89
chore: Publish crates
2023-10-24 00:04:34 +00:00
Donny/강동윤
5ca3b63582
build(deps): Update ahash
( #8174 )
2023-10-24 00:01:58 +00:00
SWC Bot
5450f5808a
chore: Publish crates
2023-10-23 22:03:16 +00:00
Donny/강동윤
9ceb57b4c7
fix(es/compat): Don't add pure annotations to dummy spans ( #8172 )
...
**Related issue:**
- Closes #8155 .
- Closes #8173 .
2023-10-23 15:00:35 -07:00
SWC Bot
7747dbd499
chore: Publish crates
2023-10-23 21:26:12 +00:00
Austaras
c26a2252b6
fix(es/minifier): Always consider reassigned
when inlining ( #8168 )
...
**Related issue:**
- Closes #8161 .
2023-10-23 21:23:29 +00:00
SWC Bot
76ba2434de
chore: Publish crates
2023-10-23 20:42:56 +00:00
David Sherret
02d0613a35
fix(es/typescript): Support ts_enum_is_mutable
with const enums ( #8171 )
2023-10-23 13:40:16 -07:00
강동윤 (Donny)
5c8a14bd69
chore: Publish crates
2023-10-21 04:37:40 -07:00
SWC Bot
cf92d8fbe7
chore: Publish crates
2023-10-21 11:36:36 +00:00
SWC Bot
366d9eb514
chore: Publish crates
2023-10-20 21:35:19 +00:00
Donny/강동윤
5be8e74ee0
chore(es/module): Remove serde(deny_unknown_fields)
( #8163 )
...
**Related issue:**
- Closes #7979
2023-10-20 21:32:34 +00:00
SWC Bot
6f9c6424d7
chore: Publish crates
2023-10-20 13:33:17 +00:00
Donny/강동윤
826386f49a
fix(es/parser): Skip this
parameters in setter ( #8158 )
...
**Description:**
This is not a proper fix, but let's wait for the conf.
**Related issue:**
- Closes #8156
2023-10-20 13:30:40 +00:00
SWC Bot
b806f925f1
chore: Publish crates
2023-10-20 06:09:49 +00:00
Donny/강동윤
08cf1f786d
fix(es/utils): Fix regression of RefRewriter
( #8153 )
...
**Related issue:**
- Found while investigating https://github.com/swc-project/swc-ecosystem-ci/actions/runs/6581045465/job/17880208108
2023-10-20 06:07:17 +00:00
SWC Bot
4a1a233db8
chore: Publish crates
2023-10-19 21:08:38 +00:00
Donny/강동윤
8a461b8957
feat(es/minifier): Drop empty static blocks ( #8152 )
...
**Related issue:**
- Closes #8136
2023-10-19 21:06:12 +00:00
SWC Bot
64bddc110e
chore: Publish crates
2023-10-19 20:24:12 +00:00
Donny/강동윤
35601e4dcb
fix(es/minifier): Abort function inliner if keep_fnames
is true
( #8145 )
...
**Related issue:**
- https://github.com/vercel/next.js/issues/56408
2023-10-19 20:20:54 +00:00
SWC Bot
9e71134b3c
chore: Publish crates
2023-10-19 19:40:19 +00:00
Austaras
13106e0d2e
refactor(es/minifier): Decouple assign_count
from reassigned
( #8137 )
2023-10-19 19:37:37 +00:00
SWC Bot
a18ffc107f
chore: Publish crates
2023-10-19 17:13:59 +00:00
pshu
8d7894c71f
fix(css/ast): Make .hash()
of Token
not recursive ( #8151 )
2023-10-19 17:10:48 +00:00
SWC Bot
0b6f2b4fe9
chore: Publish crates
2023-10-18 18:00:42 +00:00
magic-akari
e186b80ddc
feat(es/compat): Skip empty class static blocks ( #8138 )
...
**Description:**
And update the `static_block_private_id` generate rules to be consistent with Babel.
**Related issue:**
- #8136
2023-10-18 17:58:02 +00:00
SWC Bot
34b01672ad
chore: Publish crates
2023-10-18 04:24:27 +00:00
David Sherret
bffe33a270
feat(es/parser): Implement AsRef<str>
for IdentLike
( #8133 )
2023-10-18 04:22:03 +00:00
SWC Bot
5bb63aa2a2
chore: Publish crates
2023-10-18 03:47:26 +00:00
Donny/강동윤
111de264b0
fix(es/minifier): Abort seq inliner if b
can short-circuit ( #8128 )
...
**Related issue:**
- Closes #8119
2023-10-18 03:44:36 +00:00
SWC Bot
736831cb68
chore: Publish crates
2023-10-18 03:10:04 +00:00
Austaras
4f67794223
feat(es/minifier): Inline into the arguments of new
using seq inliner ( #8127 )
2023-10-18 03:07:14 +00:00
SWC Bot
dc337d59f1
chore: Publish crates
2023-10-16 22:11:45 +00:00
SWC Bot
9b27a41b76
chore: Publish crates
2023-10-16 20:41:20 +00:00
Alessandro Chitolina
9c029ef095
feat(es/compat): Implement decorator metadata proposal ( #8097 )
...
**Description:**
This PR implements the [decorator
metadata](https://github.com/tc39/proposal-decorator-metadata ) proposal,
that is now at Stage 3.
As the decorator metadata proposal is a small extension of the decorator
proposal and is not possible to compile the metadata without transpiling
decorators, I opted to implement it into the existing decorator
transformer (and helper)
**Related issue:**
- Closes #7957
2023-10-16 20:38:53 +00:00
SWC Bot
f81ca2c795
chore: Publish crates
2023-10-15 10:27:05 +00:00
magic-akari
fb81a36adc
fix(es/utils): Skip var declarator name in RefRewriter
( #8125 )
...
**Related issue:**
- Closes #8124
2023-10-15 10:24:40 +00:00
SWC Bot
3bca931560
chore: Publish crates
2023-10-15 08:25:08 +00:00
David Sherret
57b171dcbe
feat(es/typescript): Add ts_enum_is_mutable
to disable enum inlining ( #8115 )
...
**Related issue:**
- Closes #8114 .
2023-10-15 08:22:47 +00:00
SWC Bot
06a2b44499
chore: Publish crates
2023-10-13 06:10:04 +00:00
magic-akari
7da3f52485
feat(es/minifier): Evaluate more toFixed
expressions ( #8109 )
2023-10-13 15:07:00 +09:00
강동윤 (Donny)
787a465d8d
chore: Publish crates
2023-10-13 12:28:41 +09:00
SWC Bot
a1d7ea7899
chore: Publish crates
2023-10-13 02:52:46 +00:00