Commit Graph

332 Commits

Author SHA1 Message Date
SWC Bot
0bde652b5c chore: Publish crates 2023-12-08 01:58:57 +00:00
Donny/강동윤
6a73d47aa1
perf(common): Fix OOM of inputSourceMap (#8402)
**Description:**

The previous code was very strange, and it could easily cause OOM.
2023-12-08 10:57:27 +09:00
SWC Bot
98c47df37a chore: Publish crates 2023-12-01 20:08:13 +00:00
SWC Bot
c03f84e54e chore: Publish crates 2023-11-15 22:45:18 +00:00
David Sherret
66a4d37031
build(common): Remove dependency on string-cache (#8291) 2023-11-15 22:43:22 +00:00
SWC Bot
2d2ad1e9a1 chore: Publish crates 2023-11-09 03:48:08 +00:00
SWC Bot
2effaf6f43 chore: Publish crates 2023-11-09 01:01:47 +00:00
SWC Bot
4c2547adf2 chore: Publish crates 2023-11-07 09:55:14 +00:00
SWC Bot
09b3003e58 chore: Publish crates 2023-11-07 00:54:18 +00:00
SWC Bot
b070ffe425 chore: Publish crates 2023-11-06 05:31:11 +00:00
Donny/강동윤
e3e439dba6
perf(es/parser): Improve performance (#8224)
**Description:**

Small things
2023-11-06 05:28:30 +00:00
SWC Bot
edb46c3c71 chore: Publish crates 2023-11-04 21:49:01 +00:00
Donny/강동윤
14ea705f27
build(cargo): Update rustc to nightly-2023-11-04 (#8221)
**Breaking Changes**:

 - `Mark::default()` is now identical as `Mark::new()`.

**Description:**

I want to see if inlining is improved
2023-11-04 21:47:10 +00:00
SWC Bot
67b0a7f258 chore: Publish crates 2023-10-25 23:01:44 +00:00
Donny/강동윤
7530e9051d
perf(es/minifier): Add has_flag to Comments (#8182) 2023-10-25 22:59:03 +00:00
Donny/강동윤
5ca3b63582
build(deps): Update ahash (#8174) 2023-10-24 00:01:58 +00:00
SWC Bot
5450f5808a chore: Publish crates 2023-10-23 22:03:16 +00:00
Donny/강동윤
9ceb57b4c7
fix(es/compat): Don't add pure annotations to dummy spans (#8172)
**Related issue:**

 - Closes #8155.
 - Closes #8173.
2023-10-23 15:00:35 -07:00
Donny/강동윤
d1097ccb59
feat(css/parser): Store lexed comments (#8091)
**Description:**

For now, we leave every comment as a leading comment. As logic for determining leading vs trailing is quite complex, I'll do it with another PR.
2023-10-10 11:42:20 +00:00
SWC Bot
34e03c4661 chore: Publish crates 2023-10-08 00:41:50 +00:00
SWC Bot
a6527bf9ab chore: Publish crates 2023-10-06 00:12:18 +00:00
Donny/강동윤
9b9bc51c28
refactor(es/parser): Introduce TokenKind along with Token (#8071)
**Description:**

This is extracted from https://github.com/swc-project/swc/pull/7790 because this PR is extremely large PR. I'll switch to `TokenKind` gradually.
2023-10-06 00:09:48 +00:00
SWC Bot
d1ec49e3e5 chore: Publish crates 2023-08-31 13:25:10 +00:00
Donny/강동윤
aa6495519b
fix(common): Fix logic for excluding FileName from source maps (#7900)
**Description:**

This PR also modifies React transform to use `FileName::Internal` and makes `SourceMapGenConfig` skips `FileName::Internal`.

**Related issue:**

 - Closes #5272
2023-08-31 13:23:11 +00:00
SWC Bot
7b5cb902a5 chore: Publish crates 2023-08-24 12:58:41 +00:00
Donny/강동윤
c65732496e
refactor(common): Mark some methods of Input unsafe (#7848)
**Related issue:**

 - Closes #7709
2023-08-24 12:56:38 +00:00
SWC Bot
a9a6928a4e chore: Publish crates 2023-08-24 08:20:56 +00:00
SWC Bot
e9dfe879d9 chore: Publish crates 2023-08-16 18:04:14 +00:00
David Sherret
981d7b152b
refactor(common): Make ahash optional (#7816)
**Description:**

This adds the ability to not include `ahash` with swc_common, which
caused some issues for me compiling dprint-plugin-typescript to Wasm
because of:

```
   Compiling ahash v0.8.3
   Compiling getrandom v0.2.10
error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
   --> C:\Users\david\.cargo\registry\src\index.crates.io-6f17d22bba15001f\getrandom-0.2.10\src\lib.rs:285:9
    |
285 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
286 | |                         default, you may need to enable the \"js\" feature. \
287 | |                         For more information see: \
288 | |                         https://docs.rs/getrandom/#webassembly-support");
    | |________________________________________________________________________^
``` 

(I can't enable the JS feature because it's running the wasm file in
Wasmer and also I don't support Wasi in dprint plugins)

**BREAKING CHANGE:**

This removes swc_common's "perf" feature and makes it the default, then
adds an `ahash` feature instead. An alternative would be to make the
`ahash` dep optional and part of the default features, then do
`default-features = false` in the downstream crates (I think, but I'm
not sure), but I figure most people will be using the perf default
anyway? I'm not sure what's preferable.

**Related issue:**

 - Closes #7729.
2023-08-16 18:02:05 +00:00
SWC Bot
d5495eeb9a chore: Publish crates 2023-08-16 14:18:56 +00:00
David Sherret
b43e38d3f9
refactor: Use ahash from swc_common in more places (#7815)
**Description:**

Uses ahash from swc_common in more places. This allows for more easily
swapping out ahash with rustc_hash.
2023-08-16 23:16:52 +09:00
SWC Bot
a671afa0aa chore: Publish crates 2023-08-16 02:12:39 +00:00
Johnil Quezada
478fa4736f
feat(es/ast): Expose Archived types (#7811)
**Description:**

For crates using both `rkyv` and `swc`, where ast nodes from
`swc_ecma_ast` are included in data that's serialized with `rkyv`, it's
difficult to access the archived data from the archived ast nodes since
the types are private.

More context in the issue.

**Related issue:**

 - Closes #7810.
2023-08-16 02:10:51 +00:00
SWC Bot
026101b71e chore: Publish crates 2023-07-20 05:57:51 +00:00
SWC Bot
735a82d6a4 chore: Publish crates 2023-07-05 03:52:51 +00:00
Donny/강동윤
b34f1adbcc
build(cargo): Update rustc to 2023-07-03 (#7623) 2023-07-05 03:50:43 +00:00
SWC Bot
4efefb0f4e chore: Publish crates 2023-06-23 02:28:10 +00:00
Kieran Siek
95ac74e6e4
refactor(common): Remove add_bitflags and update bitflags (#7571) 2023-06-23 11:26:22 +09:00
SWC Bot
8c1436aaf5 chore: Publish crates 2023-06-22 13:40:52 +00:00
Donny/강동윤
d57d0d3ad3
build(cargo): Update deps (#7566) 2023-06-22 13:37:35 +00:00
SWC Bot
33355cf707 chore: Publish crates 2023-06-22 07:43:38 +00:00
Donny/강동윤
d12dc70c91
build(cargo): Update deps (#7564) 2023-06-22 07:40:41 +00:00
SWC Bot
f9c5265bde chore: Publish crates 2023-06-21 15:44:11 +00:00
Donny/강동윤
65ce5d1081
perf(es/minifier): Make minifier not overly generic (#7483)
**Description:**

Generics cause binary bloat.

**Related issue:**

 - https://github.com/vercel/next.js/pull/50365
2023-06-03 00:22:30 +09:00
SWC Bot
a63905aa2c chore: Publish crates 2023-05-30 05:18:06 +00:00
OJ Kwon
56ac9eb6b3
feat(common): Enable bytecheck for missing structs (#7465) 2023-05-30 05:15:46 +00:00
SWC Bot
6c3ff01a53 chore: Publish crates 2023-05-24 07:48:00 +00:00
SWC Bot
da0c612d85 chore: Publish crates 2023-05-16 05:18:57 +00:00
Donny/강동윤
3a0565f377
chore(plugin): Update rkyv to v0.7.42 (#7397) 2023-05-16 14:17:12 +09:00
SWC Bot
5e3d156aca chore: Publish crates 2023-05-15 03:20:03 +00:00