Commit Graph

645 Commits

Author SHA1 Message Date
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/강동윤
e7b9c552a7
chore(ci): Configure codspeed (#9189) 2024-07-10 15:20:27 +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/강동윤
2a0ebec0f5
fix(es/lexer): Fix lexing of \r\n in JSX (#9112)
**Description:**

I made a mistake while working on the performance of the lexer.


**Related issue:**

 - Closes #9106
2024-06-29 18:24:51 +09: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
Donny/강동윤
5520b236dd
refactor(es/parser): Rename EsConfig and TsConfig (#9094)
**Description:**

`EsConfig` and `TsConfig` sound like a general configuration for the whole language, while actually it's only about parsing.

To avoid a breaking change, I created type aliases that will work without changing the code, while warning the users.

**Related issue:**

 - Closes #9089.
2024-06-22 01:56:37 +09:00
SWC Bot
10eab94d81 chore: Bump crates 2024-06-14 14:47:30 +00:00
Luca Casonato
6306778512
refactor(es/ast): Remove unused fields of TsPropertySignature (#8955)
**Description:**

TsPropertySignature can not have params, type params, or an initializer.

**BREAKING CHANGE:**

Yes. Any users looking into these fields should stop - they are always empty.

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
2024-06-14 21:57:10 +09:00
SWC Bot
931f752d54 chore: Bump crates 2024-06-14 05:24:10 +00:00
Donny/강동윤
60fe5f0eff
perf(es/parser): Do not track raw by hand (#9047)
**Description:**

We can skip this logic completely, as it's `raw`.

~I'm under the impression that I'm super stupid~
2024-06-14 14:22:26 +09:00
SWC Bot
9d2e1cee0b chore: Bump crates 2024-06-12 00:44:35 +00:00
David Sherret
91e92ececa
fix(es/codegen): Emit named type in mapped types (#9038)
**Description:**

Fixes the emit of mapped types.
2024-06-12 00:42:40 +00:00
Donny/강동윤
a4567998b0
fix(es/codegen): Accept &impl Node instead of impl Node (#8969) 2024-05-23 12:13:13 +09:00
SWC Bot
85e4eaa507 chore: Bump crates 2024-05-23 02:25:14 +00:00
Donny/강동윤
e80fd41ea8
feat(es/codegen): Add to_code (#8968)
**Description:**

This is a utility function for printing an AST node as a string
2024-05-23 02:23:32 +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
강동윤 (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
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
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
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/강동윤
2075a23373
fix(es/codegen): Fix ascii_only for identifiers (#8866)
**Related issue:**

 - Closes #8852
2024-04-16 05:21:45 +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
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
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
dbf930a2c9 chore: Bump crates 2024-03-25 04:20:57 +00:00
Donny/강동윤
f8681c9299
chore(deps): Update sourcemap to v8.0.0 (#8771)
**Related issue:**

 - https://github.com/getsentry/rust-sourcemap/pull/77
2024-03-25 13:18: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
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
David Sherret
64c9b8f4f1
fix(es/codegen): Emit namespace keyword of TsModuleDecl if possible (#8676)
**Description:** 

Emits the namespace keyword for TsModuleDecls when able.

Been meaning to open a PR for this one for a while, but the module
keyword may be deprecated in the future in TS in non-ambient modules, so
it's better to do this.
2024-03-02 10:48:30 +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
xc2
e1791340cd
fix(es/codegen): Fix replacement when inline_script is on (#8659)
**Description:**


The replacements for `inline_script` might be with mistake


40682c8d1f/crates/swc_ecma_codegen/src/lib.rs (L649)

which in terser is:

![image](https://github.com/swc-project/swc/assets/18117084/e843e125-c001-44d1-9572-15bec355a34e)



0ef05847fa/lib/output.js (L414)


**Related issue:**

https://github.com/web-infra-dev/rspack/issues/5757
2024-02-26 02:48:06 +00:00
SWC Bot
4154cfa8cb chore: Bump crates 2024-02-23 00:15:59 +00:00
David Sherret
66bf8e907d
fix(es/codegen): Emit computed getter and setter signatures (#8656)
**Description:**

Emits computed getter/setter signatures.
2024-02-23 00:14:29 +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
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