Commit Graph

8982 Commits

Author SHA1 Message Date
강동윤 (Donny)
5625bd64bd chore: Bump crates 2024-06-21 20:21:43 +09:00
강동윤 (Donny)
63fd29e799 chore: Workaround a bug of cargo-mono 2024-06-21 20:18:01 +09:00
Luca Casonato
5a2c968720
chore(deps): Replace sha-1 with sha1 (#9091)
They renamed the crate: https://github.com/RustCrypto/hashes?tab=readme-ov-file#crate-names
2024-06-21 11:17:50 +00:00
Donny/강동윤
a8551592b2
feat(typescript): Implement Isolated Declaration (#9086)
**Description:**

This PR adds TypeScript Isolated Declarations implementation by forking Deno's implementation.
2024-06-21 09:54:59 +00:00
SWC Bot
568b3b37a5 chore: Bump crates 2024-06-21 08:51:36 +00:00
Donny/강동윤
e423d1bced
feat(common): Add fallible methods to swc_common::SourceMap (#9090)
**Description:**

This PR will make `swc_ecma_codegen` not `panic` for invalid spans.
2024-06-21 17:49:43 +09:00
Donny/강동윤
56f128fc03
chore: Add a crate swc_typescript (#9085)
**Description:**

This crate will be used for TypeScript Isolated Declaration support
2024-06-21 12:45:53 +09:00
SWC Bot
810461eaa7 chore: Bump crates 2024-06-19 06:21:32 +00:00
Donny/강동윤
bad7da2bfd
chore: Update new_debug_unreachable (#9083) 2024-06-19 06:19:50 +00:00
강동윤 (Donny)
a040835830 chore: Update changelog 2024-06-19 13:04:03 +09:00
강동윤 (Donny)
60ae1f75b5 chore: Publish 1.6.3 with swc_core v0.95.4 2024-06-19 13:03:59 +09:00
SWC Bot
929d029e3f chore: Bump crates 2024-06-19 01:14:26 +00:00
Donny/강동윤
af586069a9
perf(es/lexer): Add fast-path to jsx lexer (#9081) 2024-06-19 01:12:37 +00:00
SWC Bot
1839980185 chore: Bump crates 2024-06-19 00:45:47 +00:00
Donny/강동윤
238f1c50e5
perf(es/lexer): Add a fast-path to template literal lexer (#9080)
**Description:**

We don't need to allocate at all in the fast path.
2024-06-19 00:43:57 +00:00
SWC Bot
8915c621a3 chore: Bump crates 2024-06-18 08:55:30 +00:00
Donny/강동윤
69f00b85d4
perf(es/lexer): Reduce allocation while lexing identifiers (#9076)
**Description:**

In the fast path, we don't even use the buffer.

```
Benchmarking es/lexer/cal-com
Benchmarking es/lexer/cal-com: Warming up for 3.0000 s
Benchmarking es/lexer/cal-com: Collecting 100 samples in estimated 5.5395 s (900 iterations)
Benchmarking es/lexer/cal-com: Analyzing
es/lexer/cal-com        time:   [6.1799 ms 6.2010 ms 6.2250 ms]
                        change: [-4.4027% -3.9504% -3.5372%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 17 outliers among 100 measurements (17.00%)
  4 (4.00%) high mild
  13 (13.00%) high severe

```
2024-06-18 08:53:59 +00:00
SWC Bot
c3e6333725 chore: Bump crates 2024-06-18 08:28:55 +00:00
Donny/강동윤
373bac55aa
perf(es/lexer): Make lexing of string literals faster (#9077)
**Description:**

We don't need to push a character at a time. This profiling result does not include improvements from
https://github.com/swc-project/swc/pull/9076.

```
Benchmarking es/lexer/cal-com
es/lexer/cal-com        time:   [6.4555 ms 6.4936 ms 6.5368 ms]
```
2024-06-18 17:27:17 +09:00
SWC Bot
c0d40c6a51 chore: Bump crates 2024-06-18 07:34:18 +00:00
Donny/강동윤
6426928b91
perf(es/lexer): Optimize lexer (#9075)
**Description:**

 - `TokenContext` is now 1 byte.
 - `read_word_with` now uses `&dyn` instead of `impl FnOnce`.
2024-06-18 07:32:32 +00:00
SWC Bot
ddaafe00e0 chore: Bump crates 2024-06-18 05:16:23 +00:00
Donny/강동윤
cfe3ba306d
fix(es/decorators): Reduce the number of sourcemap mappings (#9074)
**Description:**

Coverage gets better if we generate fewer source map entries. This PR only fixes the issue for `"coverageProvider": "v8"`. Much more work is required for the default coverage provider I guess.

**Related issue:**

 - #3854
2024-06-18 14:14:42 +09:00
SWC Bot
f78e540303 chore: Bump crates 2024-06-18 03:47:28 +00:00
Donny/강동윤
7698eaa006
perf(common): Use Chars in StringInput (#9073)
**Description:**

Now it's possible
2024-06-18 03:45:56 +00:00
SWC Bot
e383961579 chore: Bump crates 2024-06-18 03:21:43 +00:00
hardfist
8d37daedf1
fix(css/minifier): Don't tranform rotate deg (#9072)
**Description:**

Transform rotate deg will cause animation work differently, so don't do transform for rotate deg

**Related issue:**

 - Closes #9070
2024-06-18 03:20:02 +00:00
SWC Bot
071e5be80d chore: Bump crates 2024-06-18 02:56:14 +00:00
Donny/강동윤
c3a8c0b567
refactor(common): Simplify StringInput implementation (#9071) 2024-06-18 11:54:34 +09:00
강동윤 (Donny)
ae6ab656fa chore: Skip benchmark for chore: commits 2024-06-17 16:59:19 +09:00
Donny/강동윤
aa59ca3727
chore: Restore benchmark action (#9067)
**Description:**

Let's restore https://swc.rs/docs/benchmarks
2024-06-17 16:08:01 +09:00
Donny/강동윤
9463ba35cf
chore: Improve ecosystem-ci (#9068)
**Description:**

 - Move workspace of `swc-ecosystem-ci`.
 - Reduce overrides.
2024-06-17 15:38:56 +09:00
Donny/강동윤
2e153707a3
chore: Enable more tests for swc-ecosystem-ci (#9065) 2024-06-17 12:07:46 +09:00
Donny/강동윤
e755bce438
chore: Implement Verify release with ecosystem (#9064)
**Description:**

This is a follow-up PR for https://github.com/swc-project/swc/pull/9062. This PR integrates swc-ecosystem-ci to publish pipeline. For faster debugging, I disabled the build process.
2024-06-17 08:58:52 +09:00
Donny/강동윤
2122756394
chore: Implement Publish nightly to npm (#9062)
**Description:**

This is a follow-up PR of https://github.com/swc-project/swc/pull/9061
2024-06-16 22:07:37 +09:00
Donny/강동윤
e7ec1e541d
chore: Reduce cache of CI (#9063) 2024-06-16 20:19:40 +09:00
Donny/강동윤
886bf0e9c2
chore: Implement Determine nightly version (#9061)
**Description:**

This is a follow-up PR of https://github.com/swc-project/swc/pull/9060. I'll integrate `swc-ecosystem-ci` into publish pipeline to prevent regressions.
2024-06-16 19:29:18 +09:00
Donny/강동윤
79e737caac
chore: Prepare publish CI action (#9060)
**Description:**

I'm trying to build a publishing pipeline that verifies ecosystem packages before publishing.
2024-06-16 18:15:08 +09:00
강동윤 (Donny)
9013e8acc6 chore: Update changelog 2024-06-16 14:56:08 +09:00
강동윤 (Donny)
e640972dae chore: Publish 1.6.1 with swc_core v0.95.2 2024-06-16 14:56:06 +09:00
SWC Bot
f8c2c4791a chore: Bump crates 2024-06-16 05:31:45 +00:00
Donny/강동윤
cdd20cd163
fix(common): Revert Use SourceMap::adjust_mappings (#9058)
**Description:**

https://github.com/getsentry/rust-sourcemap/pull/91 should fix this
issue, but let's revert #9052 for now.

# Context

`swc_core` regressed.

Caught by https://github.com/vercel/next.js/pull/66902

```
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.34

 ✓ Checking validity of types
   Creating an optimized production build ...
Panic: PanicInfo { payload: Any { .. }, message: Some(attempt to add with overflow), location: Location { file: "/Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sourcemap-8.0.1/src/encoder.rs", line: 89, col: 13 }, can_unwind: true, force_no_backtrace: false }
Backtrace:    0: backtrace::backtrace::libunwind::trace
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5
      backtrace::backtrace::trace_unsynchronized::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5
      backtrace::backtrace::trace::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14
      <backtrace::capture::Backtrace>::create
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9
      <backtrace::capture::Backtrace>::new
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22
   1: next_swc_napi::init::{closure#0}
             at packages/next-swc/crates/napi/src/lib.rs:85:29
   2: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/alloc/src/boxed.rs:2077:9
      std::panicking::rust_panic_with_hook
             at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/std/src/panicking.rs:799:13
   3: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/std/src/panicking.rs
```
2024-06-16 14:30:01 +09:00
SWC Bot
11df9e9424 chore: Bump crates 2024-06-16 00:54:44 +00:00
Donny/강동윤
ca26eb796b
perf(es/parser): Reduce allocations while lexing numbers (#9057) 2024-06-16 09:52:53 +09:00
강동윤 (Donny)
064af5391d chore: Update changelog 2024-06-15 22:01:19 +09:00
강동윤 (Donny)
13c2b2eef0 chore: Publish 1.6.0 with swc_core v0.95.0 2024-06-15 22:01:17 +09:00
SWC Bot
131bd42f58 chore: Bump crates 2024-06-15 09:03:56 +00:00
Donny/강동윤
bc8ec625ec
perf(es/parser): Reduce allocations for raw while lexing numbers (#9056) 2024-06-15 18:01:40 +09:00
SWC Bot
56464f2d62 chore: Bump crates 2024-06-15 08:25:58 +00:00
Donny/강동윤
ab226dcfb7
feat(es/ast): Add more utilities (#9054) 2024-06-15 08:24:12 +00:00