Commit Graph

9250 Commits

Author SHA1 Message Date
SWC Bot
03a0d903a0 chore: Bump crates 2024-06-23 14:56:34 +00:00
Donny/강동윤
719b7c54f6
perf(es/parser): Optimize macros (#9100)
**Description:**

I could optimize macros used enormous amount of times.
2024-06-23 23:54:51 +09:00
강동윤 (Donny)
f2dc6b09da chore: Update changelog 2024-06-22 12:01:36 +09:00
강동윤 (Donny)
8e98fa0ba8 chore: Publish 1.6.5 with swc_core v0.95.6 2024-06-22 12:01:34 +09:00
강동윤 (Donny)
4b8cf7abef chore: Update changelog 2024-06-22 10:03:21 +09:00
강동윤 (Donny)
a56d311666 chore: Publish 1.6.4 with swc_core v0.95.6 2024-06-22 10:03:17 +09:00
SWC Bot
f108a53b8f chore: Bump crates 2024-06-22 00:56:30 +00:00
Donny/강동윤
1b3672f1e7
perf(es/lexer): Use memchr::memmem for lexing block comments (#9096)
**Description:**

This PR also makes the lexer more CPU-cache friendly.
2024-06-22 09:54:52 +09:00
SWC Bot
a19a287833 chore: Bump crates 2024-06-22 00:36:49 +00:00
Donny/강동윤
e71b6d31b1
feat(cli): Support generating .d.ts files (#9097)
**Description:**

I verified that `swc_cli` (Rust) works with 

```json
{
    "jsc": {
        "parser": {
            "syntax": "typescript"
        },
        "experimental": {
            "emitIsolatedDts": true
        }
    }
}
```
2024-06-22 09:35:15 +09:00
SWC Bot
7c8397ddfb chore: Bump crates 2024-06-21 23:48:17 +00:00
Donny/강동윤
51a27022b9
feat(es/transform): Add experimental .d.ts generation (#9093) 2024-06-21 23:46:37 +00:00
SWC Bot
9728e45d4e chore: Bump crates 2024-06-21 17:25:29 +00:00
Donny/강동윤
2f02630b1e
perf(es/lexer): Apply various optimizations (#9095)
**Description:**

- `TokenContexts` now uses smallvec, as the element type is very small (1 byte) now.
 - Some codes are moved to allow CPU to cache code correctly.
2024-06-21 17:23:57 +00:00
SWC Bot
8dbcb509da chore: Bump crates 2024-06-21 16:58:16 +00: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
0de10d8a0c chore: Bump crates 2024-06-21 13:26:59 +00:00
Donny/강동윤
a2645e2fa0
feat(swc_core): Reexport swc_typescript (#9092) 2024-06-21 22:25:16 +09:00
강동윤 (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