Commit Graph

415 Commits

Author SHA1 Message Date
Donny/강동윤
1c48a8c8f4
fix(es/minifier): Consider side effects while removing an object spread (#4788) 2022-05-26 07:37:34 +00:00
LongYinan
adf70f6c07
fix(common): Fix jemalloc (#4794) 2022-05-25 14:51:36 +00:00
Donny/강동윤
38a866a900
test(es): Make execution tests faster (#4789) 2022-05-25 06:23:35 +00:00
Donny/강동윤
49b3c2715c
refactor(es/minifier): Make rust-analyzer fast, really (#4746) 2022-05-23 16:16:05 +09:00
Donny/강동윤
47e6cc5190
refactor(es/minifier): Make rust-analyzer faster (#4744)
- We now use a separate crate for testing the minifier. This makes IDE much faster.
2022-05-23 15:53:01 +09:00
Donny/강동윤
417b2182ce
fix(es/loader): Fix jsc.paths on windows (#4739) 2022-05-22 20:12:22 +00:00
Donny/강동윤
890a5ae0e6 chore: Add stale workflow 2022-05-16 09:40:46 +09:00
Donny/강동윤
7fc9bbccd9
feat(config): Make all configuration overridable (#4575) 2022-05-09 05:38:27 +00:00
Donny/강동윤
f23c943227
chore(ci): Improve CI scripts (#4572) 2022-05-08 08:55:51 +00:00
LongYinan
3d5c0fa966
fix(node): Fix tls allocation issue (#4514) 2022-05-04 10:04:48 +00:00
Pig Fang
1c2af932b6
feat(preset-env/base): Update "browserslist-rs" (#4435) 2022-04-26 01:35:43 +00:00
Donny/강동윤
b3fb0e9ceb
chore(ci): Use yarn instead of npm (#4432) 2022-04-25 11:44:50 +00:00
Donny/강동윤
c216a03673
chore(ci): Improve bot script (#4430)
- It will now rebase another PR if there's a merge conflict.
 - It does not update the base branch if it's already up-to-date.
2022-04-25 19:21:34 +09:00
Alexander Akait
63a6280e8f
feat(html/minifier): Initialize crate (#4403) 2022-04-23 03:50:59 +00:00
Donny/강동윤
234e380580 chore: Fix wasm publish script 2022-04-20 22:54:05 +09:00
Donny/강동윤
a8ed5ba357
fix(es/minifier): Apply name mangler as much as we can (#4365) 2022-04-19 17:20:12 +09:00
Donny/강동윤
a953455ada chore: Fix CI script 2022-04-18 01:01:16 +09:00
Donny/강동윤
1900d3506e chore(ci): Fix wasm publish script 2022-04-16 08:18:38 +09:00
Donny/강동윤
83a8f489ec
refactor(bindings): Rename crates (#4337) 2022-04-15 22:47:44 +09:00
Donny/강동윤
adea17dbe3
chore(ci): Fix CI (#4299) 2022-04-10 09:33:18 +00:00
Donny/강동윤
1f466e1d2f
chore(ci): Fix benchmark action (#4242) 2022-04-04 20:12:03 +09:00
Alexander Akait
3e7872c8de
feat(html): Initialize (#4240) 2022-04-04 04:12:45 +00:00
Donny/강동윤
06d0891e7c
chore(bench): Migrate to criterion (#4237) 2022-04-04 00:56:29 +09:00
Donny/강동윤
688f653323
perf(es/minifier): Add fast-path for sequences pass (#4217) 2022-04-01 11:06:35 +00:00
Donny/강동윤
3b1da220e2
refactor(*): Remove fastmem (#4211) 2022-03-31 11:40:06 +00:00
Donny/강동윤
78175473fa
refactor(css/prefixer): Rename crate (#4159) 2022-03-25 19:46:45 +09:00
OJ Kwon
e1d1d82fdb
fix(cli): Fix executable permission (#4154) 2022-03-25 05:32:04 +00:00
OJ Kwon
fefb5870c7
feat(cli): Enable plugins for swc_cli (#4059) 2022-03-17 15:31:20 +09:00
OJ Kwon
5c84fe525f
fix(plugin/runner): Make build pass for wasm32 (#4056) 2022-03-17 05:07:03 +00:00
OJ Kwon
dab2002a2e
refactor(plugin/runner): Split modules and introduce feature flags (#4035) 2022-03-15 22:45:40 +00: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
Donny/강동윤
c27b84c3f6
chore(ci): Make bump-command check lazy (#4018) 2022-03-15 15:17:20 +09:00
Donny/강동윤
ee9a841f33
test(*): Print diagnostics to stderr while testing (#4003)
**Description:**

This will make debugging stack overflow and parser issues easier because it writes to stderrr right away, instead of holding a buffer for it.
2022-03-14 02:06:34 +00:00
Donny/강동윤
743a5da1e5 chore(ci): Invoke yarn before publishing 2022-03-12 20:16:51 +09:00
Donny/강동윤
2ad0d801a2 chore: Publish v1.2.154 2022-03-12 19:18:34 +09:00
Donny/강동윤
073d847a33
test(es): Add tests for fixed issues (#3987) 2022-03-12 09:33:32 +00:00
OJ Kwon
485dc54d29
chore(ci): Skip unnecessary package for the benchmark (#3980) 2022-03-12 01:52:53 +00:00
Austaras
487273fc5b
fix(preset-env): Use core-js-compat and @babel/compat-data directly (#3968) 2022-03-11 12:49:53 +00:00
magic-akari
0181fbe63b
feat(es/lints): Support module/script mode in duplicate_bindings (#3880)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2022-03-07 05:49:39 +00:00
Donny/강동윤
714e05e553
feat(es/minifier): Consider arguments while dropping unused assignments (#3775)
swc_ecma_minifier:
 - `analyze`: Track usage of `arguments`.
2022-02-28 21:57:09 +09:00
Donny/강동윤
e3c374b53b
feat(es/quote): Support variables (#3774) 2022-02-28 10:44:06 +00:00
Donny/강동윤
3798436201
chore: Update rustc (#3768) 2022-02-28 16:12:28 +09:00
Pig Fang
66c6cae8dc
feat(css/lints): Add CSS linter (#3765) 2022-02-27 15:31:19 +00:00
Donny/강동윤
0ff4ad37c3
chore: Skip more actions for automated commits (#3761) 2022-02-27 15:27:15 +09:00
William Tetlow
abc0572557
fix(es/parser) Throw a syntax error for const without initializer in strict mode (#3742)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2022-02-27 06:25:05 +00:00
Donny/강동윤
6d98d146a6 chore: Skip CI for automated commits (#3760) 2022-02-27 14:44:35 +09:00
Donny/강동윤
76ec275c3c
chore(ci): Reduce CI time (#3719) 2022-02-24 06:06:03 +00:00
Donny/강동윤
f733c9c82f
chore(ci): Kill previous runs (#3678) 2022-02-22 23:25:40 +09:00
Donny/강동윤
b1d24702e3
refactor(preset-env): Extract common logic for browserslist support (#3674) 2022-02-22 09:03:40 +00:00
Donny/강동윤
4d5ba55e8a
doc(api/rust): Fix rustdoc (#3620) 2022-02-18 06:18:35 +00:00
Donny/강동윤
cbe87db4df chore(ci): Fix the script for CHANGELOG.md 2022-02-16 21:00:13 +09:00
Donny/강동윤
85caf291e2 chore(ci): Skip instead of cancel 2022-02-16 15:22:11 +09:00
Donny/강동윤
d66f701a4a chore(ci): Fix the condition for cancel action 2022-02-16 15:18:55 +09:00
Donny/강동윤
6173bb88fd chore(ci): Don't mark as a failure 2022-02-16 15:11:04 +09:00
Donny/강동윤
32bc17ff1a chore(ci): Fix version of git-cliff 2022-02-16 15:04:00 +09:00
Donny/강동윤
c775674ec0 chore(ci): Fix the auto-bump scripts 2022-02-16 14:44:21 +09:00
Donny/강동윤
7ddd5886f3 chore(ci): Fix the auto-bump scripts 2022-02-16 14:42:33 +09:00
Donny/강동윤
2d9735b9a9 chore(ci): Fix the auto-bump scripts 2022-02-16 14:36:45 +09:00
Donny/강동윤
55250e4428 chore(ci): Make CI faster 2022-02-16 14:12:22 +09:00
Donny/강동윤
786d016174
fix(es/lints): Fix duplicate-bindings for typescript (#3583) 2022-02-16 05:00:55 +00:00
Donny/강동윤
1bce557851 chore(ci): Don't run pr check for pushes 2022-02-15 20:26:30 +09:00
Donny/강동윤
bfb51f382e chore(bot): Fix permission issue 2022-02-15 19:47:47 +09:00
Donny/강동윤
a1e45c4b86
feat(bot): Add auto-bump script (#3573) 2022-02-15 19:35:59 +09:00
Donny/강동윤
59233d5082 chore: Fix CLA issue of auto-rebase script 2022-02-15 02:18:29 +09:00
Donny/강동윤
1c6e9efeb4 chore: Use GITHUB_TOKEN for auto-rebasing 2022-02-15 02:13:15 +09:00
Donny/강동윤
d0557117ce chore: Fix auto-rebase script 2022-02-15 01:31:46 +09:00
Donny/강동윤
47a81bdb95
chore(ci): Remove useless tests from the matrix (#3561) 2022-02-14 21:13:25 +09:00
Donny/강동윤
b1fc7a9e34
chore(ci): Add a bot for auto-rebasing (#3560) 2022-02-14 19:49:21 +09:00
Donny/강동윤
a7f0e84bbf
feat(es/minifier): Drop useless assignments (#3528)
testing:
 - Allow skipping diff using an environment variable `DIFF`.

swc_ecma_minifier:
 - `pure`: Drop useless assignemnts.
2022-02-11 08:43:48 +00:00
Donny/강동윤
80ed69d67d
chore(build): Disable LTO for local builds (#3514) 2022-02-10 17:35:15 +09:00
Donny/강동윤
74b433080b
refactor(es/minifier): Remove unused crates (#3395) 2022-01-28 20:17:08 +09:00
Donny/강동윤
839d0ac480
refactor(es/parser): Flatten tests to make git faster (#3393) 2022-01-28 19:11:30 +09:00
LongYinan
464c15b775
chore(ci): Fix FreeBSD build (#3379) 2022-01-27 17:10:03 +09:00
Donny/강동윤
4f23d651d1
fix(es/minifier): Consider capturing while inlining (#3322)
swc_ecma_minifier:
 - Don't inline functions if it captures the environment.
2022-01-21 10:24:41 +09:00
LongYinan
c069c78b21
build(node-swc): Fix Windows arm64 build OOM (#3324) 2022-01-20 17:11:56 +09: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
OJ Kwon
a4c497464d
feat(plugin/runnner): Support wasm32-wasi targets (#3271) 2022-01-15 04:40:00 +00:00
LongYinan
214427157d
build(node): Fix glibc issue on linux gnu arm (#3255) 2022-01-13 14:36:54 +00:00
Donny/강동윤
978de5943e
chore(ci): Configure clippy (#3250) 2022-01-13 23:06:11 +09:00
Donny/강동윤
70c2f3b3a5
security(repo): Fix crev integration (#3210) 2022-01-07 20:03:03 +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/강동윤
c34f1a977f
chore(ci): Fix publish script (#3197)
swc_plugin_runner:
 - Use patched version of `cranelift-codegen`.
2022-01-06 17:03:28 +09:00
Donny
fef844954b chore(ci): Fix musl 2022-01-05 16:15:31 +09:00
Donny
bf0acd13da chore(ci): Use more RUSTFLAGS 2022-01-05 16:12:53 +09:00
Donny
4cbe8d18bb chore(ci): Use RUSTFLAGS for linux 2022-01-05 16:05:26 +09:00
Donny
ef4ea2fc7b chore(ci): Use --cargo-flags in correct place 2022-01-05 15:16:05 +09:00
Donny
a20f5d9a7c chore(ci): Fix --cargo-flags 2022-01-05 15:04:21 +09:00
Donny
b292126b38 chore(ci): Fix publish scripts again 2022-01-05 14:51:02 +09:00
Donny
3458e9f1d3 chore(ci): Fix publish scripts 2022-01-05 14:45:02 +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/강동윤
c758997180
refactor(dbg-swc): Rename esdiff to dbg-swc (#3189) 2022-01-04 18:39:43 +09:00
Donny/강동윤
46949d39eb
chore(ci): Split cargo docs (#3187) 2022-01-04 16:53:29 +09:00
Linda_pp
5a3bdc9ed3
chore(ci): Update github-action-benchmark (#3148) 2021-12-30 01:12:15 +09:00
Donny/강동윤
cec325be63
security(repo): Configure cargo-crev (#3124) 2021-12-28 18:49:33 +09:00
Donny/강동윤
61cd7da265
chore(ci): Reduce CI time (#3128) 2021-12-27 17:32:47 +09:00
Donny
e0e7f74955 chore(xi): Fix publishing script 2021-12-26 16:44:52 +09:00
LongYinan
206da128a1
feat(node): Upgrade napi to v2 (#2958) 2021-12-24 02:21:24 +00:00
Donny/강동윤
ff0b55b778 feat(es/diff): Initialize a diff tool for ecmascript (#3101)
swc_ecma_diff:
 - Initialize the project.
2021-12-23 22:01:56 +09:00
OJ Kwon
42046e104d
feat(node/core): Include noop swc binaries (#3088) 2021-12-21 20:20:20 +00:00
Donny/강동윤
7236a2213e
refactor(es/parser): Make some verification logic optional (#3024)
swc_ecma_parser:
 - Make dependency on `swc_ecma_visit` optional.
2021-12-13 11:39:17 +09:00
Donny/강동윤
017392aa5b
feat(node-swc): Add cargo feature for v2 (#3019)
swc_node_bundler:
 - Add cargo features for versioned apis.

node-swc:
 - Add cargo features for versioned apis.
2021-12-12 22:52:58 +09:00
OJ Kwon
69123ddc28
chore(ci): Setup yarn cache (#3015) 2021-12-12 16:16:20 +09:00
OJ Kwon
00d22b8fde
build: Use mocha for exec_ test instead of jest (#3009) 2021-12-11 07:59:21 +00:00
Donny/강동윤
e48263b2f3
refactor(visit): Remove &dyn Node from Visit (#2984)
swc_visit_macros:
 - Remove `&dyn Node` from `Visit`.
 - Implement `VisitWith<V>` for `[T]`.
2021-12-07 14:34:16 +09:00
Donny/강동윤
f052a65bf3
fix(es/compat): Preserve constructor parameters (#2975)
swc_ecma_visit:
 - Add cargo feature `debug`.
 - Add more context for `tracing` when `debug` is enabled.

swc_ecma_utils:
 - Add some logging.

swc_ecma_transforms_compat:
 - Add some logging.
 - `destructuring`: Don't drop patterns. (Closes #2139)

testing:
 - Enable logging by default.
 - Configure logging for `Tester`.
2021-12-06 20:08:50 +09:00
Donny/강동윤
a93f1111f9
fix(ci): Fix freebsd builds (#2944) 2021-12-02 12:57:27 +09:00
Donny
82c8694f4b chore: Drop freebsd for publishing 2021-12-02 11:37:40 +09:00
Donny/강동윤
91ef3cc16e
feat(plugin): Enable plugin support under experimental flag (#2894)
swc_plugin_runner:
 - Add plugin resolver.
 - Implement cache for resolver.
 - Add some integration tests.

swc:
 - Add a cargo feature named `plugin`.
 - Add an experimental option for plugins.

node:
 - Enable `plugin`.
 - Add some integration tests.
2021-11-28 17:02:14 +09:00
Donny/강동윤
ffcb357010
feat(plugin): Rename Plugin to JsPlugin (#2893)
swc_js_plugin_api:
 - Rename to js plugin.
 - Use rplugin and plugin ast instead of json.
2021-11-27 22:21:25 +09:00
Donny/강동윤
c2bbdbe9d6
feat(webpack): Add ast reducer (#2875)
swc_estree_compat:
 - Fix stack overflow related to object patterns.

swc_webpack_}ast:
 - Implement AST reducer.
2021-11-26 15:04:41 +09:00
Donny/강동윤
cdef843369
feat(es/estree): Allow emitting acorn ast (#2859)
swc_estree_ast:
 - Add `Flavor`.
 - Adjust serialization based on `Flavor`.

swc_estree_visit:
 - Remove.

testing:
 - Add `diff_json`.

testing_macros:
 - `#[fixture]`: Print input.
2021-11-25 20:16:46 +09:00
Donny/강동윤
790a262c07
refactor(es/estree): Rename: babel => estree (#2846)
swc_babel_ast:
 - Rename as `swc_estree_ast`.

swc_babel_compat:
 - Rename as `swc_estree_compat`.

swc_babel_visit:
 - Rename as `swc_estree_visit`.
2021-11-24 05:34:41 +09:00
Donny/강동윤
020b4a554d
fix(graph_analyzer): Allow invoking load multiple time (#2823)
swc_graph_analyzer:
 - Make `load` work correctly even if it's called multiple time.
2021-11-21 14:55:59 +09:00
Donny/강동윤
1368981f19
fix(wasm): Fix wasm-web (#2803) 2021-11-19 15:04:01 +09:00
Donny/강동윤
af420eab4b
fix(es/utils): Fix collect_decls (#2792)
swc_ecma_utils:
 - `collect_decls`: Handle assignment pattern property. (Closes #2785)
2021-11-18 15:05:26 +09:00
Donny/강동윤
54bc4054a9
chore: Fix benchmark github action (#2755) 2021-11-16 00:38:03 +09:00
Donny/강동윤
6b70fb5afe
chore: Rename the default branch from master to main (#2750) 2021-11-15 16:52:45 +09:00
Donny/강동윤
b869c81888
refactor(swc_bundler): Extract logic for analyzing cycles (#2733) 2021-11-12 23:33:32 +09:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
Donny/강동윤
a90fae5696
fix(swc): Fix tests (#2707) 2021-11-10 18:08:45 +09:00
Donny/강동윤
4f70ee6d98
refactor: Flatten more packages (#2706) 2021-11-10 16:39:01 +09:00
Donny/강동윤
687305f280
refactor: Flatten crates (#2697) 2021-11-09 20:42:49 +09:00
Donny/강동윤
0414c31480
feat(es/ast): Implement Take for more types (#2649) 2021-11-04 19:59:28 +09:00
Donny/강동윤
380722976a
feat(plugin): Proxy swc_common apis (#2646)
swc_common:
 - Add `Runtime` trait for plugin.
 - Implement `serde` for diagnostics.
 - Proxy diagnostics using `Runtime`.
 - Proxy `HygieneData::with` with `Runtime`.
 - Add implementation of `Runtime` with cargo feature `plugin-rt`.
 - Make `Runtime` implement `StableAbi`.

swc_plugin:
 - Move api code to `swc_plugin_api`.
 - Depend on `swc_common/plugin-mode`.
 - Configure `Runtime` before invoking custom transforms.
 - Use `bincode` for serde.

swc_plugin_runner:
 - Depend on `swc_common/plugin-rt`.
 - Pass `Runtime` implementation to the plugins.
 - Use `bincode` for serde.
2021-11-04 19:24:49 +09:00
LongYinan
1a659d3214
ci: Sync to latest napi workflow (#2592) 2021-10-31 10:04:18 +09:00
Donny
e3b8e5324b chore: Use ubuntu-18.04 for musl 2021-10-30 23:35:28 +09:00
Donny
dfd8d1ad61 chore: Fix musl target 2021-10-30 23:29:44 +09:00
Donny
344daefd16 chore: Publish 2021-10-30 23:22:05 +09:00
Donny/강동윤
db09bce687
perf(node/swc): Parse input using worker thread (#2590)
node_swc:
 - Make `transform` parse the options in background.
 - Make `transform` analyze the input file in background.
 - Make `minify` parse the options in background.
 - Make `minify` deserialize the input in background.
 - Make `parse` parse the options in background.
 - Make `parse` analyze the input file in background.
 - Make `print` parse the options in background.
 - Make `print` deserialize the input file in background.
2021-10-30 12:31:28 +00:00
Donny
b197eb65af chore(ci): Don't use push action 2021-10-30 18:29:33 +09:00
Donny
ceb025b735 chore: Fix permission issue 2021-10-30 17:50:44 +09:00
Donny
bab638c5e8 chore: Fix crate manager script 2021-10-30 16:38:44 +09:00
Donny/강동윤
d63553e5d7
chore: Fix script for managing crates (#2588) 2021-10-30 16:23:30 +09:00
Donny/강동윤
f997bc4889
chore: Manage crate version using github action (#2587) 2021-10-30 15:47:14 +09:00
Donny/강동윤
a6af0ab30f
chore: Fix CI script for PRs (#2575) 2021-10-29 06:11:00 +00:00
Donny/강동윤
0364f9a2ae
feat(es/transforms/testing): Reduce CI time by caching execution result (#2565)
swc_ecma_transforms_testing:
 - Cache execution test result on CI.
2021-10-28 04:00:25 +00:00
Donny/강동윤
7e29685a17
chore: Fix failing tests and improve CI scripts (#2563) 2021-10-28 02:55:49 +00:00
Donny
ac02f3f3fa chore: Fix publish scripts 2021-10-28 10:40:32 +09:00
Donny
a6fcfe1ddd chore: Fix ci script 2021-10-28 09:57:17 +09:00
Donny
e3869f1d27 chore: Disable freebsd build to publish 2021-10-27 18:39:15 +09:00
Iha Shin
edc97ef540
ci: Limit number of runs in graph (#2540) 2021-10-26 16:23:34 +09:00
LongYinan
1b91d55277
ci: Re-enable FreeBSD build (#2497) 2021-10-21 15:15:52 +09:00
Donny/강동윤
eef63ca6db
chore(ci): Prevent benchmark from marking PR as failed (#2488) 2021-10-19 19:01:30 +00:00
Donny/강동윤
01e171a4b4
test(es): Freeze as es2015 to verify base transforms (#2468) 2021-10-19 05:31:12 +00:00
Iha Shin
8c0c250249
chore: Add CI steps for combined benchmark data (#2458) 2021-10-18 16:54:23 +09:00
Donny/강동윤
3d204b44f0
perf(es/transforms): Make transforms parallel (#2449)
swc_ecma_utils:
 - `collect_decls`: More parallel.

swc_ecma_transforms_macros:
 - Add `Parallel`, which is helper for `#[parallel]`.
 - Add `ParExplode`, which is helper for `#[parallel(explode)]`.

swc_ecma_transforms_macros:
 - Add `#[parllel]`.

swc_ecma_transforms_compat:
 - `sticky_regex`: Parallel.
 - `typeof_symbol`: Parallel.
 - `for_of`: Remove exponential visit.
 - `regenerator`: Remove exponential visit.
 - `object_spread`: Parallel.
 - `instance_of`: Parallel.
 - `duplicate_keys`: Parallel.
 - `logical_assignments`: Parallel.
 - `template_literal`: Parallel.
 - `block_scoped_functions`: Migrate to `VisitMut`.
 - `for_of`: Migrate to `VisitMut`.
 - `destructuring`: Reduce `Visit`.
 - `arrow`: Migrate to `VisitMut`.
 - `function_name`: Parallel.
 - `reserved_words`: Parallel.
 - `for_of`: Parallel.

swc_ecma_transforms_module:
 - `import_analyzer`: Migrate to `VisitMut`.

swc_ecma_transforms_react:
 - `jsx_src`: Parallel.
-  `jsx_self`: Migrate to `VisitMut`.
-  `jsx_self`: Parallel.

swc_ecma_transforms_proposal:
 - `export_default_from`: Migrate to `VisitMut`.

swc_ecma_transforms_optimization:
 - `inline_globals`: Parallel.
 - `json_parse`: Migrate to `VisitMut`.
 - `json_parse`: Parallel.
2021-10-18 00:03:30 +09:00
Donny/강동윤
1645bb30b7
perf(es/transforms): Reduce usage of #[fast_path] (#2442)
swc_ecma_ast:
 - Implement `Take` for `ObjectLit`.
 - Implement `Take` for `ArrayLit`.

swc_ecma_transforms_compat:
 - `nullish_coalescing`: Remove exponential visit.
 - `nullish_coalescing`: Migrate to `VisitMut`.
 - `optional_chaining`: Reduce exponential visit. (But it's not removed)
 - `class_properties`: Remove exponential visit.
 - `jsx_src`: Migrate to `VisitMut`.
 - `optional_chaining`: Mae it parallel.
 - `async_to_generator`: Remove `#[fast_path]`.
 - `arrow`: Remove `#[fast_path]`.
 - `destructuring`: Remove `#[fast_path]`.
 - `block_scoped_functions`:  Remove `#[fast_path]`.
 - `classes`: Remove `#[fast_path]`.
2021-10-16 08:12:02 +00:00
Donny
267d639c2e chore: Disable freebsd to publish 2021-10-14 12:06:24 +09:00
Donny
5fb5a7058f chore: Fix CI script for publising 2021-10-14 00:15:16 +09:00
Donny
eb402d8c6f chore: Publish 2021-10-13 23:32:42 +09:00
Donny/강동윤
8074c72ce9
fix(es/transforms/base): Fix hyigiene (#2421)
swc_ecma_transforms_base:
 - `hygiene`: Considering scoping of `var`.
 - `hygiene`: Avoid creating too many `JsWord` by caching index.
2021-10-13 17:32:37 +09:00
Donny/강동윤
897f4b670e
fix(dev/cli): Remove CLI from main swc repositoy (#2393) 2021-10-10 11:17:12 +00:00
Donny/강동윤
7a31a3f530
feat(plugin/api): Determine plugin api (#2199) 2021-10-09 17:47:42 +09:00
Donny/강동윤
ac3fbd91ac
perf(bundler): Improve performance (#2384)
*:
 - Use `ahash` instread of `rustc-hash`.

swc_ecma_transforms_optimization:
 - Make `dce` parallel.
2021-10-09 08:08:13 +00:00
Donny/강동윤
d0342a5a58
feat(swcpack): Enable concurrent mode (#2356)
swc_common:
 - Use `Mutex` from `parking_lot` instead of it from std.

swc_bundler:
 - Use `fxhash` if possible.
 - Don't `clone()` all modules if the entry has only one item.

swc_ecma_loader:
 - `NodeModulesResolver`: Use `path-clean` instead of `canonicalize`.

swc_ecma_transforms_optimization:
 - Reimplement `dce`

node_bundler:
 - Enable `concurrent` of `swc_bundler`.
2021-10-08 16:47:01 +09:00
Donny/강동윤
e2a0edd49d
chore: Setup workfllow to bump version (#2368) 2021-10-07 16:07:55 +09:00
Donny/강동윤
305f90ce76
chore(ci): Add a CI script to publish from github actions (#2353) 2021-10-06 13:36:02 +09:00
Donny/강동윤
e5f46a6800
fix(wasm): Fix bugs (#2279)
swc:
 - Ensure that #2281 is fixed. (#2281)

wasm:
 - Fix `baseUrl` and `paths` support.
 - Apply `hygiene` pass.
2021-09-21 15:24:03 +00:00
강동윤
cab37f8166
fix(ci): Publish (#2250) 2021-09-15 01:38:50 +09:00
강동윤
f78a504806
fix(ci): Publish v1.2.86 (#2235) 2021-09-11 09:36:06 +00:00
강동윤
18e2232dbc
feat(plugin): Groundwork for rust plugin system (#1893) 2021-08-25 15:07:09 +00:00
강동윤
81061a91bb
fix(css): Fixup (#2138) 2021-08-23 14:03:08 +00:00
강동윤
c05a724d84
feat(css): Port stylis (#2131)
swc_css_ast:
 - Add `Value::Comma`.

swc_css_parser:
 - Implement more `Parse<T>`.
 - Fix parsing of values separated with comma.

swc_css_codegen:
 - Fix escaping.
 - Fix codegen of `!important`.

swc_stylis:
 - Port prefixer.
2021-08-23 12:42:13 +00:00
강동윤
7381644f6b
feat(css): Implement codegen for css (#2115)
swc_css_ast:
 - Remove unused tokens.
 - `SubclassSelector::PseudoClass` => `SubclassSelector::Pseudo`.
 - Fix `AttrSelectorOp`
 - `AttrSelector.value`: `Option<Text>` => `Option<Str>`.

swc_css_codegen:
 - Implement a code generator.

swc_css_parser:
 - Implement `Parse<Stylesheet>` for the parser.
 - Fix parsing of pseudo selectors.
 - Fix parsing of unknown at-rules.
2021-08-20 12:38:15 +00:00
강동윤
d39acd1d11
feat(css): Implement parser (#2074) 2021-08-19 05:16:32 +00:00
강동윤
883c1ac4e4
fix(bundler): Prepare renaming of bundler (#2066)
- Rename `spack` crate to `swc_node_bundler`. (#1113)
2021-08-13 10:03:04 +00:00
강동윤
72c9f4373a
fix(es): Fix bugs (#2055)
swc_ecma_parser:
 - Fix panic from span assertion. (#2040)

swc_ecma_transforms_compat:
 - Fix handling of `await for`. (#1918)

swc_ecma_transforms_base:
 - Allow using decorator metadata even if `reflect-metadata` is not imported. (#1362)
2021-08-12 12:28:58 +00:00
강동윤
e916b35dd2
feat(node/swc): Support sourceFileName (#1976)
swc:
 - Support `sourceFileName`.
2021-08-03 00:49:34 +09:00
강동윤
d600d52157 fix(build): Increase memory 2021-07-31 19:50:13 +09:00
강동윤
b02e189d07
feat(es/minifier): Implement more rules (#1871)
swc_ecma_codegen:
 - Fix codegen of `U+0028` and `U+0029`. 

swc_ecma_minifier:
 - Implement MVP.

swc_ecma_transforms_base:
 - `fixer`: Handle seq/await in rhs of for-of.
2021-07-30 10:11:27 +09:00
강동윤
204a71ca94
fix(es/transforms): Fix bugs (#1950)
swc_ecma_trasnsforms_base:
 - `fixer`: Don't de-optimize `++foo || bar`.

swc_ecma_trasnsforms_typescript:
 - Allow using properties from a decorated class. (#1869)

swc_ecma_transforms_optimization:
 - Fix infinite loop. (#1901, #1946)
2021-07-22 07:33:00 +00:00
LongYinan
d6454add72
fix(node/swc): Fix for m1 mac (#1939) 2021-07-20 14:54:02 +09:00
David Sherret
4e42c66663
chore(ci): Switch installation method of deno (#1915) 2021-07-13 21:41:40 +09:00
강동윤
44b6400385
chore: Publish v1.2.63 (#1895) 2021-07-05 23:49:24 +09:00
강동윤
35af4c5186
chore: Publish v1.2.63 & Update rustc (#1894) 2021-07-05 12:51:09 +00:00
강동윤
211e208219
fix(node-swc): Fix visitor (#1890)
node/binding:
 - Fix visitor methods for array elements. (#1819, #1888)
 - Fix for const assertion. (#1625)
 - Verify object properties. (#906)
2021-07-04 12:35:25 +00:00
강동윤
c49e9b0b8d
feat(babel/compat): Implement reverse operation of babelify (#1655)
swc_babel_compat:
 - Move `babelify` to a submodule.
 - Add `swcify`.
2021-06-27 15:30:40 +00:00
강동윤
737ce63b78
chore(es/ast): Bump version (#1853) 2021-06-25 08:19:15 +00:00
강동윤
ff440d47a4
chore: Organize project (#1849) 2021-06-24 17:01:21 +09:00
강동윤
4cd43375a5
feat(swc): Add import resolvers (#1834)
swc_ecma_loader:
 - Add `Resolve`. 
 - Add `TsConfigResolver`. 

swc_ecma_transforms_module:
 - Use `Resolve` for remapping import paths.
 - Add `ImportResolver`.
 - Add `NodeImprortResolver`.

swc:
 - Add `paths` to `.swcrc`.
 - Use `paths`. (#379, #702)
 - Canonicalize file names.
2021-06-24 06:32:09 +00:00
강동윤
f4249574da
feat(ci): Track binary size and performance (#1840) 2021-06-23 10:50:27 +00:00
강동윤
3c3fb359ee
fix(es): Remove UB (#1815)
swc_ecma_parser:
 - Remove UB.

swc_ecma_codegen:
 - Remove codes related to the UB of the parser. (#1782)
2021-06-12 05:17:09 +00:00
LongYinan
c6ce8c60b7
build(node-swc): Support lower version glibc linux on non-x64 arch (#1809) 2021-06-09 23:05:27 +09:00
LongYinan
d6571933ff
feat(node-swc): Support windows aarch64 and linux aarch64 musl (#1773) 2021-06-02 09:34:27 +09:00
LongYinan
6a13615381
feat(node-swc): Support FreeBSD (#1758) 2021-05-28 12:47:02 +09:00
강동윤
c79db252dc
fix(swc): Fix bugs (#1753)
swc_ecma_parser:
 - Allow class members to be declared. (#1751)

node-swc:
 - Fix typescript type definitions. (#1746)
2021-05-27 11:59:04 +09:00
강동윤
c6b22c57f8
feat(es/minifier): Implement minifier partially (#1302)
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
2021-05-20 13:51:30 +09:00
강동윤
24bd5ea4a4
fix(es): Fix various bugs (#1680)
swc_ecma_parser:
 - Allow a class member named `declare`. (#1671)

swc_ecma_transforms_optimization:
 - Preserve side effects while inlining array index operations. (#1674)

wasm/web: 
 - Fix ci script. (#1675)
2021-05-11 16:29:29 +00:00
강동윤
2b918b0c3d
fix(es/transforms/compat): Don't create unnecessary IIFE. (#1669)
swc_ecma_transforms_compat:
 - `class_properties`: Do not create iife if possible. (#1660)
2021-05-10 16:18:31 +09:00
강동윤
4d013d98ca
fix(ci): Don't run tests on macos (#1659) 2021-05-09 11:51:37 +09:00
강동윤
e3bdb97e66 fix(ci): Fix android build 2021-05-08 10:05:39 +09:00
강동윤
0593ce87c0 Disable android 2021-05-07 21:13:54 +09:00
강동윤
82ef06afb8
feat(babel/compat): Improve performance of babelify (#1626)
swc_babel_compat:
 - Optimize.

swc:
 - Improve performance of comment storage.
2021-05-06 14:56:54 +09:00
Luke John
882e2d91b6
fix(wasm-web): Use jq with an explicit temp file (#1637) 2021-05-04 18:31:52 +09:00
강동윤
28bb61fb8d
fix(swc): Fix bugs (#1624)
spack:
 - Add ability to exclude module from the bundle. (#1385)

swc_ecma_ast:
 - Make `Param.decorators` optional. (#1603).

swc_ecma_transforms_compat:
 - Fix super calls in seq exprs in a class. (#1617)

swc_ecma_transforms_module:
- `common_js`: Fix dynamic imports. (#1614)

swc_ecma_transforms_typescript:
 - Fix common js imports. (#1593)
2021-04-30 06:25:24 +00:00
LongYinan
7ea87600b4
fix(ci): Use ghcr.io build image (#1622) 2021-04-30 12:20:39 +09:00
강동윤
1178686a4c
fix(bundler): Fix bundler (#1576)
swc_bundler:
 - Fix remapping of exports. (denoland/deno#9350)
2021-04-16 18:09:38 +00:00
강동윤
246bdd5088
fix(bundler): Fix bugs (#1572)
swc_bundler:
 - Ensure that denoland/deno#10141 is fixed. 
 - Run deno tests on ci.
 - Support nested `export *`. (denoland/deno#10153, denoland/deno#10174)

swc_ecma_codegen:
 - Remove `,` after rest elements. (#1573, denoland/deno#10167)

swc_ecma_transforms_optimization:
 - Don't drop items used by the discriminant of a switch.

swc_ecma_transforms_typescript:
 - Remove constructors without a body.
2021-04-14 14:00:33 +00:00
강동윤
5ce4e1e927
fix(es/parser): Use correct position for comments (#1527)
swc_ecma_parser:
 - Use correct position for comments in

```ts
function Bar() {
  const [foo, setFoo] = useState(0);
  React.useEffect(() => {
    // @refresh reset
  });
  return <h1>{foo}</h1>;
}
```
2021-03-31 19:30:05 +09:00
강동윤
13a9d12c84
chore(ci): Configure github actions for rustdoc (#1523) 2021-03-31 13:09:10 +09:00