Commit Graph

7784 Commits

Author SHA1 Message Date
magic-akari
a80aec47ef
fix(es/compat): Handle single expression case in static block (#7944)
**Related issue:**

 - Closes #7922
2023-09-14 02:47:44 +00:00
SWC Bot
47388a047e chore: Publish crates 2023-09-14 02:17:21 +00:00
Brandon Dail
05ca19b844
fix(css/modules): Support composes when using multiple subclass selectors (#7949) 2023-09-14 02:14:58 +00:00
SWC Bot
418a2e3016 chore: Publish crates 2023-09-13 05:57:44 +00:00
Anders Kaseorg
b87ac646f8
fix(es/minifier): Parse a file as a module only if opts.module is true (#7943)
**Description:**

Previously it was impossible to minify non-strict code (e.g. `delete identifier;`) because `minify()` unconditionally parsed the input as a module regardless of the `module` setting.

**BREAKING CHANGE:**

`minify()` now respects the `module` parameter instead of ignoring it, so users who had been processing modules with `minify()` without passing `{ module: true }` will now need to pass it.

**Related issue**

 - Closes #6130.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-09-13 05:55:34 +00:00
SWC Bot
858a4f4a22 chore: Publish crates 2023-09-13 02:05:35 +00:00
Austaras
c091c5e295
feat(es/compat): Support pure_getters for optional_chaining (#7933)
**Related issue:**

 - Closes #7921
2023-09-13 02:03:41 +00:00
Donny/강동윤
26b01bd01b chore: Publish crates 2023-09-11 23:26:44 +09:00
Donny/강동윤
c8ac13e60c
chore: Publish v1.3.84 with swc_core v0.83.5 (#7937) 2023-09-11 23:21:02 +09:00
SWC Bot
0d0f04689c chore: Publish crates 2023-09-11 08:33:49 +00:00
Donny/강동윤
dac8888829
fix(es/codegen): Use emitAssertForImportAttributes (#7936)
**Description:**

 - Add `format.emitAssertForImportAttributes` to `minify()`
 - Use `jsc.experimental. emitAssertForImportAttributes`.

**Related issue (if exists):**

 - Closes #7926
 - Closes #7928
2023-09-11 08:31:46 +00:00
SWC Bot
5431010c75 chore: Publish crates 2023-09-10 07:00:21 +00:00
magic-akari
2da58959c2
fix(es/codegen): Emit leading comments for ExprStmt (#7916) 2023-09-10 06:58:26 +00:00
SWC Bot
3210556c7e chore: Publish crates 2023-09-10 06:29:19 +00:00
Austaras
97068e12d1
fix(es/compat): Visit assign expr in generator (#7932)
**Related issue:**
 - Closes #7809
2023-09-10 06:27:30 +00:00
Donny/강동윤
d15eaf05cd chore: Publish @swc/helpers@0.5.2
- Fixes #7919.
2023-09-07 16:08:44 +09:00
Donny/강동윤
8bb2925e23 chore: Publish crates 2023-09-07 10:23:00 +09:00
Donny/강동윤
3b10b7532d
chore: Publish v1.3.83 with swc_core v0.83.2 (#7920) 2023-09-07 10:20:12 +09:00
SWC Bot
8bb911269c chore: Publish crates 2023-09-06 17:31:41 +00:00
Donny/강동윤
a86e9f3bb5
fix(es/module): Fix jsc.paths for projects using pnpm (#7918)
**Related issue:**

- x-ref: https://vercel.slack.com/archives/C04DUD7EB1B/p1693911653100299?thread_ts=1693819683.070959&cid=C04DUD7EB1B
2023-09-06 17:29:47 +00:00
SWC Bot
5c005256d6 chore: Publish crates 2023-09-06 10:26:13 +00:00
Kei Sakamoto
0db25a252c
fix(css/modules): Aggregate class names when composes is chained. (#7917)
**Description:**

aggregate class names when composes is chained.

**Related issue:**

 - Closes #7737
 - https://github.com/web-infra-dev/rspack/issues/3875
2023-09-06 19:24:26 +09:00
SWC Bot
4623b3e07f chore: Publish crates 2023-09-05 12:26:15 +00:00
Donny/강동윤
ee7575695d
feat(es/codegen): Add an option to print assert for import attributes (#7914)
**Description:**

- `jsc.experimental.keepImportAssertions` is renamed to `jsc.experimental.keepImportAttributes`.
 - `jsc.experimental.emitAssertForImportAttributes` is added.

**Related issue:**

 - Closes #7908
2023-09-05 21:24:25 +09:00
SWC Bot
92d08c38e2 chore: Publish crates 2023-09-01 05:26:46 +00:00
Donny/강동윤
85d6e9be07
fix(es/module): Revert #7901 (#7906)
**Description:**

I'm reverting #7901 because it caused a regression in next.js CI.
https://github.com/vercel/next.js/pull/54653


**Related issue:**

 - Reverts #7901.
2023-09-01 14:24:50 +09:00
Donny/강동윤
fd1c0cfdae chore: Publish crates 2023-09-01 11:36:14 +09:00
Donny/강동윤
7d2a3015dc
chore: Publish v1.3.82 with swc_core v0.82.10 (#7905) 2023-09-01 11:35:07 +09:00
SWC Bot
d1ec49e3e5 chore: Publish crates 2023-08-31 13:25:10 +00:00
Donny/강동윤
aa6495519b
fix(common): Fix logic for excluding FileName from source maps (#7900)
**Description:**

This PR also modifies React transform to use `FileName::Internal` and makes `SourceMapGenConfig` skips `FileName::Internal`.

**Related issue:**

 - Closes #5272
2023-08-31 13:23:11 +00:00
SWC Bot
e5f7a9dab0 chore: Publish crates 2023-08-31 07:26:53 +00:00
Donny/강동윤
c714dd20de
fix(es/module): Make jsc.paths fully resolve TypeScript files (#7901)
**Related issue:**

 - Closes #7861
 - Closes #7898
2023-08-31 07:24:12 +00:00
SWC Bot
482306086d chore: Publish crates 2023-08-31 05:56:04 +00:00
Austaras
2db10e9fd1
fix(es/resolver): Correctly resolve global value (#7893)
**Related issue:**

 - Closes #7685
2023-08-31 05:54:18 +00:00
Donny/강동윤
15d3900f60 chore: Publish crates 2023-08-30 21:08:25 +09:00
Donny/강동윤
feb36e61ff
chore: Publish v1.3.81 with swc_core v0.82.7 (#7895) 2023-08-30 21:07:19 +09:00
SWC Bot
3127ad9515 chore: Publish crates 2023-08-30 10:15:47 +00:00
Donny/강동윤
5fbc251db1
fix(es/module): Don't create absolute paths for jsc.paths on Windows (#7892)
**Related issue:**

 - Closes #7806
2023-08-30 10:11:34 +00:00
SWC Bot
766d3e8896 chore: Publish crates 2023-08-30 03:03:30 +00:00
Austaras
8db968a25d
refactor(es/minifier): Remove mutated and mutation_by_call_count (#7890)
**Description:**

`mutated` can be seen as a combination of `reassigned` and `has_property_mutation`, and `mutation_by_call_count` is simply useless.
2023-08-30 03:01:29 +00:00
SWC Bot
853b4803ad chore: Publish crates 2023-08-30 02:26:08 +00:00
Donny/강동윤
01cbd6edbd
chore(deps): Update memchr (#7891) 2023-08-30 02:23:57 +00:00
SWC Bot
aa8ad10ad8 chore: Publish crates 2023-08-29 10:23:30 +00:00
Austaras
87a47bfb2c
fix(es/minifier): Report is_fn_local even if var is hoisted (#7876)
**Related issue:**
 - Closes #7847
2023-08-29 10:21:14 +00:00
SWC Bot
c31f05a675 chore: Publish crates 2023-08-29 05:47:51 +00:00
Donny/강동윤
4b33d41fab
fix(es/compat): Make SwitchCase handler of block-scoping stateless (#7888)
**Related issue:**

 - Closes #7885
2023-08-29 05:45:13 +00:00
SWC Bot
4a2c24bbec chore: Publish crates 2023-08-29 05:06:03 +00:00
Donny/강동윤
a50501255d
perf(es/transforms): Remove wrong parallelism (#7889) 2023-08-29 05:04:11 +00:00
SWC Bot
3e41468a3a chore: Publish crates 2023-08-29 01:41:18 +00:00
David Sherret
057bd5f3ef
fix(es/dep-graph): Analyze import type children (#7883)
**Description:**

It was not analyzing children of a dynamic imports.
2023-08-29 01:39:05 +00:00