Commit Graph

9130 Commits

Author SHA1 Message Date
Donny/강동윤
eda2e45691
feat(common): Use SourceMap::adjust_mappings (#9052) 2024-06-14 14:45:58 +00:00
강동윤 (Donny)
8b66428429 chore: Update changelog 2024-06-14 22:57:10 +09:00
강동윤 (Donny)
3797b0b1af chore: Publish 1.5.30-nightly-20240614.2 with swc_core v0.94.0 2024-06-14 22:57:08 +09:00
강동윤 (Donny)
fc188730b4 chore: Update changelog 2024-06-14 22:04:16 +09:00
강동윤 (Donny)
0e09be47da chore: Publish 1.5.30-nightly-20240614.1 with swc_core v0.94.0 2024-06-14 22:04:14 +09:00
SWC Bot
8d4f7cb9fb chore: Bump crates 2024-06-14 12:58:43 +00:00
Luca Casonato
6306778512
refactor(es/ast): Remove unused fields of TsPropertySignature (#8955)
**Description:**

TsPropertySignature can not have params, type params, or an initializer.

**BREAKING CHANGE:**

Yes. Any users looking into these fields should stop - they are always empty.

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
2024-06-14 21:57:10 +09:00
SWC Bot
b31edbfb62 chore: Bump crates 2024-06-14 12:55:09 +00:00
Donny/강동윤
e856478060
refactor(es/utils): Refine some APIs (#9049)
**Description:**

This PR
 - moves some APIs into `swc_ecma_ast`.
 - removes needless types.

**BREAKING CHANGE:**

 - `swc_ecma_utils::IdentExt::private` => `swc_ecma_ast::Ident::into_private`.
 - `swc_ecma_utils::IdentExt::prefix` => `swc_ecma_ast::Ident::with_prefix`.
 - `swc_ecma_utils::undefined` => `swc_ecma_ast::Expr::undefined`.
2024-06-14 21:53:16 +09:00
강동윤 (Donny)
12e1c5d036 chore: Bump crates 2024-06-14 15:28:28 +09:00
SWC Bot
a3a37a0c7c chore: Bump crates 2024-06-14 06:26:31 +00:00
Donny/강동윤
32e23edd85
refactor(es/parser): Remove unused raw: Raw params (#9048) 2024-06-14 15:13:05 +09:00
Donny/강동윤
e5601989a1
perf(es/lints): Avoid needless allocations in no-dupe-args (#9041)
**Description:**

I introduced a zero-allocation variant for `swc_ecma_utils::DestructuringFinder` that does not allocate anything.
2024-06-14 14:39:15 +09:00
SWC Bot
931f752d54 chore: Bump crates 2024-06-14 05:24:10 +00:00
Donny/강동윤
60fe5f0eff
perf(es/parser): Do not track raw by hand (#9047)
**Description:**

We can skip this logic completely, as it's `raw`.

~I'm under the impression that I'm super stupid~
2024-06-14 14:22:26 +09:00
SWC Bot
0a3265e7fc chore: Bump crates 2024-06-13 08:20:48 +00:00
Donny/강동윤
11bba262f5
test(es/parser): Add benchmarks (#9044)
**Description:**

- Source: https://github.com/oxc-project/bench-javascript-parser-written-in-rust
2024-06-13 08:19:11 +00:00
강동윤 (Donny)
145c751603 chore: Update changelog 2024-06-13 09:15:09 +09:00
강동윤 (Donny)
4ecda3851c chore: Publish 1.5.29 with swc_core v0.93.4 2024-06-13 09:15:07 +09:00
강동윤 (Donny)
06592cb5b7 chore: Update changelog 2024-06-12 23:27:26 +09:00
강동윤 (Donny)
1c9a050c6c chore: Publish 1.5.29-nightly-20240612.3 with swc_core v0.93.4 2024-06-12 23:27:24 +09:00
강동윤 (Donny)
e4cbc8d675 chore(ci): Fix binary upload action 2024-06-12 23:26:46 +09:00
강동윤 (Donny)
c3c714e776 chore: Update changelog 2024-06-12 17:38:00 +09:00
강동윤 (Donny)
dab7bfca53 chore: Publish 1.5.29-nightly-20240612.2 with swc_core v0.93.4 2024-06-12 17:37:57 +09:00
강동윤 (Donny)
ad3ab3bd0b chore: Publish 1.5.29-nightly-20240612.1 with swc_core v0.93.4 2024-06-12 17:37:35 +09:00
SWC Bot
80d22e355a chore: Bump crates 2024-06-12 07:45:07 +00:00
Donny/강동윤
733dcc6b83
fix(xtask): Fix nightly action (#9042) 2024-06-12 16:43:16 +09:00
SWC Bot
2ecd550d58 chore: Publish 1.5.29-nightly-20240612.1 2024-06-12 07:33:17 +00:00
SWC Bot
82479ec163 chore: Bump crates 2024-06-12 05:23:40 +00:00
Donny/강동윤
3337bb26f9
fix(ci): Make publish action upload cli artifacts (#9040)
**Related issue:**

 - Closes #9035
2024-06-12 14:22:08 +09:00
SWC Bot
f7dc8245c5 chore: Publish 1.5.29-nightly-20240612.1 2024-06-12 03:33:37 +00:00
SWC Bot
a1629d9aea chore: Bump crates 2024-06-12 03:26:01 +00:00
Donny/강동윤
675916ccbd
perf(es/minifier): Do not visit var init multiple times (#9039)
**Description:**

I mistakenly introduced a performance regression with https://github.com/swc-project/swc/pull/9032. It makes the minifier visit the initializer of variables multiple times - once while normal visiting and once in `hoist_props_of_vars`. This PR fixes it.
2024-06-12 12:24:28 +09:00
SWC Bot
65bd2159f5 chore: Bump crates 2024-06-12 01:13:45 +00:00
Donny/강동윤
5bffd0ff9b
perf(es/parser): Optimize lexing of template literals, again (#9037)
**Description:**

Applies same trick as #9036, but for `cooked`
2024-06-12 01:12:05 +00:00
SWC Bot
9d2e1cee0b chore: Bump crates 2024-06-12 00:44:35 +00:00
David Sherret
91e92ececa
fix(es/codegen): Emit named type in mapped types (#9038)
**Description:**

Fixes the emit of mapped types.
2024-06-12 00:42:40 +00:00
SWC Bot
ac5eb02167 chore: Bump crates 2024-06-11 12:21:40 +00:00
Donny/강동윤
6ab19a1b5f
perf(es/parser): Optimize lexing of template literals (#9036)
**Description:**

We don't need to push one char at a time.
2024-06-11 21:20:00 +09:00
SWC Bot
6400140999 chore: Bump crates 2024-06-11 11:22:41 +00:00
Donny/강동윤
cb16994a8d
fix(es/minifier): Visit RHS while hoisting properties (#9032)
**Description:**

Handles 

```js
var FRUITS = { MANGO: "mango" }, getMangoLabel = (label) => label[FRUITS.MANGO];
```

while hoisting properties. In the code above, the initializer of the second variable declarator should be visited after hoisting the first variable declarator. Otherwise `FRUITS.MANGO` cannot be handled.


**Related issue:**

 - Closes #9030
2024-06-11 20:20:39 +09:00
SWC Bot
328cb4b248 chore: Publish 1.5.29-nightly-20240611.1 2024-06-11 08:32:31 +00:00
SWC Bot
0a7aa10706 chore: Bump crates 2024-06-11 07:15:38 +00:00
Donny/강동윤
39654bf1e7
fix(es): Make output field optional (#9033) 2024-06-11 07:14:01 +00:00
강동윤 (Donny)
93c16422c3 chore: Update changelog 2024-06-11 15:03:59 +09:00
강동윤 (Donny)
e06198552c chore: Publish 1.5.28 with swc_core v0.93.2 2024-06-11 15:03:56 +09:00
SWC Bot
b31927cb66 chore: Bump crates 2024-06-11 06:01:25 +00:00
Donny/강동윤
6669343b4a
fix(es/minifier): Fix typescript enum detection (#9031)
**Description:**

This reverts commit cc8c1550dd because it caused a regression in the next.js canary.

 - Canary version: `15.0.0-canary.12`


**Related issue:**

 - Reverts #8986
2024-06-11 14:59:42 +09:00
SWC Bot
2133903e8f chore: Publish 1.5.28-nightly-20240611.1 2024-06-11 00:06:15 +00:00
강동윤 (Donny)
abcf21dfc2 chore: Update changelog 2024-06-10 14:16:44 +09:00