Commit Graph

8497 Commits

Author SHA1 Message Date
강동윤 (Donny)
4c83dcc370 chore: Publish @swc/helpers@v0.5.7 2024-03-18 10:46:12 +09:00
강동윤 (Donny)
5f2ea762a1 chore: Publish @swc/types@v0.1.6 2024-03-18 10:45:42 +09:00
SWC Bot
82d1b8e49a chore: Bump crates 2024-03-17 13:04:54 +00:00
Kyuuhachi
f2300dadbf
refactor(common): Debug-print spans more compactly (#8746)
**Description:**

`dbg!()` output on ASTs is kinda verbose,

```rs
ExprStmt {
    span: Span {
        lo: BytePos(
            37,
        ),
        hi: BytePos(
            50,
        ),
        ctxt: #0,
    },
    expr: Lit(
        Str(
            Str {
                span: Span {
                    lo: BytePos(
                        37,
                    ),
                    hi: BytePos(
                        49,
                    ),
                    ctxt: #0,
                },
                value: "use strict",
                raw: Some(
                    "\"use strict\"",
                ),
            },
        ),
    ),
}
```

A lot of the space is wasted on spans — 9 lines per span, even though
it's pretty much unimportant cruft. This PR changes that to just one
line per span:

```rs
ExprStmt {
    span: 37..50#0,
    expr: Lit(
        Str(
            Str {
                span: 37..49#0,
                value: "use strict",
                raw: Some(
                    "\"use strict\"",
                ),
            },
        ),
    ),
}
```

While not a statistically meaningful measurement, in my tests (sample
size = 1) this change reduces the `dbg!()` of a 1103-byte script from
5597 to 2885 lines, which is a 48% reduction. In `{:?}` mode it goes
from 40034 to 25457 chars, or 37% reduction.
2024-03-17 13:03:14 +00:00
SWC Bot
1240b8834f chore: Publish 1.4.9-nightly-20240316.1 2024-03-16 00:06:03 +00:00
강동윤 (Donny)
0c180032c1 chore: Update changelog 2024-03-14 13:42:08 +09:00
강동윤 (Donny)
a0d0563114 chore: Publish 1.4.8 with swc_core v0.90.22 2024-03-14 13:42:07 +09:00
SWC Bot
3672a58ed6 chore: Bump crates 2024-03-14 04:00:19 +00:00
one230six
bfb0c6e534
chore: Remove repetitive words (#8741)
Signed-off-by: one230six <723682061@qq.com>
2024-03-14 03:58:51 +00:00
SWC Bot
1ec92dff2f chore: Bump crates 2024-03-14 03:24:06 +00:00
Donny/강동윤
f988b66e1f
fix(es/module): Fix regression of resolving relative modules (#8748)
**Description:**

- x-ref (vercel slack):
https://vercel.slack.com/archives/C03S8ED1DKM/p1710371667695459?thread_ts=1710362018.271789&cid=C03S8ED1DKM


**Related issue (if exists):**
2024-03-14 12:22:28 +09:00
SWC Bot
31ecd2a6c1 chore: Bump crates 2024-03-14 01:32:37 +00:00
Donny/강동윤
663261be97
fix(es/parser): Allow export after decorators when valid (#8739)
**Related issue:**

 - Closes #5276
2024-03-14 01:30:49 +00:00
SWC Bot
10f25067db chore: Bump crates 2024-03-13 07:45:30 +00:00
Donny/강동윤
9c1eb017fc
chore(es): Allow using older tokio (#8740)
**Description:**

I made a mistake while working on https://github.com/swc-project/swc/pull/8711
2024-03-13 07:43:50 +00:00
강동윤 (Donny)
80449374c1 chore: Update changelog 2024-03-13 15:03:36 +09:00
강동윤 (Donny)
583958a112 chore: Publish 1.4.7 with swc_core v0.90.20 2024-03-13 15:03:34 +09:00
SWC Bot
6e672aaf9a chore: Bump crates 2024-03-13 03:08:09 +00:00
Donny/강동윤
633cd89bac
fix(es/proposal): Fix var placement for using transform (#8732)
**Related issue:**

 - Closes #8629
2024-03-13 03:06:29 +00:00
SWC Bot
8a5163ce5d chore: Bump crates 2024-03-13 02:23:10 +00:00
Donny/강동윤
95761b76bf
fix(es/minifier): Make Finalizer handle hoisted_props correctly (#8738)
**Related issue:**

 - Closes #8737
2024-03-13 02:21:15 +00:00
SWC Bot
391d6f6820 chore: Publish 1.4.7-nightly-20240312.1 2024-03-12 06:34:54 +00:00
SWC Bot
e4ce466823 chore: Bump crates 2024-03-12 06:26:14 +00:00
Donny/강동윤
312f0d8427
fix(es/minifier): Fix removal of array pattern bindings (#8730)
**Related issue:**

 - Closes #8670
2024-03-12 06:24:36 +00:00
SWC Bot
e46dd5a208 chore: Bump crates 2024-03-12 06:00:28 +00:00
Donny/강동윤
aa0154d2d8
fix(es/minifier): Fix evaluation of array literals with void 0 (#8733)
**Related issue:**

 - Closes #8706
2024-03-12 14:58:52 +09:00
SWC Bot
d9c49d8a0f chore: Bump crates 2024-03-11 08:01:00 +00:00
Donny/강동윤
102241b812
fix(es/minifier): Handle cyclic references while dropping unused properties (#8725)
**Related issue:**

 - Closes #8714
2024-03-11 07:59:22 +00:00
SWC Bot
f2643469d5 chore: Bump crates 2024-03-11 07:22:20 +00:00
Artur
aa9297b42e
feat(es/lints): Add prefer-object-spread rule (#8696) 2024-03-11 07:20:50 +00:00
SWC Bot
a3d877e406 chore: Bump crates 2024-03-11 06:54:35 +00:00
Donny/강동윤
23f9635d2c
fix(es/minifier): Do not evaluate slice calls with negative index (#8726)
**Related issue:**

 - Closes #8715.
2024-03-11 06:52:57 +00:00
SWC Bot
99a5961789 chore: Bump crates 2024-03-11 04:57:56 +00:00
Donny/강동윤
f3fbd9d549
fix(es/minifier): Fix eval of toString of array with holes (#8727)
**Related issue:**

 - Closes #8717.
2024-03-11 04:56:31 +00:00
SWC Bot
2ff26e05d2 chore: Bump crates 2024-03-11 04:29:01 +00:00
LongYinan
e3acd1476c
refactor(es): Prepare wasm32-wasi-preview1-threads target support (#8724) 2024-03-11 13:27:29 +09:00
SWC Bot
e25380451e chore: Bump crates 2024-03-11 04:19:21 +00:00
Artur
a5dbb17612
feat(es/lints): Add no-prototype-builtins rule (#8684) 2024-03-11 04:17:40 +00:00
SWC Bot
8c024895f9 chore: Publish 1.4.7-nightly-20240310.2 2024-03-10 00:31:43 +00:00
SWC Bot
3b4e4dc4f2 chore: Publish 1.4.7-nightly-20240310.1 2024-03-10 00:24:13 +00:00
강동윤 (Donny)
de09c55ffa chore: Update changelog 2024-03-08 14:56:34 +09:00
강동윤 (Donny)
938d725f27 chore: Publish 1.4.6 with swc_core v0.90.18 2024-03-08 14:56:32 +09:00
SWC Bot
18ab6cd566 chore: Publish 1.4.6-nightly-20240308.1 2024-03-08 05:49:46 +00:00
SWC Bot
b0c00b96f1 chore: Bump crates 2024-03-08 04:57:07 +00:00
Donny/강동윤
9a1f04f426
perf(es): Do not create tokio runtime if not required (#8711)
**Related issue:**

 - Closes #8708.
2024-03-08 04:55:36 +00:00
SWC Bot
1f65271b72 chore: Bump crates 2024-03-07 07:20:05 +00:00
Donny/강동윤
606921700e
fix(es/minifier): Do not drop used properties (#8703)
**Related issue:**

 - Closes #8692
2024-03-07 07:18:26 +00:00
SWC Bot
c6464add4f chore: Publish 1.4.6-nightly-20240307.1 2024-03-07 00:18:19 +00:00
강동윤 (Donny)
cecd02615e chore: Update changelog 2024-03-06 17:53:35 +09:00
강동윤 (Donny)
811d3a01c7 chore: Publish 1.4.5 with swc_core v0.90.17 2024-03-06 17:53:33 +09:00