Commit Graph

20 Commits

Author SHA1 Message Date
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
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/강동윤
694d3c5072
feat(es/minifier): Print more informantion on infinite loops (#2976)
swc_ecma_minifier:
 - Remove `OptimizerState`.
 - Dump source code if pass is over 200.
2021-12-06 19:47:02 +09:00
Donny/강동윤
1ea965cecb
fix(es/parser): Drop outdated options (#2974)
swc_ecma_parser:
 - Drop flags in `EsConfig`.
 - Drop flags in `TsConfig`.
 - Drop unused variants from `SyntaxError`.
2021-12-05 17:33:34 +09:00
Donny/강동윤
ffec782a41
chore: Inline @swc/helpers (#2972) 2021-12-05 15:46:09 +09:00
Donny/강동윤
c6cb790cd9
feat(css/minifier): Initialize crate (#2884) 2021-11-27 14:33:33 +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/강동윤
2c099bfd2c
feat(es/preset_env): Use browserslist-rs (#2845)
swc_ecma_preset_env:
 - Fix `default_path`.
 - Use `browserslist-rs` for query. (Closes #2781)
2021-11-23 19:07:16 +09:00
KnorpelSenf
2e018769c2
chore: Fix typo (#2764) 2021-11-16 14:39:07 +00:00
Donny/강동윤
bf0007bec0
feat(rplugin): Implement general AST processing plugin system (#2671)
swc_common:
 - Implement `StableAbi` for `BytePos`.
 - Implement `StableAbi` for `Span`.

rplugin:
 - Add `StableAst`.

swc_plugin_api:
 - Drop unused dependencies.

swc_ecma_plugin_ast:
 - Initialize crate.
2021-11-09 18:46:24 +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
Donny/강동윤
3280b4cd7a
refactor(es/parser): Deprecate JscTarget (#2600)
swc_ecma_parser:
 - Deprecate `JscTarget`.
2021-10-31 12:25:15 +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/강동윤
709b3c7cd6
fix(es/transforms/optimization): Fix inline_globals (#2524)
swc_ecma_transforms_optimization:
 - `inline_globals`: Skip assignment to `process.env.FOO`. (#2499)
2021-10-24 21:51:08 +00:00
Donny/강동윤
26944e159d
fix(es/transforms/base): Reimplement hygiene (#2408)
swc_ecma_transforms_base:
 - Reimplement `hygiene`.
2021-10-21 05:12:50 +00:00
Donny/강동윤
ecf0d7507c
feat(swc): Allow removing filename from error output (#2498)
swc:
 - Add an option to exclude filename from error messages.
2021-10-21 04:45:12 +00:00
Donny/강동윤
b0361caa58
feat(es/transforms/optimization): Improve inline_globals (#2479)
swc_ecma_transforms_optimization:
 - `inline_globals`: Support inlining into shorthand properties.
 - `inline_globals`: Support replacing member expressions.

swc:
 - Add an option to disable simplifier when using `inline_globals`.

node_swc:
 - Improve error message on panic.
2021-10-19 14:58:10 +00:00
Donny/강동윤
123c1f5d02
chore: Fix typo (#2472) 2021-10-19 08:25:57 +00:00