Commit Graph

6116 Commits

Author SHA1 Message Date
SWC Bot
23b63bc1e5 chore: Bump crates 2024-05-13 09:15:58 +00:00
Donny/강동윤
606cb677c4
fix(es): Allow input source map file to be omitted (#8951)
**Description:**

Some libraries generate source maps but do not upload them to npm, which causes SWC to fail.

**Related issue:**

- https://github.com/swc-project/swc/issues/8789#issuecomment-2105055772
2024-05-13 09:14:21 +00:00
SWC Bot
6bd0d983e2 chore: Bump crates 2024-05-13 05:01:28 +00:00
Austaras
7053bb16ce
fix(es/compat): Avoid reserved name for private method (#8949)
**Description:**

Following development should follow babel/babel#16261 to avoid separate `WeakMap` for each individual private method


**Related issue:**

 - Closes #8948.
2024-05-13 04:59:48 +00:00
Donny/강동윤
3046d71daa
fix(es/minifier): Abort seq inliner on ** (#8947)
**Related issue:**

 - Closes #8942
2024-05-13 01:11:46 +00:00
SWC Bot
8baa0e579c chore: Bump crates 2024-05-13 00:48:12 +00:00
Donny/강동윤
772c50fd76
fix(es/minifier): Fix evaluation of String.charCodeAt (#8946)
**Related issue:**

 - Closes #8943
2024-05-13 00:46:29 +00:00
SWC Bot
5673fceaf6 chore: Bump crates 2024-05-10 02:25:42 +00:00
Donny/강동윤
6362ff4ba8
fix(es/ast): Pin version of unicodes (#8941)
**Description:**

https://github.com/swc-project/swc/issues/8940#issuecomment-2102423586

> I found part of the problem:
> 
> U+30FB was added to `ID_Continue` from Unicode version 14 to 15, but v8 is using an older version of unicode ... which I can't find the exact version.
> 
> I spent 2 hours searching for all the missing pieces, I give up.
> 
> Let me back port unicode version 14.

**Related issue:**

 - Closes #8940
2024-05-10 11:23:52 +09:00
Austaras
5a3456c254
fix(es/minifier): Don't invoke IIFE containing reserved words (#8939)
**Description:**

`inline` and `seq inline` should apply this change too.

**Related issue:**

 - Closes #8622
2024-05-09 06:54:25 +00:00
SWC Bot
1f01cd42bd chore: Bump crates 2024-05-09 01:51:35 +00:00
Donny/강동윤
257afc92c9
fix(es/minifier): Abort inliner on mutation via property (#8938)
**Related issue:**

 - Closes #8937
2024-05-09 10:49:41 +09:00
SWC Bot
76393d9fd7 chore: Bump crates 2024-05-08 07:27:20 +00:00
Donny/강동윤
d4be383318
fix(es/minifier): Fix a bug about Tpl => Str (#8934)
**Description:**

I added the method to `swc_ecma_ast` to reuse it from plugins.

**Related issue:**

 - Closes #8931
2024-05-08 07:25:32 +00:00
SWC Bot
2c27925f34 chore: Bump crates 2024-05-08 06:59:23 +00:00
Donny/강동윤
c536d2ad6f
fix(es/module): Resolve .jsx imports fully (#8936)
**Related issue:**

 - Closes #8935
2024-05-08 15:57:50 +09:00
Donny/강동윤
c9d72cdc6a
fix(es/minifier): Fix operand handling of ** (#8933)
**Related issue:**

 - Closes #8924
2024-05-08 01:37:57 +00:00
Donny/강동윤
2405dc6ba0
fix(css/modules): Fix :global selectors without preceding whitespace (#8926)
**Related issue:**

 - Closes #8461
2024-05-07 08:43:41 +00:00
Austaras
8932a1b527
refactor(es/minifier): Remove unnecessary check (#8927) 2024-05-07 06:19:24 +00:00
SWC Bot
8654a34385 chore: Bump crates 2024-05-07 05:54:22 +00:00
Donny/강동윤
7014c63625
fix(css/modules): Allow any order of composes (#8930)
**Related issue:**

 - Closes #8240
2024-05-07 05:52:49 +00:00
SWC Bot
ad1cc5f972 chore: Bump crates 2024-05-07 05:28:42 +00:00
Donny/강동윤
4d4a7a9bcb
fix(es/minifier): Consider side effects of operands of binary expressions (#8929)
**Related issue:**

 - Closes #8923
2024-05-07 05:27:08 +00:00
SWC Bot
9bf57906c5 chore: Bump crates 2024-05-07 04:58:37 +00:00
Donny/강동윤
6b60bdb697
fix(es/fixer): Wrap class expressions in callee (#8928)
**Related issue:**

 - Closes #8920
2024-05-07 04:57:05 +00:00
SWC Bot
431b7306b8 chore: Bump crates 2024-05-07 03:17:29 +00:00
Donny/강동윤
aca6a77903
fix(es/minifier): Respect module: false (#8925)
**Description:**

Tests are modified because I enabled script detection for the fixture test suite.

**Related issue:**

 - Closes #8909
2024-05-07 12:15:47 +09:00
Donny/강동윤
762b0d4477
fix(es/proposal): Fix scoping of explicit resource management pass (#8903)
**Related issue:**

 - Closes #8895
2024-05-05 01:33:54 +00:00
SWC Bot
225d25a015 chore: Bump crates 2024-05-05 01:10:06 +00:00
SWC Bot
a9bab833ba chore: Bump crates 2024-05-01 00:36:57 +00:00
magic-akari
af96e396de
fix(es/decorators): Handle ref of decorated class (#8905)
**Related issue:**

Follow up #8515 

 - Ts Decorator does not always return a class; we need to give it the correct reference.
2024-05-01 00:35:17 +00:00
SWC Bot
9ec9459b16 chore: Bump crates 2024-04-30 07:55:10 +00:00
Donny/강동윤
86e2bb04ac
fix(es/minifier): Increment ref_count while invoking IIFE (#8904)
**Related issue:**

 - Closes #8880
2024-04-30 09:11:23 +09:00
강동윤 (Donny)
7ac3b0a7dc chore: Bump crates 2024-04-29 09:56:27 +09:00
SWC Bot
0dcdae9bda chore: Bump crates 2024-04-29 00:56:23 +00:00
magic-akari
cc1432a12f
chore: Apply cargo autoinherit (#8902) 2024-04-29 00:54:45 +00:00
SWC Bot
b3d495f796 chore: Bump crates 2024-04-27 05:10:38 +00:00
magic-akari
8fe57adc02
fix(es/decorator): Support for legacy decorators in class expressions (#8892)
**Related issue:**

- Closes #8515
2024-04-27 05:09:10 +00:00
SWC Bot
0fc70b3579 chore: Bump crates 2024-04-27 04:46:08 +00:00
Donny/강동윤
be359fa753
fix(es/minifier): Do not add vars if eval exists (#8888)
**Related issue:**

 - Closes #8886

---------

Co-authored-by: austaras <austaras@outlook.com>
2024-04-27 13:44:25 +09:00
SWC Bot
f9106a50c0 chore: Bump crates 2024-04-24 00:37:30 +00:00
David Sherret
1155ac7972
feat(es/ast): Support abstract auto-accessors (#8736)
**Description:**

Supports abstract auto-accessors:
3e91592b06/tests/baselines/reference/autoAccessorAllowedModifiers.js (L9)

**BREAKING CHANGE:**

Adds a new is_abstract property
2024-04-24 09:35:33 +09:00
SWC Bot
d925f8a6d2 chore: Bump crates 2024-04-23 12:36:02 +00:00
Austaras
cd4548fd8c
fix(es/minifier): Abort seq inline on recursive usage (#8887)
**Related issue:**

 - Closes #8841
2024-04-23 12:34:14 +00:00
SWC Bot
6d3c41d2d5 chore: Bump crates 2024-04-23 01:50:19 +00:00
Donny/강동윤
c7a06b1a5e
fix(es/codegen): Use Str.raw for es5 (#8873)
**Related issue:**

 - Closes #8871
2024-04-23 10:48:33 +09:00
SWC Bot
f5e50c2c6e chore: Bump crates 2024-04-23 01:25:36 +00:00
Donny/강동윤
063eabd33c
fix(es/compat): Fix async generator (#8881)
**Related issue:**

 - Closes #8805
2024-04-23 01:23:49 +00:00
SWC Bot
16a3885107 chore: Bump crates 2024-04-22 04:09:07 +00:00
Donny/강동윤
d7188cdb66
fix(es): Ignore sourceMappingURL in string literals (#8879)
**Related issue:**

 - Closes #8869
2024-04-22 04:07:18 +00:00
SWC Bot
e1a197694c chore: Bump crates 2024-04-19 13:39:58 +00:00
yehonatanz
e22c3681a6
fix(es/resolver): Prioritze jsc.paths by length in tsc resolver (#8875)
**Description:**

See #8858 

**BREAKING CHANGE:**
`jsc.paths` are now prioritized differently to align with `tsc`. The order is:
1. Exact matches
2. Wildcard pattern matches, sorted by length of prefix before wildcard


**Related issue:**

 - Closes #8858
2024-04-19 13:38:19 +00:00
SWC Bot
2e0663befc chore: Bump crates 2024-04-19 12:54:02 +00:00
Anders Kaseorg
5419a9477f
fix(html/codegen): Expand elements before which body isn’t elided (#8877)
**Description:**

For example, transforming `<body><noscript>` to `<noscript>` would
incorrectly change the meaning so `<noscript>` is parsed as a child of
`<head>`.

Reference: [§13.2.6.4.4 The "in head" insertion
mode](https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead),
[13.2.6.4.6 The "after head" insertion
mode](https://html.spec.whatwg.org/multipage/parsing.html#the-after-head-insertion-mode).

**Related issue:**

- Closes #8876.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2024-04-19 12:52:16 +00:00
SWC Bot
0036f74205 chore: Bump crates 2024-04-18 05:00:08 +00:00
Donny/강동윤
6e9d1a4ebf
fix(es/helpers): Fix resolving of usingCtx helper (#8874)
**Related issue:**

 - Closes #8872
2024-04-18 04:58:21 +00:00
SWC Bot
4410d62317 chore: Bump crates 2024-04-17 05:44:33 +00:00
Donny/강동윤
f9459a8adf
build(cargo): Update rustc to nightly-2024-04-16 (#8870) 2024-04-17 05:42:11 +00:00
강동윤 (Donny)
0f07acbc57 chore: Publish crates 2024-04-16 20:02:16 +09:00
SWC Bot
81c3c5ca9e chore: Bump crates 2024-04-16 10:46:02 +00:00
Donny/강동윤
a1c5415b3b
feat(es/transforms): Allocate stacks dynamically (#8867)
**Description:**

 - This PR introduces an in-tree testing system for Deno.
 - This PR adds `stacker` cargo-feature to `swc_ecma_utils`.

**Related issue:**

 - #1627
 - Closes #8840
2024-04-16 19:43:58 +09:00
Donny/강동윤
2075a23373
fix(es/codegen): Fix ascii_only for identifiers (#8866)
**Related issue:**

 - Closes #8852
2024-04-16 05:21:45 +00:00
Donny/강동윤
740c0bb00a
fix(es/minifier): Remove raw of strings after modification (#8865)
**Related issue:**

 - Closes #8864
2024-04-16 04:39:54 +00:00
SWC Bot
af19385097 chore: Bump crates 2024-04-16 03:07:23 +00:00
David E Disch
df2e056f29
refactor(es/minifier): Remove mangle.safari10 (#8857)
**Related issue:**

 - Closes #8837
2024-04-16 03:05:43 +00:00
SWC Bot
0af201043a chore: Bump crates 2024-04-16 02:24:47 +00:00
Donny/강동윤
ca9c76b46f
build(cargo): Update rustc to nightly-2024-04-03 (#8821) 2024-04-16 02:20:47 +00:00
SWC Bot
5f75019683 chore: Bump crates 2024-04-15 06:29:53 +00:00
Donny/강동윤
6d240768b1
fix(es/proposal): Update explicit resource management to match spec (#8860)
**Related issue:**

 - Closes #8853
2024-04-15 15:28:11 +09:00
SWC Bot
3de82531b2 chore: Bump crates 2024-04-15 05:03:24 +00:00
Donny/강동윤
fbd32fbff3
fix(es/parser): Fix span of BindingIdent (#8859)
**Related issue:**

 - Closes #8856
2024-04-15 05:01:36 +00:00
SWC Bot
59d18c30b4 chore: Bump crates 2024-04-13 02:39:50 +00:00
Austaras
f6ba92b033
fix(es/resolver): Correctly check strict mode (#8851)
**Related issue:**

 - Closes #8842
2024-04-13 02:38:10 +00:00
SWC Bot
d4b89db047 chore: Bump crates 2024-04-13 02:13:18 +00:00
magic-akari
7a89e5da3b
fix(es/minifier): Handle switch cases (#8854)
**Related issue:**

- Closes #8813
2024-04-13 02:11:32 +00:00
SWC Bot
fcc82a5a5b chore: Bump crates 2024-04-12 08:34:38 +00:00
Austaras
a7a32c4b6c
fix(es/utils): Preserve optional chain effect (#8850)
**Related issue:**

 - Closes #8844
2024-04-12 08:33:01 +00:00
SWC Bot
6bc4de6536 chore: Bump crates 2024-04-12 08:07:12 +00:00
Hana
62c4f5efb8
fix(es/plugin): Create tokio runtime only if necessary (#8845)
**Description:**

Create tokio runtime if it's not in an async context.

**Related issue:**

 - https://github.com/web-infra-dev/rspack/issues/6209

This maybe related to this issue, since creating new tokio runtime consumes a lot of system resource.
2024-04-12 08:05:34 +00:00
SWC Bot
586ab9a4a4 chore: Bump crates 2024-04-12 04:48:39 +00:00
magic-akari
c0d901eac6
doc(swc_core): Resolve build issue with --all-features flag (#8848)
**Related issue:**

- Closes #8829
2024-04-12 04:47:08 +00:00
SWC Bot
a5d1e579cb chore: Bump crates 2024-04-11 07:24:41 +00:00
Donny/강동윤
ea5d9cc524
test(es): Update conformance test suite from tsc (#8834) 2024-04-11 07:22:56 +00:00
SWC Bot
b103184832 chore: Bump crates 2024-04-11 01:05:09 +00:00
David Sherret
e8c63447f6
refactor(es/decorator): Remove unsafe code (#8839) 2024-04-11 01:03:29 +00:00
SWC Bot
62cd932f32 chore: Bump crates 2024-04-11 00:37:21 +00:00
magic-akari
5cc585b8f3
fix(es/compat): Handle class fields correctly (#8835)
**Related issue:**

- Closes #8830
2024-04-11 00:35:27 +00:00
SWC Bot
645a5e4492 chore: Bump crates 2024-04-10 23:44:44 +00:00
David Sherret
3a51140dd7
refactor(es): Make the code compile with miri (#8836) 2024-04-10 23:43:07 +00:00
SWC Bot
c90c199479 chore: Bump crates 2024-04-10 23:01:59 +00:00
David Sherret
b1973d490a
refactor(visit): Simplify Vec::move_map (#8838) 2024-04-10 23:00:14 +00:00
SWC Bot
487992d9fa chore: Bump crates 2024-04-09 06:24:27 +00:00
Donny/강동윤
ebb68db24d
fix(es/minifier): Abort IIFE invoker in function parameters (#8828)
**Related issue:**

 - Closes #8826
2024-04-09 15:22:38 +09:00
SWC Bot
bc9c90332f chore: Bump crates 2024-04-09 01:53:14 +00:00
David Sherret
9ed93c17cd
fix(es/decorators): Fix capacity overflow with decorators (#8818) 2024-04-09 01:51:21 +00:00
SWC Bot
8f9aadde38 chore: Bump crates 2024-04-09 01:22:59 +00:00
David Sherret
dc046572de
fix(visit): Improve Map implementation for Box (#8819)
**Related issue (if exists):**

 - Closes #8817
2024-04-09 01:21:03 +00:00
SWC Bot
e63b39bbcd chore: Bump crates 2024-04-08 16:06:33 +00:00
Donny/강동윤
e1f770463d
fix(es/module): Respect module.resolveFully in more cases (#8820)
**Related issue:**

 - Closes #8742
2024-04-08 16:04:15 +00:00
SWC Bot
b511cea273 chore: Bump crates 2024-04-08 15:21:09 +00:00