Commit Graph

9712 Commits

Author SHA1 Message Date
canalun
8263da1766
fix(es/minifier): Compress consecutive return statements properly (#9620)
**Description:**

Compress consecutive return statements properly.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9619
2024-10-08 07:58:16 +09:00
Sébastien Lorber
7b98bb5e93
fix(html/minifier): Fix HTML minifier TS types (#9615)
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
**Description:**

 - `preserveComments` is optional but required in the TS type

 - `removeRedundantAttributes` is an enum and passing a boolean leads to errors

See https://github.com/swc-project/swc/blob/main/crates/swc_html_minifier/src/option.rs#L54

**Related issue:**

 - https://github.com/facebook/docusaurus/pull/10554
2024-10-06 18:05:16 +09:00
magic-akari
2480bb00fc
refactor(es/typescript): Simplifying enum and namespace transforms (#9558)
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
**Related issue:**

- Closes https://github.com/swc-project/swc/issues/4453
- Closes https://github.com/swc-project/swc/issues/9385
2024-10-04 18:46:26 +09:00
Donny/강동윤
ec0a62cbc5
perf(es): Avoid needless string comparisons (#9613)
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
2024-10-04 14:51:34 +09:00
Donny/강동윤
e2e9a9ccfc
chore(atoms): Update hstr (#9612) 2024-10-04 04:47:10 +00:00
SWC Bot
f15c7a64ce chore: Update changelog
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
2024-10-02 06:36:05 +00:00
SWC Bot
d24e99a473 chore: Publish 1.7.30-nightly-20241002.1 with swc_core v0.106.4 2024-10-02 06:36:04 +00:00
강동윤 (Donny)
253d7f472a chore: Publish crates with swc_core v0.106.4 2024-10-02 15:25:00 +09:00
Donny/강동윤
4ee45ac1fd
fix(es/module): Allow TypeScript nodes for Rewriter (#9606)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9592
2024-10-02 15:24:19 +09:00
magic-akari
866af6c947
perf(es/typescript): Reduce unnecessary visits (#9605) 2024-10-02 15:23:58 +09:00
Donny/강동윤
2f06fc559c
perf(es/codegen): Reduce usage of tracing::instrument (#9604)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9603
2024-10-02 15:10:03 +09:00
강동윤 (Donny)
8b8599776a chore: Use ubuntu-22.04 for benchmarks 2024-10-02 14:23:11 +09:00
Donny/강동윤
24c3a0ce13
perf(es/transforms): Copy benchmarks from oxc (#9602) 2024-10-02 03:07:28 +00:00
SWC Bot
a9868820de chore: Update changelog
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
2024-10-01 09:49:30 +00:00
SWC Bot
8c923377c4 chore: Publish 1.7.29 with swc_core v0.106.3 2024-10-01 09:49:29 +00:00
SWC Bot
ecf05a8579 chore: Publish 1.7.29-nightly-20241001.1 with swc_core v0.106.3 2024-10-01 08:52:25 +00:00
강동윤 (Donny)
7823b1028a chore: Bump crates 2024-10-01 17:44:37 +09:00
강동윤 (Donny)
d30b5ed695 chore: Publish crates with swc_core v0.106.3 2024-10-01 17:40:52 +09:00
Donny/강동윤
37004e735c
chore: Bump crates (#9599) 2024-10-01 17:40:23 +09:00
강동윤 (Donny)
feee0d84a6 chore: Fix git-cliff config 2024-10-01 17:32:16 +09:00
강동윤 (Donny)
f4c6fd8e4e chore: Publish crates with swc_core v0.106.2 2024-10-01 17:31:43 +09:00
Donny/강동윤
1659c212b2
fix(es/minifier): Ignore using declarations (#9598) 2024-10-01 08:09:39 +00:00
Donny/강동윤
f2b07665bf
feat(es): Add options to disable all esnext transforms and lints (#9597)
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
2024-10-01 14:00:59 +09:00
renovate[bot]
b28047a48b
fix(deps): update cargo (patch) (#9454)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [backtrace](https://redirect.github.com/rust-lang/backtrace-rs) |
dependencies | patch | `0.3.73` -> `0.3.74` |
| [backtrace](https://redirect.github.com/rust-lang/backtrace-rs) |
workspace.dependencies | patch | `0.3.73` -> `0.3.74` |
| [rkyv](https://redirect.github.com/rkyv/rkyv) | workspace.dependencies
| patch | `=0.7.44` -> `=0.7.45` |
| [stacker](https://redirect.github.com/rust-lang/stacker) |
dependencies | patch | `0.1.15` -> `0.1.17` |
| [swc_cli_impl](https://redirect.github.com/swc-project/swc) |
workspace.dependencies | patch | `0.24.0` -> `0.24.1` |
| [unicode-id](https://redirect.github.com/Boshen/unicode-id) |
workspace.dependencies | patch | `0.3.4` -> `0.3.5` |
| [unicode-width](https://redirect.github.com/unicode-rs/unicode-width)
| workspace.dependencies | patch | `0.1.13` -> `0.1.14` |

---

### Release Notes

<details>
<summary>rust-lang/backtrace-rs (backtrace)</summary>

###
[`v0.3.74`](https://redirect.github.com/rust-lang/backtrace-rs/releases/tag/0.3.74)

[Compare
Source](https://redirect.github.com/rust-lang/backtrace-rs/compare/0.3.73...0.3.74)

#### What's Changed

- QNX Neutrino 7.0 support, thanks to
[@&#8203;nyurik](https://redirect.github.com/nyurik) in
[https://github.com/rust-lang/backtrace-rs/pull/648](https://redirect.github.com/rust-lang/backtrace-rs/pull/648)
- Cleaned up our Android support. This should massively improve
backtraces for ones with the API level sufficient to ship with
libunwind, etc. Unfortunately, it comes at the cost of dropping support
for older ones! Thanks to
[@&#8203;fengys](https://redirect.github.com/fengys) in
[https://github.com/rust-lang/backtrace-rs/pull/656](https://redirect.github.com/rust-lang/backtrace-rs/pull/656)
- Made PrintFmt, which was using the `Enum::__NonExhaustiveVariant`
pattern, use `#[non_exhaustive]` for real. Don't @&#8203; me if you were
matching on that! Thanks to
[@&#8203;nyurik](https://redirect.github.com/nyurik) in
[https://github.com/rust-lang/backtrace-rs/pull/651](https://redirect.github.com/rust-lang/backtrace-rs/pull/651)
- Massively cleaned up the windows code! We moved from winapi to
windows-sys with windows-targets thanks to
[@&#8203;CraftSpider](https://redirect.github.com/CraftSpider) and
[@&#8203;ChrisDenton](https://redirect.github.com/ChrisDenton) in
- Don't cast HANDLE to usize and back by
[@&#8203;CraftSpider](https://redirect.github.com/CraftSpider) in
[https://github.com/rust-lang/backtrace-rs/pull/635](https://redirect.github.com/rust-lang/backtrace-rs/pull/635)
- Switch from `winapi` to `windows-sys` by
[@&#8203;CraftSpider](https://redirect.github.com/CraftSpider) in
[https://github.com/rust-lang/backtrace-rs/pull/641](https://redirect.github.com/rust-lang/backtrace-rs/pull/641)
- Update windows bindings and use windows-targets by
[@&#8203;ChrisDenton](https://redirect.github.com/ChrisDenton) in
[https://github.com/rust-lang/backtrace-rs/pull/653](https://redirect.github.com/rust-lang/backtrace-rs/pull/653)
- A bunch of updated dependencies. Thanks
[@&#8203;djc](https://redirect.github.com/djc) and
[@&#8203;khuey](https://redirect.github.com/khuey)!
- Sorry if you were testing this code in miri! It started yelling about
sussy casts. A lot. We did a bunch of internal cleanups that should make
it quiet down, thanks to
[@&#8203;workingjubilee](https://redirect.github.com/workingjubilee) in
[https://github.com/rust-lang/backtrace-rs/pull/641](https://redirect.github.com/rust-lang/backtrace-rs/pull/641)
- Uhhh we had to tweak `dl_iterate_phdr` in
[https://github.com/rust-lang/backtrace-rs/pull/660](https://redirect.github.com/rust-lang/backtrace-rs/pull/660)
after Android revealed it was... kind of unsound actually and not doing
things like checking for null pointers before making slices! WHOOPS!
Thanks to [@&#8203;saethlin](https://redirect.github.com/saethlin) for
implementing detection for precisely that in rustc! It's really hard to
find soundness issues in inherited codebases like this one...

#### New Contributors

- [@&#8203;CraftSpider](https://redirect.github.com/CraftSpider) made
their first contribution in
[https://github.com/rust-lang/backtrace-rs/pull/635](https://redirect.github.com/rust-lang/backtrace-rs/pull/635)
- [@&#8203;fengys1996](https://redirect.github.com/fengys1996) made
their first contribution in
[https://github.com/rust-lang/backtrace-rs/pull/656](https://redirect.github.com/rust-lang/backtrace-rs/pull/656)
- [@&#8203;djc](https://redirect.github.com/djc) made their first
contribution in
[https://github.com/rust-lang/backtrace-rs/pull/657](https://redirect.github.com/rust-lang/backtrace-rs/pull/657)

**Full Changelog**:
https://github.com/rust-lang/backtrace-rs/compare/0.3.73...0.3.74

</details>

<details>
<summary>rust-lang/stacker (stacker)</summary>

###
[`v0.1.17`](https://redirect.github.com/rust-lang/stacker/compare/stacker-0.1.16...stacker-0.1.17)

[Compare
Source](https://redirect.github.com/rust-lang/stacker/compare/stacker-0.1.16...stacker-0.1.17)

###
[`v0.1.16`](https://redirect.github.com/rust-lang/stacker/compare/stacker-0.1.15...stacker-0.1.16)

[Compare
Source](https://redirect.github.com/rust-lang/stacker/compare/stacker-0.1.15...stacker-0.1.16)

</details>

<details>
<summary>unicode-rs/unicode-width (unicode-width)</summary>

###
[`v0.1.14`](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14)

[Compare
Source](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/swc-project/swc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 12:12:42 +09:00
강동윤 (Donny)
96e36569ee chore: Configure git-cliff 2024-10-01 11:49:41 +09:00
강동윤 (Donny)
a0c0ceecfe chore: Publish crates with swc_core v0.106.1 2024-10-01 11:48:41 +09:00
Donny/강동윤
8d18935c6d
chore: Git tag while bumping crates (#9596) 2024-10-01 11:46:27 +09:00
CPunisher
3d9d641f8b
fix(es/codegen): Emit .d.ts when using --out-file (#9582)
**Related issue:**

Closes https://github.com/swc-project/swc/issues/9512
2024-10-01 11:43:50 +09:00
CPunisher
77900d808e
fix(es/parser): Fix failure of TS instantiation followed by satisfies (#9583)
**Related issue:**

it's already ok when followed by `as`.

Closes https://github.com/swc-project/swc/issues/8627
2024-10-01 11:41:58 +09:00
Victor Freitas
74e3d0466a
fix(es/module): Fix jsc.paths using absolute paths with dots in a filename for an alias (#9595)
**Description:**

- Resolves `jsc.paths` using an absolute filename with dots

**Related issue:**

- Closes https://github.com/swc-project/swc/issues/9591
2024-10-01 11:12:26 +09:00
Donny/강동윤
b94a0e1fd2
chore(es): Add helpers (#9586)
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
**Description:**

This is a part of https://github.com/swc-project/swc/pull/9585. I extracted this as a separate PR to make WIP small.
2024-09-25 15:58:19 +09:00
SWC Bot
0a5a2d44cb chore: Update changelog
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
2024-09-24 11:30:21 +00:00
SWC Bot
6be7166c16 chore: Publish 1.7.28 with swc_core v0.106.0 2024-09-24 11:30:20 +00:00
SWC Bot
8811879f3b chore: Publish 1.7.28-nightly-20240924.1 with swc_core v0.106.0 2024-09-24 10:31:16 +00:00
강동윤 (Donny)
0ca3f2b906 chore: Publish crates with swc_core v0.106.0 2024-09-24 18:19:59 +09:00
강동윤 (Donny)
5581148d60 chore: Fix graph creation of cargo bump 2024-09-24 18:18:27 +09:00
magic-akari
14cfd70ee0
fix(es/compat): Skip getter and setter as FlowHelper function do (#9580)
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
**Related issue:**

- Closes: #9579 
- https://github.com/swc-project/swc/issues/9161#issuecomment-2211641985
2024-09-24 03:58:24 +09:00
CPunisher
fc0ba2a084
fix(es/module): Rewrite import specifier in type declaration (#9577)
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
**Description:**

Use `Arc<dyn ImportResolver>` to reduce cost

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9548
2024-09-23 11:32:52 +09:00
CPunisher
cf74382ba0
fix(es/codegen): Fix wrong sourcemap when there are new lines in tpl (#9578)
**Description:**

1. split quasi by '\n' 
2. add the mapping between the original string and the generated string one by one.

<img width="873" alt="image"
src="https://github.com/user-attachments/assets/8a03da7f-2d22-4dd5-9bac-220418b10911">

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9567
2024-09-23 11:02:24 +09:00
jinrui
185d6f55b3
fix(ast): Add archive(check_bytes) to all relevant AST types (#9574)
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
**Description:**

1. all struct that support rkyv add `archive(check_bytes)`
2. all recursive struct that support rkyv add check_bytes bound

this PR will fix the error reported in https://github.com/swc-project/swc/pull/9562
2024-09-20 16:46:05 +09:00
Donny/강동윤
04016e9687
fix(es/minifier): Check variable type while optimizing += (#9575)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9504
2024-09-20 16:43:53 +09:00
Donny/강동윤
6d15d9c2eb
fix(es/isolated-dts): Preserve comments (#9572)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9550
2024-09-20 05:44:20 +00:00
강동윤 (Donny)
25d9e04a6c chore: Fix infinite recursion of releaser
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
2024-09-19 14:23:13 +09:00
Donny/강동윤
b7e055e2ab
chore: Stabilize some crates (#9570) 2024-09-19 14:19:06 +09:00
Donny/강동윤
a5e6a069c6
chore: Drop dependency on cargo-mono (#9569)
**Description:**

We now have bump command inline.
2024-09-19 14:14:30 +09:00
강동윤 (Donny)
f637f83eb8 chore: Publish crates with swc_core v0.105.0 2024-09-19 13:12:01 +09:00
강동윤 (Donny)
c6cc9b6588 chore: Run yarn changelog while bumping crates 2024-09-19 13:03:25 +09:00
jinrui
c36871a848
fix(plugin): Don't panic when ast byte not match (#9562)
**Description:**

1. Disable rkyv strict feature, it is useless in swc.
2. Archived_root will panic if the wasm plugin ast binary not match core ast, so use safe api to avoid panic when mismatch. Implementation reference: https://github.com/rkyv/rkyv/blob/v0.7.43/examples/json/src/main.rs#L57-L76
2024-09-19 13:01:11 +09:00
강동윤 (Donny)
dbfcbf182a chore: Publish crates with swc_core v0.104.3 2024-09-19 12:57:38 +09:00
pan93412
85cc2bd79c
fix(cli): Exclude non-files from get_files_list (#9560)
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
**Description:**

`get_files_list` does not check if a path with the `extensions` is really a file.


**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9559
2024-09-17 04:37:35 +00:00