Commit Graph

5502 Commits

Author SHA1 Message Date
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
Donny/강동윤
affb6fb5e3
refactor(es/compat): Split swc_ecma_transforms_compat (#8110)
**Description:**

- New: `cargo build --release 478.59s user 19.16s system 814% cpu 1:01.09 total`
- Prev: `cargo build --release 495.60s user 18.89s system 742% cpu 1:09.26 total`
2023-10-12 10:08:00 +00:00
SWC Bot
04932acc02 chore: Publish crates 2023-10-12 04:06:44 +00:00
Donny/강동윤
95eb147742
refactor(es/preset-env): Rename parameter to avoid confusion (#8106)
**Related issue:**

 - Closes #8103
2023-10-12 04:04:10 +00:00
SWC Bot
1bb2491368 chore: Publish crates 2023-10-12 03:28:23 +00:00
Donny/강동윤
fe0bf5746f
chore(ci): Fix CI action (#8107) 2023-10-12 03:26:04 +00:00
SWC Bot
1364c568e1 chore: Publish crates 2023-10-12 00:42:04 +00:00
Donny/강동윤
94bb42e294
fix(es/minifier): Don't inline functions if keep_fnames is enabled (#8093)
**Related issue:**

 - https://github.com/vercel/next.js/issues/56550
2023-10-12 00:39:19 +00:00
SWC Bot
6828fdbee5 chore: Publish crates 2023-10-11 22:50:49 +00:00
SWC Bot
a25fff5c46 chore: Publish crates 2023-10-11 18:35:43 +00:00
Donny/강동윤
cb4361f293
fix(es/decorators): Fix a regression about class expressions (#8102)
**Related issue:**

 - Closes #8095
2023-10-11 16:45:21 +00:00
SWC Bot
1183c32e3c chore: Publish crates 2023-10-11 14:05:36 +00:00
Donny/강동윤
e1043fae77
fix(es/parser): Fix parsing of await using (#8101)
**Related issue:**

 - Closes #8096
2023-10-11 14:03:08 +00:00
SWC Bot
17fe7b29c5 chore: Publish crates 2023-10-11 12:44:18 +00:00
Donny/강동윤
226b17fa86
chore(ci): Remove unused concurrency tests (#8100) 2023-10-11 21:40:49 +09:00
SWC Bot
8a07681f78 chore: Publish crates 2023-10-11 12:26:14 +00:00
magic-akari
bf523f5351
fix(es/compat): Handle export default decorator only if not empty (#8099)
**Related issue:**

 - Closes: #8098
2023-10-11 12:24:22 +00:00
SWC Bot
3dc761ab47 chore: Publish crates 2023-10-11 05:23:36 +00:00
SWC Bot
77d34014c7 chore: Publish crates 2023-10-10 14:21:09 +00:00
Donny/강동윤
a2d077958f
chore(es/minifier): Fix script for extracting test cases from next.js app (#8092) 2023-10-10 23:18:39 +09:00
SWC Bot
7e4b2490e8 chore: Publish crates 2023-10-10 11:44:33 +00:00
Donny/강동윤
d1097ccb59
feat(css/parser): Store lexed comments (#8091)
**Description:**

For now, we leave every comment as a leading comment. As logic for determining leading vs trailing is quite complex, I'll do it with another PR.
2023-10-10 11:42:20 +00:00
SWC Bot
4453d1b0a8 chore: Publish crates 2023-10-10 06:49:24 +00:00
SWC Bot
f44205bd57 chore: Publish crates 2023-10-10 04:10:33 +00:00
magic-akari
a912937cea
fix(es/compat): Handle __proto__ edge case in shorthand pass (#8077)
**Related issue:**

 - https://github.com/babel/babel/pull/12664
2023-10-10 04:08:45 +00:00
SWC Bot
ed648337f1 chore: Publish crates 2023-10-08 02:05:49 +00:00
SWC Bot
34e03c4661 chore: Publish crates 2023-10-08 00:41:50 +00:00
Donny/강동윤
84cec8766d
refactor(atoms): Remove usage of js_word! to drop string-cache (#7976)
**Description:**

This PR is to prepare removal of `string-cache`. Actually, this PR does not remove it. Instead, this PR only removes direct usages of `js_word!`s, especially in patterns.



**Related issue:**

 - #4946.
2023-10-08 00:39:51 +00:00
SWC Bot
d716dc823b chore: Publish crates 2023-10-07 14:22:43 +00:00
magic-akari
1346528477
fix(es/helpers): Override mistake in _interop_require_wildcard (#8076)
**Related issue:**

 - https://github.com/babel/babel/issues/15995
2023-10-07 14:20:39 +00:00
SWC Bot
4843266545 chore: Publish crates 2023-10-06 14:46:52 +00:00
Donny/강동윤
a5621bb30a
chore(xtask): Migrate scripts to xtask (#8072)
This PR adds

 - `xtask clean`
 - `xtask bench`
2023-10-06 14:44:53 +00:00
SWC Bot
5c6c82bc6a chore: Publish crates 2023-10-06 12:41:57 +00:00
Edward Faulkner
6f45b4693e
fix(es/codegen): Fix codegen of type-only imports (#8070) 2023-10-06 12:39:56 +00:00
SWC Bot
a6527bf9ab chore: Publish crates 2023-10-06 00:12:18 +00:00
Donny/강동윤
9b9bc51c28
refactor(es/parser): Introduce TokenKind along with Token (#8071)
**Description:**

This is extracted from https://github.com/swc-project/swc/pull/7790 because this PR is extremely large PR. I'll switch to `TokenKind` gradually.
2023-10-06 00:09:48 +00:00
SWC Bot
da9bee9776 chore: Publish crates 2023-10-05 09:17:21 +00:00
magic-akari
3e5b062cd2
refactor(es/module): Reimplement some functions of module/typescript (#8063) 2023-10-05 09:15:27 +00:00
SWC Bot
70ec648a63 chore: Publish crates 2023-10-05 08:36:48 +00:00
강동윤 (Donny)
a35fed015f chore: Publish crates 2023-10-05 16:29:43 +09:00
SWC Bot
0edd36842b chore: Publish crates 2023-10-03 16:49:03 +00:00
SWC Bot
89676946e6 chore: Publish crates 2023-10-03 06:04:32 +00:00
Donny/강동윤
8318ea82c2
fix(es/compat): Use async and await correctly in block-scoping pass (#8056)
**Related issue:**

 - Closes #7989
2023-10-03 06:02:42 +00:00
SWC Bot
4abfbaacc4 chore: Publish crates 2023-10-03 03:35:46 +00:00
SWC Bot
b3a59613ab chore: Publish crates 2023-10-02 17:32:00 +00:00
Alessandro Chitolina
a751f1cfaf
fix(es/compat): Transform default-exported class decorators correctly (#8050)
**Description:**

Process decorators on the class expression on `export default` declaration and ensure to execute tests for the feature.

**Related issue:**

 - Closes #8049
2023-10-02 17:30:13 +00:00
SWC Bot
c53a655154 chore: Publish crates 2023-10-02 16:45:51 +00:00
magic-akari
4d8e1013bb
fix(es/module): Handle directives (#8048)
**Related issue:**

 - Closes: #8047
2023-10-02 16:44:05 +00:00
SWC Bot
92c6be7681 chore: Publish crates 2023-10-02 15:48:04 +00:00
Donny/강동윤
f717cf21cc
refactor(cli): Make CLI testable/managable with swc-bump (#8045)
**Description:**

It was hard to maintain CLI because actual logic was in `./bindings`.
2023-10-02 15:46:14 +00:00
SWC Bot
2bf935c68b chore: Publish crates 2023-10-02 06:18:14 +00:00
Donny/강동윤
96a7a4d045
fix(es/compat): Fix scoping of explicit-resource-management (#8044)
**Related issue:**

 - Closes #8020
2023-10-02 06:16:08 +00:00
Donny/강동윤
f2bc6a3fcc
chore(ci): Prepare multi-package repository (#8043) 2023-10-02 04:41:21 +00:00
강동윤 (Donny)
13161c45cd chore: Publish crates 2023-10-01 20:52:47 +09:00
SWC Bot
203b2297c3 chore: Publish crates 2023-09-30 11:42:29 +00:00
Austaras
01391e3c13
fix(es/minifier): Check if object shorthand is skippable for seq inliner (#8036)
**Related issue:**

 - Closes #7984
2023-09-30 11:40:46 +00:00
SWC Bot
3fd6f64e60 chore: Publish crates 2023-09-29 21:35:08 +00:00
Austaras
06b6eb9999
fix(es/compat): Generate OptCall for OptCall for private fields (#8031)
**Related issue:**

 - Closes #8003
2023-09-29 21:32:48 +00:00
SWC Bot
8f445f49c9 chore: Publish crates 2023-09-29 20:54:50 +00:00
SWC Bot
5283e5bf82 chore: Publish crates 2023-09-29 20:36:29 +00:00
magic-akari
cf96171a53
fix(es/typescript): Preserve default value of an exported binding in a namespace (#8029)
**Related issue:**

 - Closes: #8025
2023-09-29 20:34:24 +00:00
SWC Bot
d35de6444e chore: Publish crates 2023-09-29 19:53:01 +00:00
SWC Bot
537932b581 chore: Publish crates 2023-09-29 19:48:02 +00:00
SWC Bot
90387bb340 chore: Publish crates 2023-09-29 14:50:45 +00:00
Donny/강동윤
a13f5cbe03
refactor(es): Extract parser/codegen code for swc::Compiler (#8030) 2023-09-29 14:48:31 +00:00
SWC Bot
920362685b chore: Publish crates 2023-09-29 11:01:28 +00:00
Donny/강동윤
725f7f5bda
refactor(es/minifier): Move JS options to swc_ecma_minifier (#8028)
**Description:**

This is not a public API, though.
2023-09-29 10:59:43 +00:00
SWC Bot
2153c05c66 chore: Publish crates 2023-09-29 10:27:04 +00:00
magic-akari
990ca06aca
fix(es/module): Sort the exported ESM bindings (#8024)
**Related issue:**

 - Closes: #8023
2023-09-29 10:25:22 +00:00
SWC Bot
83f77ddfce chore: Publish crates 2023-09-29 08:49:57 +00:00
SWC Bot
632a63a46e chore: Publish crates 2023-09-27 23:30:11 +00:00
jrandolf
38bc71006e
fix(es/compat): Use return statements for method and setter decorator (#8017)
**Description:**

This aligns with other implementations such as TypeScript's and correctly implements the currently proposed behavior.

**Related issue:**

 - Closes #8015.
2023-09-27 23:27:57 +00:00
SWC Bot
0871d4e0f0 chore: Publish crates 2023-09-27 14:36:52 +00:00
magic-akari
58172689ce
fix(es/typescript): Rename wrong unresolved_mark (#8018)
**Related issue:**

 - Closes: #8016
2023-09-27 14:34:59 +00:00
강동윤 (Donny)
8231f874e7 chore: Publish crates 2023-09-27 10:13:08 +09:00