Commit Graph

1029 Commits

Author SHA1 Message Date
Donny/강동윤
a417ff4d86
feat(allocator): Add maybe types (#9278) 2024-07-19 13:22:34 +09:00
SWC Bot
04d8a369cd chore: Bump crates
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
Bot / Start (push) Waiting to run
2024-07-18 04:02:00 +00:00
Donny/강동윤
9a6367b0f6
fix(es/minifier): Support minifying JSX (#9271)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9204
2024-07-18 12:50:59 +09:00
강동윤 (Donny)
aea4f45c73 chore: Publish crates 2024-07-18 08:31:54 +09:00
SWC Bot
5a218f7c09 chore: Bump crates
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
Bot / Start (push) Waiting to run
2024-07-16 03:42:12 +00:00
SWC Bot
f6f359e0a7 chore: Bump crates 2024-07-16 02:49:52 +00:00
SWC Bot
fd94562f02 chore: Bump crates 2024-07-12 04:14:55 +00:00
Donny/강동윤
e7358e0f81 refactor(es): Use into for AST construction (#9197)
**Description:**

This PR changes the AST node construction code to use `.into()` or `::from()` to make changing the boxed-ness of the AST node easier. I used `ast-grep` to make large changes across codebase.
2024-07-12 13:13:20 +09:00
Donny/강동윤
b2491e5461 refactor(common): Drop SyntaxContext from AST nodes (#9175) 2024-07-12 13:13:20 +09:00
SWC Bot
b4dbe0be06 chore: Bump crates
Some checks are pending
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_plugin_runner os:windows-latest runner:windows-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_plugin_testing os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_plugin_testing os:windows-latest runner:windows-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_timer os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_trace_macro os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_transform_common os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_typescript os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_visit os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_visit_macros os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_x_optimizer os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_xml os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_xml_ast os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_xml_codegen os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_xml_codegen_macros os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_xml_parser os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:swc_xml_visit os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:testing os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (map[crate:testing_macros os:ubuntu-latest runner:ubuntu-latest]) (push) Waiting to run
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
Bot / Start (push) Waiting to run
2024-07-11 16:17:45 +00:00
Donny/강동윤
92879b14fe
perf(es/visit): Introduce standard_only_* macros (#9207)
**Description:**

These macros are optimization hint on release builds.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9204
2024-07-11 16:16:05 +00:00
CPunisher
1357531805
fix(es/compat): Consider only the variables used in the closure (#9151)
**Description:**

The original code separately records the usage of variables and checks if there is a closure. Changed to only record variables used in a closure.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/8010
2024-07-08 22:01:24 +09:00
강동윤 (Donny)
47a79485d9 chore: Revert bump crates
This reverts commit 97b92aa6ff.
2024-06-29 18:28:54 +09:00
SWC Bot
97b92aa6ff chore: Bump crates 2024-06-29 09:26:51 +00:00
강동윤 (Donny)
56f03675bc chore: Publish crates for EsSyntax fix
Some checks are pending
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 / List crates (push) Waiting to run
Benchmark / Bench ${{ matrix.crate }} (push) Blocked by required conditions
Benchmark / Process result (push) Blocked by required conditions
Bot / Start (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-apple-darwin cp ../../bindings/target/x86_64-apple-darwin/release/swc . chmod +x ./swc… (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:export CARGO_PROFILE_RELEASE_LTO=false yarn build --target x86_64-pc-windows-msvc cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-pc-w… (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:export DISABLE_PLUGIN_E2E_TESTS=true export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=256 export CARGO_PROFILE_RELEASE_LTO=false cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --relea… (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:export DISABLE_PLUGIN_E2E_TESTS=true export CARGO_PROFILE_RELEASE_LTO=false cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --target i686-pc-windows-msvc cp ../../bindi… (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:export DISABLE_PLUGIN_E2E_TESTS=true yarn napi build --bin swc --release --target armv7-unknown-linux-gnueabihf --manifest-path ../../bindings/swc_cli/Cargo.toml -x --target-dir ../release -o … (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:export JEMALLOC_SYS_WITH_LG_PAGE=16 && rustup toolchain install $(cat ../../rust-toolchain) && rustup target add aarch64-unknown-linux-musl && RUSTFLAGS='-C target-feature=+crt-static -C link-… (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:set -e && export CARGO_PROFILE_RELEASE_LTO=false && RUSTFLAGS='-C target-feature=+sse2' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_6… (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:set -e && export JEMALLOC_SYS_WITH_LG_PAGE=16 && rustup target add aarch64-unknown-linux-gnu && RUSTFLAGS='' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features … (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:set -e && unset CC_x86_64_unknown_linux_gnu && unset CC && RUSTFLAGS='-C target-feature=+sse2' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --targe… (push) Waiting to run
Publish (core) / stable - ${{ matrix.settings.target }} - node@20 (map[build:sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*; export CC=$(xcrun -f clang); export CXX=$(xcrun -f clang++); SYSROOT=$(xcrun --sdk macosx --show-sdk-path); export CFLAGS="-isysroot $SY… (push) Waiting to run
Publish (core) / Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} (18, map[host:macos-latest target:x86_64-apple-darwin]) (push) Blocked by required conditions
Publish (core) / Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} (18, map[host:windows-latest target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
Publish (core) / Test bindings on Linux-x64-gnu - node@${{ matrix.node }} (18) (push) Blocked by required conditions
Publish (core) / Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} (18) (push) Blocked by required conditions
Publish (core) / Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }} (18) (push) Blocked by required conditions
Publish (core) / npm (push) Blocked by required conditions
Publish (core) / Build - wasm for node.js (push) Waiting to run
Publish (core) / Build - wasm for web (push) Waiting to run
2024-06-25 12:40:41 +09:00
SWC Bot
10eab94d81 chore: Bump crates 2024-06-14 14:47:30 +00:00
SWC Bot
931f752d54 chore: Bump crates 2024-06-14 05:24:10 +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)
7ac3b0a7dc chore: Bump crates 2024-04-29 09:56:27 +09:00
magic-akari
cc1432a12f
chore: Apply cargo autoinherit (#8902) 2024-04-29 00:54:45 +00:00
SWC Bot
f9106a50c0 chore: Bump crates 2024-04-24 00:37:30 +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
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
d1eb7b8136 chore: Bump crates 2024-04-04 06:12:30 +00:00
Donny/강동윤
207582ff25
chore(deps): Update dependencies (#8810) 2024-04-04 15:07:49 +09:00
SWC Bot
82d1b8e49a chore: Bump crates 2024-03-17 13:04:54 +00:00
SWC Bot
31ecd2a6c1 chore: Bump crates 2024-03-14 01:32:37 +00:00
SWC Bot
6e672aaf9a chore: Bump crates 2024-03-13 03:08:09 +00:00
Donny/강동윤
633cd89bac
fix(es/proposal): Fix var placement for using transform (#8732)
**Related issue:**

 - Closes #8629
2024-03-13 03:06:29 +00:00
SWC Bot
e46dd5a208 chore: Bump crates 2024-03-12 06:00:28 +00:00
SWC Bot
2ff26e05d2 chore: Bump crates 2024-03-11 04:29:01 +00:00
SWC Bot
90aaabaf15 chore: Bump crates 2024-03-06 04:41:56 +00:00
SWC Bot
98aa9824d5 chore: Bump crates 2024-03-04 10:08:47 +00:00
SWC Bot
7a5c7df195 chore: Bump crates 2024-03-04 07:48:09 +00:00
SWC Bot
5dc40d347b chore: Bump crates 2024-03-02 10:24:52 +00:00
SWC Bot
1603569a75 chore: Bump crates 2024-02-26 02:49:45 +00:00
SWC Bot
4154cfa8cb chore: Bump crates 2024-02-23 00:15:59 +00:00
SWC Bot
7c5113b6a9 chore: Bump crates 2024-02-22 02:56:23 +00:00
SWC Bot
359ae7a16a chore: Bump crates 2024-02-21 10:22:20 +00:00
SWC Bot
5cab610db1 chore: Bump crates 2024-02-20 01:27:25 +00:00
SWC Bot
463cd3bf4c chore: Bump crates 2024-02-20 00:55:31 +00:00
Donny/강동윤
6fe6810c49
fix(es/compat): Split declaration and init in block-scoping pass (#8648)
**Description:**

This does not support 

```js
class Foo extends Bar {
    constructor() {
        for (const i of [1]) {
            setTimeout(() => {
                console.log(this)
            });
        }
        super();
    }
}
```

but it does not seem to be used in a real-world code.

**Related issue:**

 - Closes #8300
 - Closes #8311
2024-02-20 09:53:53 +09:00
SWC Bot
d7434beaf8 chore: Bump crates 2024-02-19 03:15:59 +00:00
SWC Bot
84c05b5eec chore: Bump crates 2024-02-14 03:23:28 +00:00
SWC Bot
6cca7cbfe8 chore: Bump crates 2024-02-13 05:14:07 +00:00
SWC Bot
906cca43c1 chore: Bump crates 2024-02-08 01:51:17 +00:00
SWC Bot
f7baf240ba chore: Bump crates 2024-02-07 07:25:27 +00:00
SWC Bot
7a3b5545cd chore: Bump crates 2024-02-06 02:47:51 +00:00
SWC Bot
3ee12cf56d chore: Bump crates 2024-02-06 02:12:03 +00:00