Commit Graph

235 Commits

Author SHA1 Message Date
OJ Kwon
f167198470
feat(plugin/macros): Export new interface for getting plugin schema version (#5166) 2022-07-11 01:44:00 +00:00
SWC Bot
2bd5b4413a chore: Publish crates 2022-07-09 10:17:04 +00:00
SWC Bot
358f6552d7 chore: Publish crates 2022-07-09 03:49:46 +00:00
David Sherret
bbbe0b6e94
fix(sourcemap): Handle multi-byte characters correctly (#5153) 2022-07-09 03:47:52 +00:00
SWC Bot
297228a690 chore: Publish crates 2022-07-07 07:48:49 +00:00
OJ Kwon
82fbe15a57
feat(plugin): Wrap serialized struct with a version (#5128) 2022-07-07 07:46:49 +00:00
SWC Bot
9385103649 chore: Publish crates 2022-07-06 04:44:10 +00:00
OJ Kwon
2ba8b39fa0
refactor(common): Bikeshed plugin apis (#5120) 2022-07-06 04:42:00 +00:00
Donny/강동윤
97aa09eaa2 chore: Publish crates 2022-07-05 14:17:30 +09:00
Donny/강동윤
1b57c6fe98 chore: Publish crates 2022-07-01 12:28:49 +09:00
Donny/강동윤
c2c923e205 chore: Publish crates 2022-07-01 11:50:45 +09:00
OJ Kwon
e1aa937183
feat(plugin): Allow taking the inner data from versioned (#5071) 2022-06-30 01:21:12 +00:00
Donny/강동윤
34f4f5a3bc
feat(atoms): Improve atoms (#5066) 2022-06-29 12:02:33 +00:00
SWC Bot
b364828a3c chore: Publish crates 2022-06-29 04:11:28 +00:00
Donny/강동윤
2e139f1441
perf(atoms): More groundwork for replacing JsWord with Atom (#5064) 2022-06-29 13:08:29 +09:00
SWC Bot
5576c3c601 chore: Publish crates 2022-06-29 03:37:57 +00:00
OJ Kwon
e34a864390
feat(plugin): Add versioned wrapper struct (#5062) 2022-06-29 03:35:23 +00:00
OJ Kwon
374366d56c
chore(deps): Update rkyv (#5057) 2022-06-28 18:29:00 +00:00
LongYinan
db9f7a5ad4
chore(ci): Fix publish build on Windows (#4970) 2022-06-14 15:58:10 +00:00
SWC Bot
e25b6ed63c chore: Publish crates 2022-06-11 11:18:43 +00:00
SWC Bot
0d05246f41 chore: Publish crates 2022-06-05 14:43:37 +00:00
OJ Kwon
6bc33cb042
feat(es/codegen): Support other source map implementations (#4879) 2022-06-05 14:40:55 +00:00
Donny/강동윤
fd3501bf87
feat(wasm): Add json error (#4853) 2022-06-01 11:51:24 +09:00
Donny/강동윤
f847709787
chore(common): Update rustc (#4828) 2022-05-28 07:07:58 +00:00
OJ Kwon
a937357d47
feat(plugin): Implement SourceMap.span_to_* (#4781) 2022-05-25 02:09:55 +00:00
Donny/강동윤
ae39b02df3 chore: Publish crates 2022-05-24 03:13:24 +09:00
Donny/강동윤
98df64517e
perf(common): Add more methods to Spanned (#4749)
- Lots of code only needs `lo` or `hi`, but they call `span()`, which is inefficient in some cases.
 - This PR only adds a trivial amount of optimization. I may add full optimization in future.
 - This PR improves codegen performance of `ExprOrSpread` and `Option<ExprOrSpread>`.
2022-05-23 09:18:40 +00:00
SWC Bot
44124ac256 chore: Publish crates 2022-05-20 04:09:42 +00:00
Donny/강동윤
03dd9de1c3
fix(es/codegen): Exclude synthesized files from sourcemap (#4714) 2022-05-20 04:07:16 +00:00
SWC Bot
787f14ec77 chore: Publish crates 2022-05-17 15:47:10 +00:00
David Sherret
606f7c967e
fix(common): Don't use reserved byte position (#4690) 2022-05-17 15:44:25 +00:00
SWC Bot
9a027ba7c2 chore: Publish crates 2022-05-17 03:16:51 +00:00
Donny/강동윤
fe1e62a5e7
perf(common): Improve performance of StringInput (#4680) 2022-05-17 03:14:14 +00:00
SWC Bot
0aa3d96757 chore: Publish crates 2022-05-16 03:31:28 +00:00
Donny/강동윤
da49f810db
feat(es): Add check for BytePos::DUMMY (#4675) 2022-05-16 03:29:24 +00:00
Donny/강동윤
98e4845fce
build(repo): Update rustc (#4667) 2022-05-15 09:03:54 +00:00
SWC Bot
4eece89ad4 chore: Publish crates 2022-05-15 08:41:24 +00:00
Donny/강동윤
11726cc0e1
perf(es/parser): Optimize for cpu code cache (#4666) 2022-05-15 08:39:09 +00:00
Donny/강동윤
f63be2fb9e chore: Publish crates 2022-05-13 19:08:09 +09:00
Hana
b6f904b8f0
feat(es): Add an option to omit columns from sourcemaps (#4646) 2022-05-13 08:49:31 +00:00
SWC Bot
97808349a2 chore: Publish crates 2022-05-11 16:17:07 +00:00
Donny/강동윤
67942d5731
feat(common): Reserve BytePos(0) for dummy spans (#4616) 2022-05-11 16:14:42 +00:00
Donny/강동윤
a6d404a8c2
chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
SWC Bot
99b6d99380 chore: Publish crates 2022-04-26 07:41:17 +00:00
Donny/강동윤
53610fdafc
feat(es/resolver): Use different syntax context for unresolved refs (#4436)
- We don't need a list of bindings to check if an identifier is unresolved.
 - Checking if an identifier is unresolved is now one CPU instruction.
   - Previously it was one hashmap operation.
 - This PR also improves performance, by removing the hashmaps mentioned above.
2022-04-26 07:38:50 +00:00
SWC Bot
be085bfb17 chore: Publish crates 2022-04-20 14:33:47 +00:00
Satish Srinivasan
a06c55930f
fix(common): Ignore extraneous mapping of 1, 0 => 0, 0 (#4381) 2022-04-20 23:31:06 +09:00
OJ Kwon
8419b60430
fix(plugin): Align deps to fix build (#4377) 2022-04-20 08:05:02 +00:00
SWC Bot
2c6abc06fc chore: Publish crates 2022-04-19 05:30:58 +00:00
OJ Kwon
f06c862a9f feat(plugin): Support lookup_char_pos of SourceMap (#4364) 2022-04-19 14:26:28 +09:00
那里好脏不可以
37a8c90750
chore(*): Typo + fomatting (#4304) 2022-04-11 18:45:58 +00:00
Donny/강동윤
6fe4ee79be chore: Publish crates 2022-04-09 16:18:24 +09:00
OJ Kwon
281db2cc4f
feat(plugin): Make more types serializable (#4289) 2022-04-09 16:12:14 +09:00
OJ Kwon
fad652f879
chore(plugin): Align version of swc_common to include dummy comment api (#4270) 2022-04-07 07:21:37 +00:00
OJ Kwon
b15e984317
feat(plugin): Implement proxy for dummy_with_cmt (#4268) 2022-04-07 05:37:12 +00:00
Donny/강동윤
1f466e1d2f
chore(ci): Fix benchmark action (#4242) 2022-04-04 20:12:03 +09:00
Donny/강동윤
06d0891e7c
chore(bench): Migrate to criterion (#4237) 2022-04-04 00:56:29 +09:00
OJ Kwon
6ea66cf001
feat(plugin): Implement plugin api for comments (#4229) 2022-04-03 15:22:36 +09:00
Donny/강동윤
61366c85b3 chore: Publish crates 2022-03-31 23:06:10 +09:00
OJ Kwon
536a190dc9
feat(plugin): Implement PoC of comments api (#4206) 2022-03-31 08:45:08 +00:00
OJ Kwon
b473414b3c
chore(deps): Update string-cache (#4169) 2022-03-28 15:49:30 +09:00
SWC Bot
9fa04fb2e7 chore: Publish crates 2022-03-19 06:42:59 +00:00
Donny/강동윤
b716210de1
fix(common): Fix handling of input source maps (#4086) 2022-03-19 06:40:59 +00:00
LongYinan
db9b988845
feat(node-swc): Add libc field in Linux platform packages (#4046) 2022-03-16 18:58:24 +09:00
Donny/강동윤
e19a60aad4
fix(es/compat): Change pass ordering of es2015 (#4029)
**Description:**

We should apply `regenerator` after `block_scoping` because `regenerator` does not know how to handle `const`s.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/3006
2022-03-15 14:17:03 +00:00
SWC Bot
db62bb6415 chore: Publish crates 2022-03-14 10:01:39 +00:00
Donny/강동윤
0ad13d93f2
fix(common): Don't use None as source while generating source maps (#4007)
**Description:**

I used https://pastcompute.github.io/ScriptMapper/ to dump source map, and found that line/column becomes null if file is `None`. Seems like the rust crate `sourcemap` is mature enough to handle sourcemaps with those entries, but many other sourcemap libraries, including the one used by `@swc/cli` expects non-null value for the line and the column.
2022-03-14 09:51:51 +00:00
Donny/강동윤
ae2f8d6327 chore: Publish crates 2022-03-14 15:39:23 +09:00
Donny/강동윤
40b8a4e596
feat(common): Implement a pretty error reporter (#3946) 2022-03-13 19:07:18 +00:00
SWC Bot
7e96a8a9d7 chore: Publish crates 2022-03-12 07:17:08 +00:00
Donny/강동윤
db60291164
perf(common): Use fxhash everywhere (#3985)
Description:
 - To avoid a breaking change, I created a cargo feature that can be used to change hasher.
 - This leads to about 8% perf improvements on m1 max macbook pro 64gb
2022-03-12 07:15:12 +00:00
LongYinan
1206c84e19
feat(*): Update dependencies (#3964) 2022-03-11 23:00:55 +09:00
SWC Bot
48cdc13183 chore: Publish crates 2022-03-11 17:48:41 +09:00
magic-akari
579aeb7cfa
feat(es/lints): Refine error message (#3952) 2022-03-11 04:55:37 +00:00
Donny/강동윤
e8018c54d4
fix(es/codegen): Fix sourcemap issue caused by reserved BytePos values (#3948) 2022-03-10 14:30:03 +00:00
SWC Bot
666f55e01c chore: Publish crates 2022-03-10 07:48:19 +00:00
Austaras
112f428734
feat(es/compat): Add pure comments for class fields keys (#3939) 2022-03-10 07:13:58 +00:00
SWC Bot
82b3678b47 chore: Publish crates 2022-03-10 03:17:39 +00:00
OJ Kwon
86ea23785d
perf(*): Update tracing to improve performance of disabled spans (#3932) 2022-03-10 03:15:49 +00:00
SWC Bot
b2eae2d539 chore: Publish crates 2022-03-07 10:55:48 +00:00
magic-akari
372f298f5f
feat(common): Align stable_hasher to latest rustc (#3895) 2022-03-07 10:53:54 +00:00
SWC Bot
c5ef673921 chore: Publish crates 2022-03-04 12:09:48 +00:00
Donny/강동윤
73ec0b3dd7
perf(es/transform): Use SingleThreadedComments for transform (#3847) 2022-03-04 12:07:51 +00:00
Donny/강동윤
3798436201
chore: Update rustc (#3768) 2022-02-28 16:12:28 +09:00
Donny/강동윤
fe0ddcc54b
feat(es/quote): Implement quasi quoter partially (#3155) 2022-02-27 13:21:38 +00:00
Donny/강동윤
0fd4fd2422
feat(es/codegen): Add sourcemap entry for injected semicolons (#3750) 2022-02-26 07:05:31 +00:00
OJ Kwon
a454996314
feat(node-swc): Add experimental trace support in @swc/core (#3731) 2022-02-25 04:06:45 +00:00
SWC Bot
8012056bd8 chore: Publish crates 2022-02-22 08:11:02 +00:00
Donny/강동윤
210f17af8c
build(swc): Remove unused dependencies (#3673) 2022-02-22 08:05:54 +00:00
SWC Bot
b69e4b2a93 chore: Publish crates 2022-02-18 05:24:01 +00:00
Kirill Mironov
e863f9dd04
fix(swc_common): Fix names of proxied functions (#3608) 2022-02-18 05:21:58 +00:00
SWC Bot
205fea6cce chore: Publish crates 2022-02-17 08:21:05 +00:00
Donny/강동윤
798ef13706
feat(api/rust): Improve error messages for wrong usages of scoped thread-local variables (#3606) 2022-02-17 08:11:46 +00:00
SWC Bot
03367f09c2 chore: Publish crates 2022-02-17 06:42:52 +00:00
Donny/강동윤
9df0d7c854
doc(swc_common): Document error reporting using HANDLER (#3605) 2022-02-17 06:40:50 +00:00
OJ Kwon
5061101999
build(swc): Bump the version of parking_lot (#3604) 2022-02-17 05:16:14 +00:00
OJ Kwon
ad6f24ad83
build(*): Dedupe once_cell (#3567) 2022-02-15 11:58:44 +09:00
OJ Kwon
a4d914dab5
chore(build): Remove version pinning of parking_lot_core (#3537) 2022-02-12 14:24:49 +09:00
SWC Bot
eb3401c3b2 chore: Publish crates 2022-02-10 16:05:48 +09:00
OJ Kwon
bc250262f2
feat(plugin): implement proxy for Mark and SyntaxContext (#3511) 2022-02-10 06:57:42 +00:00
Donny/강동윤
9b76783281
refactor(common): Cleanup & rustfmt (#3495)
swc_common:
 - Merge identical source codes.

swc_css_parser:
 - Deny `clippy::all`.
 - Fix lints.
2022-02-09 06:33:32 +00:00
OJ Kwon
494b4c8203
feat(swc/plugin): Implement proxy for Mark::fresh (#3492) 2022-02-09 13:56:39 +09:00
Donny/강동윤
484cd92959 chore: Publish crates 2022-02-08 14:06:31 +09:00
OJ Kwon
d473a65976
feat(plugin): Support global HANDLER in the plugin context (#3478) 2022-02-08 14:06:10 +09:00
Donny/강동윤
2ea81db19f chore: Publish crates 2022-02-03 15:36:30 +09:00
Donny/강동윤
ea8dfd872c
fix(es/codegen): Fix bugs (#3436)
swc_ecma_codegen:
 - Emit `;` after do-while statemnts. (#3426)
 - Don't emit two dots for minified numeric literals. (#3428)
 - Handle semicolons correctly. (#3420)
2022-02-03 15:19:13 +09:00
Donny/강동윤
78e83a386b
chore(repo): Add clippy to git push hook (#3383) 2022-01-28 00:22:43 +09:00
OJ Kwon
a8debc17f6
feat(plugin): Pass host context to plugins for diagnostics emission (#3359) 2022-01-25 08:13:39 +00:00
LongYinan
9608605772
build(node-swc): Fix GLIBC < 2.18 compatible issues and android arm binary loading issue (#3314) 2022-01-20 02:21:24 +00:00
Donny
3d7d96588e chore: Publish crates 2022-01-18 12:26:37 +09:00
OJ Kwon
c6ffdc8717
feat(plugin): Add PluginError (#3300) 2022-01-18 12:26:04 +09:00
Donny
5a08327784 chore: Publish crates 2022-01-18 11:30:19 +09:00
asquared31415
641265b147
fix(common): Use siphasher directly and upgrade transitive dependencies to avoid UB (#3299) 2022-01-18 11:29:53 +09:00
Donny/강동윤
357a350390
refactor(*): Cleanup (#3274) 2022-01-15 16:43:34 +09:00
Donny/강동윤
15b604b6d6
refactor(*): Fix some clippy warnings (#3257) 2022-01-14 07:20:45 +09:00
Donny/강동윤
978de5943e
chore(ci): Configure clippy (#3250) 2022-01-13 23:06:11 +09:00
Donny
c13bba8401 chore: Publish crates 2022-01-12 18:39:56 +09:00
OJ Kwon
a2f2b5ac89
feat(plugin): Don't serialize/deserialize needlessly (#3227)
swc_common:
 - Add `Serialized`.

swc_plugin_runner:
 - Accept `Serialized` instead of `Program`.
 - Pass `Serialized` from previous plugin instead of deserializing it.
2022-01-11 10:11:04 +00:00
Donny
56d1f03556 chore: Publish crates 2022-01-07 15:18:26 +09:00
OJ Kwon
92de2c7884
feat(plugin): Pass serialized ast to a wasm file (#3199)
swc_common:
 - Use correct cargo feature for plugin apis.

swc_plugin:
 - Add hidden functions required for memory operations from host.

swc_plugin_runner:
 - Pass serialized AST to a wasm file.
2022-01-07 15:13:46 +09:00
Donny
781aa79b82 chore: Publish crates 2022-01-04 19:29:50 +09:00
OJ Kwon
32d3342283
refactor(plugin): Remove codes related to the plugin system based on abi_stable (#3188) 2022-01-04 10:26:17 +00:00
Donny
a883e604f2 chore: Publish crates 2022-01-02 16:24:06 +09:00
Donny/강동윤
bf751cb690
feat(es/ast): Add rkyv support (#3166)
ast_node:
 - `#[ast_node]`: Add support for `rkyv`.

swc_common:
 - Add a feature flag for `rkyv`.

swc_ecma_ast:
 - Add a feature flag for `rkyv`.
2022-01-02 16:23:37 +09:00
Donny
b1a72315db chore: Publish crates 2022-01-02 12:50:50 +09:00
Donny/강동윤
7a83c0cb57
perf(es/ast/serde): Make deserialization faster (#3160)
ast_node:
 - Improve deserialization of enums.

swc_css_ast:
 - Fix a compilation issue.

swc_ecma_ast:
 - Update `serde`.

swc_ecma_parser:
 - Fix a compilation issue.

swc_estree_ast:
 - Fix serialization.
2022-01-02 12:49:09 +09:00
Donny/강동윤
194b3e9b67
refactor(*): Use 2021 edition (#3151) 2021-12-30 18:59:18 +09:00
OJ Kwon
72c963662d
refactor(*): Drop unused dependencies (#3138) 2021-12-29 15:27:51 +09:00
Donny
a4b77bf11f chore: Publish crates 2021-12-19 00:21:30 +09:00
Donny/강동윤
b4d95b44a7
perf(es/parser): Improve performance (#3059)
swc_common:
 - Optimize `StringInput`.

swc_ecma_parser:
 - Optimize `skip_space`.
 - Remove useless `.clone()`.
2021-12-19 00:18:00 +09:00
Donny
b1a47ee971 chore: Publish crates 2021-12-07 14:34:44 +09:00
Donny
86d2cebd37 chore: Publish v1.2.115 2021-12-01 14:20:52 +09:00
Donny/강동윤
f5af22ef71
chore: Document features (#2890) 2021-11-27 16:55:42 +09:00
Donny/강동윤
28850eef5c
chore: Allow using #[doc(cfg)] (#2871) 2021-11-25 14:16:18 +09:00
Donny/강동윤
4f70ee6d98
refactor: Flatten more packages (#2706) 2021-11-10 16:39:01 +09:00