Donny/강동윤
b393773373
feat(debug): Inline dbg-swc
( #4651 )
2022-05-13 06:05:21 +00:00
Donny/강동윤
6a19ff1a15
feat(node/css): Add css bindings crate ( #4346 )
2022-04-25 14:11:22 +00:00
Donny/강동윤
83a8f489ec
refactor(bindings): Rename crates ( #4337 )
2022-04-15 22:47:44 +09:00
OJ Kwon
cf7ca5076a
refactor(plugin/api): Expand the proxy crate ( #4290 )
2022-04-09 07:47:43 +00:00
Alexander Akait
3e7872c8de
feat(html): Initialize ( #4240 )
2022-04-04 04:12:45 +00:00
OJ Kwon
536a190dc9
feat(plugin): Implement PoC of comments api ( #4206 )
2022-03-31 08:45:08 +00:00
OJ Kwon
eecda21d9a
fix(node-swc): Initialize custom trace subscriber only once ( #4209 )
2022-03-31 07:11:31 +00:00
Donny/강동윤
78175473fa
refactor(css/prefixer): Rename crate ( #4159 )
2022-03-25 19:46:45 +09:00
LongYinan
db9b988845
feat(node-swc): Add libc
field in Linux platform packages ( #4046 )
2022-03-16 18:58:24 +09:00
OJ Kwon
560c81b120
build(cargo): Set workspace default members ( #3978 )
2022-03-13 08:17:55 +00:00
OJ Kwon
ffb2ee85e6
fix(node-swc): Correctly close trace spans after completion ( #3811 )
2022-03-02 10:03:00 +00:00
Pig Fang
66c6cae8dc
feat(css/lints): Add CSS linter ( #3765 )
2022-02-27 15:31:19 +00:00
Donny/강동윤
fe0ddcc54b
feat(es/quote): Implement quasi quoter partially ( #3155 )
2022-02-27 13:21:38 +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
OJ Kwon
432d5d3fb7
feat(plugin/macro): Add safe API for plugins based on a proc-macro ( #3240 )
2022-01-12 09:32:52 +00: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
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/강동윤
1aa55e616a
feat(es/diff): Add a internal CLI program for debugging minifier ( #3168 )
2022-01-02 19:55:12 +09: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
2e89a4f5a8
feat(cli): Setup packages for CLI ( #3070 )
2021-12-20 06:03:00 +00:00
Donny/강동윤
f21af5bcd6
feat(es/lints): Implement simple validations ( #2763 )
...
swc_ecma_lint:
- Implement `const-assign`. (Closes #2016 )
- Implement `duplicate-bindings`. (Closes #2795 )
- Implement `duplicate-exports`. (Closes #3056 )
swc:
- Use linter.
2021-12-19 21:07:51 +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/강동윤
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/강동윤
6b96a3d8ed
feat: Enable logging of timings ( #2833 )
...
swc_timer:
- Add `Timer`.
- Add `timer!()`.
node:
- Enable logging.
2021-11-22 21:01:08 +09:00
Donny/강동윤
1d518fe381
refactor: Flatten css
( #2731 )
2021-11-12 19:37:05 +09:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript
( #2708 )
2021-11-10 19:00:54 +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/강동윤
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/강동윤
22ce68cfaa
fix(swc): Don't print same error twice ( #2692 )
2021-11-09 15:18:11 +09:00
Donny/강동윤
3dc1e765e9
feat(swc): Provide &Program
to pass creator ( #2665 )
...
swc:
- Use `impl |prorgram: &Program| -> impl Fold` instead of `impl Fold`. (Closes https://github.com/swc-project/swc/issues/2664 )
2021-11-06 18:05:10 +09:00
Donny/강동윤
994c9655c8
feat(es/ast): Add utils ( #2657 )
...
swc_ecma_ast:
- Add `as_ident` to `PatOrExpr`.
- Add `as_ident_mut` to `PatOrExpr`.
- Replace `Is` macro for `ParOrExpr` with custom impl.
2021-11-05 16:09:08 +09:00
Donny/강동윤
3280b4cd7a
refactor(es/parser): Deprecate JscTarget
( #2600 )
...
swc_ecma_parser:
- Deprecate `JscTarget`.
2021-10-31 12:25:15 +00:00
Donny/강동윤
e589d00f62
refactor: Move HANDLER
to swc_common
( #2599 )
...
swc_common:
- Add `HANDLER`.
swc_ecma_utils:
- Replace `HANDLER` with one from `swc_common`.
- Make `StmtLike` `: Send + Sync`.
2021-10-31 20:41:36 +09:00
Donny/강동윤
33bc3d2b91
feat(es/transforms/regenerator): Allow configuring import path ( #2581 )
...
swc_ecma_transforms_compat:
- `regenerator`: Allow configuring import path of `regenerator-runtime`.
2021-10-29 14:36:11 +00:00
Donny/강동윤
4b2903e3b4
fix(es/minifier): Fix minifier ( #2564 )
...
swc_ecma_minifier:
- Don't change depth of function while negating if statements. (#2558 )
swc_ecma_transforms_optimization:
- `dead_branch_remover`: Preserve `this`. (#2465 , #2466 )
swc:
- Make `toplevel` default to true if `module` is true. (#2254 )
2021-10-28 04:35:45 +00:00
Donny/강동윤
8494f6583c
fix(swc): Allow overriding specified parser config using .swcrc
( #2547 )
...
swc:
- Merge parser config by enabling each feature. (#2546 )
2021-10-26 22:39:06 +00:00
Sosuke Suzuki
65c83e8cb4
feat(es/transforms): Move stage 4 proposals to es2022
( #2519 )
2021-10-24 21:28:40 +09:00
Donny/강동윤
fce3b79e79
fix(es/minifier): Improve name mangler ( #2509 )
...
swc_ecma_transforms_base:
- Expose renamer.
swc_ecma_minifier:
- Improve name mangler.
swc:
- Disable hygiene if mangler is enabled.
2021-10-24 10:52:09 +00:00
Sosuke Suzuki
ecd617af39
feat(es/transforms): Move class_properties
to es2022
( #2512 )
2021-10-23 23:25:14 +09: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/강동윤
eef3d6e3fb
fix(es): Fix simple bugs ( #2495 )
...
swc_ecma_parser:
- Don't panic on `declare declare`. (#2343 )
swc_ecma_transforms_react:
- Don't panic on `createElement()`. (#2492 )
swc_bundler:
- Don't panic on wasm. (#2334 )
swc:
- Disable `inline_globals` if it's not specified. (#2490 )
2021-10-20 06:12:21 +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/강동윤
2ca6e5d79b
feat(es/transforms/optimization): Support inlining of typeof
s ( #2473 )
...
swc_ecma_transforms_optimization:
- `inline_globals`: Support inlining of `typeof`s.
swc:
- Change error message for parsing failure to mention `Syntax Error`.
2021-10-19 09:49:18 +00:00
Donny/강동윤
123c1f5d02
chore: Fix typo ( #2472 )
2021-10-19 08:25:57 +00:00
Donny/강동윤
c9437d3226
fix(es): Fix bugs ( #2469 )
...
swc:
- Fix handling of `envs`.
- Check for already fixed issues. (#2319 )
2021-10-19 06:02:46 +00:00
Donny/강동윤
28f2c7ae5d
feat(swc): Accept map for envs
( #2467 )
...
swc:
- Support specifying map to global inlining pass.
2021-10-19 05:13:21 +00:00
Donny/강동윤
575aa44c25
perf(es/transforms): Improve performance ( #2454 )
...
swc_ecma_transforms_macros:
- `#[parallel]`: Run hooks for single-threaded operations.
swc_ecma_transforms_compat:
- `shorthand`: Parallel.
- `exponentation`: Parallel.
- `parameters`: Parallel.
- Recover some `#[fast_path]`
2021-10-18 12:07:13 +00:00
Donny
ac772403b2
chore: Add include
to swc
2021-10-18 16:49:21 +09:00
Donny/강동윤
9ba68c6863
fix(common): Fix sourcemap ( #2457 )
...
swc_common:
- Include the index to the name in `mappings` of a sourcemap.
swc:
- Fix handling of `inputSourceMap`.
2021-10-18 06:43:59 +00:00
Donny
7225f90b9c
Bump version
2021-10-18 11:09:59 +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/강동윤
130a47f42c
feat(es/transforms/module): Add an option to preserve dynamic imports ( #2441 )
...
swc_ecma_transforms_module:
- Add `ignoreDyanmic`.
2021-10-15 19:19:14 +09:00
Donny/강동윤
4c983e9158
perf(es/codegen, es/parser): Improve performance ( #2406 )
...
ast_node:
- Make `.span()` inlinable.
swc_ecma_codegen:
- Reduce call to *heavy* `.span()` calls.
swc_ecma_parser:
- Reduce `memmove` by using typed-arena.
swc_bundler:
- Make `Bundle.bundle` take `&mut self`.
- Make drop concurrent.
2021-10-15 12:49:37 +09:00
Donny/강동윤
51d7a144bb
fix(swc): Fix order of passes ( #2427 )
...
swc_ecam_transforms_typescript:
- Preserve more jsx-related imports.
swc:
- Change pass ordering.
2021-10-13 16:04:49 +00:00
Donny/강동윤
76de51333d
fix(es/transforms): Fix for react + typescript ( #2422 )
...
swc_common:
- Add `NoopComments`.
- Implement `Comments` for `Option<C>` where C: `Comments`.
- Add some helper methods to `Comments`.
- Deprecate `CommentsExt`.
swc_ecma_transforms_base:
- `resolver`: Handle `TsImportEqualsDecl`.
swc_ecma_transforms_react:
- Reduce useless cloning using `Arc`.
- Expose API for parsing directives like `@jsxPragma`.
swc_ecma_transforms_typescript:
- Accept `pragma` and `pragmaFrag`.
- Support jsx directives.
- Preserve jsx-related imports.
swc:
- Optimize `SwcComments`.
- Run`resolver` before everything else.
2021-10-13 22:29:56 +09:00
Donny/강동윤
98cc79a2be
fix(es/minifer): Fix bugs ( #2397 )
...
swc_ecma_codegen:
- Fix sourcemap of `export` tokens.
- Fix codegen of numeric operands in left of a binary expression.
- Fix codegen of unary operations.
swc_ecma_minifier:
- Visit `AssignPatProp.valie`.
- Move `inline_prevented` to analyzer.
- Add `Ctx.dont_invoke_iife`.
- `iife`: Check for `arugments`
swc:
- `inline_sources_content`: true by default for `minify()`.
2021-10-11 07:44:42 +00:00
Donny/강동윤
897f4b670e
fix(dev/cli): Remove CLI from main swc repositoy ( #2393 )
2021-10-10 11:17:12 +00:00
Donny
b9b7de0871
chore: Publish
2021-10-10 01:33:22 +09: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/강동윤
2c058cb124
fix(es/codegen, es/transforms/typescript): Fix bugs ( #2383 )
...
swc_ecma_codegen:
- Emit sourcemap for `import` tokens.
swc_ecma_transforms_typescript:
- Strip `react` correctly.
2021-10-09 01:20:59 +00:00
Donny
d19df1379c
chore: Publish swc
2021-10-09 00:05:59 +09: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/강동윤
656f3e944d
fix(swc): Fix swc
as a crate ( #2376 )
...
swc_ecma_transforms_typescript:
- Don't drop imports from `react`.
2021-10-08 03:38:11 +00:00
Donny/강동윤
b0ee9543d4
doc(es/ast): Document identifier mangagement system ( #2371 )
2021-10-08 01:02:02 +09:00
Donny/강동윤
edc4cb432e
fix(swc): Fix order of custom passes ( #2367 )
...
swc_ecma_transform_react:
- Accept `top_level_mark`.
swc:
- Fix order of `custom_before_pass`.
2021-10-07 15:13:21 +09:00
Donny/강동윤
9e6a1f431b
fix(es/minifier): Fix minifier ( #2355 )
...
swc_ecma_minifier:
- `iife`: Don't replace parameters with identifiers in iife.
- `sequences`: Add `Marks.synthesized_seq`.
- pure: Drop empty statements.
2021-10-06 07:12:11 +00:00
Donny/강동윤
6d35e7c28d
fix(swc): Fix order of custom passes ( #2347 )
...
swc:
- Invoke `resolver` and `typescript::strip` before applying user passes.
2021-10-05 20:46:49 +00:00
Donny/강동윤
fac6f47863
perf(es/transforms): Improve performance ( #2329 )
...
swc_ecma_ast:
- Implement `Take` for `Function`.
- Implement `Take` for `FnExpr`.
- Implement `Take` for `ClassExpr`.
swc_ecma_transforms_compat:
- Migrate `es2015::duplicate_keys` to `VisitMut`.
- Migrate `es2015::template_literals` to `VisitMut`.
- Migrate `es2015::function_name` to `VisitMut`.
- Add more fast-path to `reserved_words` pass.
swc_ecma_transforms_react:
- Reduce allocations of `pure_annotations`.
- Migrate `pure_annotations` to `VisitMut`.
- Migrate `jsx::display_name` to `VisitMut`.
swc_ecma_transforms_optimization:
- Migrate `inline_globals` to `VisitMut`.
- `inline_globals`: Use `Lrc<FxHashMap<K, V>>`.
swc:
- Cache `current_dir()`.
- `ModuleConfig::build`: cacnonicalize only if `paths` is used.
2021-10-05 13:31:35 +00:00
Donny/강동윤
8403057268
fix(es/minifier): Don't optimize new String
. ( #2341 )
...
swc_ecma_transforms_optimization:
- Don't optimize calls like `new String`.
2021-10-04 06:44:37 +00:00
Donny/강동윤
bbefa0e57e
chore: Improve documentation for rust users ( #2340 )
2021-10-04 06:10:30 +00:00
Donny/강동윤
6a41e9a0be
fix(es): Fix performance bugs ( #2313 )
...
swc_common:
- Optimize `SourceMap.span_until_char`.
swc_ecma_codegen:
- Make `Emitter` generic.
swc_ecma_parser:
- `Lexer`: Reuse allocation of `String`.
- `Lexer`: Avoid copying useless data.
2021-09-29 12:10:38 +00:00
Donny/강동윤
2c50cde8de
fix(swc): Fix try_with_handler
( #2315 )
...
swc:
- `try_with_handler`: Return `Err` on errors.
2021-09-29 04:55:31 +00:00
Pig Fang
2b292e6d17
feat(es): Support type-only import/export specifiers ( #2309 )
2021-09-28 22:05:20 +09:00
Donny/강동윤
650e1494d4
fix: Migrate dependencies ( #2307 )
...
*:
- Migrate from `log` to `tracing`. (#2284 )
- Migrate from `fxhash` to `rustc-hash`.
swc_common:
- Add a cargo feature named `debug`.
2021-09-27 09:19:15 +00:00
Donny/강동윤
e46a842e99
feat(es/parser, es/transform): Implement ergonomic brand checking ( #2079 )
...
swc_ecma_parser:
- Implement parsing of private properties in object literals.
swc_ecma_transforms_base:
- `fixer`: Handle `const [a = (b, c)]`.
swc_ecma_transforms_compat:
- `class_properties`: Support ergonomic brand checks. (#2064 )
swc_ecma_transforms_proposal:
- Implement ergonomic brand checks for private fields. (#2064 )
2021-09-27 08:03:48 +00:00
Donny/강동윤
ca0d6ddf2e
fix(es/parser): Fix bugs ( #2255 )
...
swc_ecma_parser:
- Treat `{` after an arrow as a brace stmt. (#2237 )
- Handle comments correctly while backtracking. (#2264 )
2021-09-23 11:32:40 +00:00
Pig Fang
4d500baaaa
fix(es/transforms/compat): Move the optional catch binding pass to ES2019 ( #2247 )
...
swc_ecma_transforms_compat:
- Move optional chaining pass to `es2019`.
Co-authored-by: Donny <kdy1997.dev@gmail.com>
2021-09-21 21:54:51 +09:00
Donny/강동윤
180dc31550
fix(es/transforms/base): Fix hygiene
pass ( #2266 )
...
swc_ecma_transforms_base:
- `hygiene`: Consider nested scopes correctly. (#2211 )
- `hygiene`: Fix handling of constructors.
2021-09-21 12:21:49 +00:00
Heyang Zhou
b82702cf0f
fix(swc): Remove global side effects for rust users. ( #2270 )
...
swc:
- Don't enable `log/release_max_level_info`.
- Don't depend on `swc_node_base`.
2021-09-19 17:05:36 +09:00
강동윤
48d61039d2
fix(common, node/swc): Allow inlining sourcesContent
( #2245 )
...
swc_common:
- Allow setting `sourceContents` of source map files. (#2218 )
swc:
- Support `inlineSourceContents`. (#2244 )
2021-09-14 02:31:32 +00:00
강동윤
9eafd0c6c4
fix(es/loader): Fix support for jsc.paths
. ( #2227 )
...
swc_ecma_loader:
- `TsConfigResolver`: Use `baseUrl`. (#2050 )
swc:
- Change type of `JscConfig.base_url` to `PathBuf`.
testing:
- Improve `NormalizedOutput::compare_to_file`.
2021-09-10 12:29:26 +00:00
강동윤
9ffe47106a
fix(swc): Fix target
( #2226 )
...
swc:
- Fix `target` option. (#2225 )
2021-09-10 15:43:14 +09:00
강동윤
2c477780f0
fix(es): Fix bugs ( #2222 )
...
swc_ecma_parser:
- Don't panic on `typeof import(T)`. (#2198 )
- Fix parsing of ternary. (#2196 )
swc_ecma_transforms_base:
- `fixer`: Handle unary in lhs of an exponentation expression. (#2191 )
swc_ecma_transforms_compat:
- Use variable for `this` in arrow expressions. (#2212 )
swc_ecma_visit:
- Add a trait `InjectVars`.
node_swc:
- Increease recursion limit while deserializing. (#2223 )
2021-09-09 20:45:20 +09:00
Kitson Kelly
87f30b21a3
feat(common): Add variants to FileName
( #2202 )
2021-09-03 13:55:31 +09:00
강동윤
77be9f63b9
fix(swc): Improve rust apis ( #2197 )
...
swc_ecma_transforms_testing:
- Make `expected` not affect source map of input.
swc:
- Accept `before` pass.
2021-09-01 23:34:37 +00:00
강동윤
cb2b0c671f
fix(es/transforms/base): Optimize hygiene
( #2193 )
...
swc_ecma_transforms_base:
- `hygiene`: Don't rename if not required. (#1600 )
swc_ecma_minifier:
- Remove `hygiene_optimizer`.
2021-09-01 13:11:55 +00:00
강동윤
a8cb554be5
feat: Expose .take()
( #2190 )
...
swc_common:
- Add `Take`. (#2189 )
swc_ecma_ast:
- Implement `Take` for ast nodes.
swc_ecma_transforms_base:
- Remove `MapWithMut`.
2021-08-31 14:45:48 +00:00
David Sherret
99c35ff980
refactor(es): Use BlockStmt
instead Vec<Stmt>
for static blocks. ( #2188 )
...
swc_ecma_ast:
- Use `BlockStmt` instead of `Vec<Stmt>` for static blocks.
swc_ecma_parser:
- Fix span of static blocks.
2021-08-31 16:12:18 +09:00
강동윤
c0b0337d1d
fix(es): Fix easy bugs ( #2178 )
...
swc_ecma_parser:
- Fix parsing of complex arrow expressions in a conditional expression. (#2174 )
- Report an error for wrong jsx, instead of `panic!`. (#2173 )
swc_ecma_transforms_react:
- `jsx`: Handle fragment with single child correctly. (#2177 )
swc:
- Ensure that #2170 is an invalid issue. (#2170 )
2021-08-29 20:40:52 +00:00
Sosuke Suzuki
a10118c90f
feat(es/parser, es/codegen, es/visit): Support static blocks in classes ( #2130 )
...
swc_ecma_ast:
- Add support for static blocks in classes.
2021-08-30 00:03:14 +09:00
David Sherret
3d58457027
refactor(es/dep_graph): Use dyn
instead of impl
( #2119 )
...
swc_ecma_dep_graph:
- Use `dyn` instead of `impl` in `analyze_dependencies`.
2021-08-27 13:08:48 +09:00
강동윤
d975a197c9
fix(es): Fix source map ( #2159 )
...
swc:
- Fill `names` of sourcemap.
- Don't add `sourceContents` to sourcemap if `sources` is added.
node_swc:
- Handle source map for `minify` correctly.
- `minify`: Accept `{ filename: code }`.
2021-08-26 10:44:38 +00:00
강동윤
e468752ebc
fix(es/minifier): Fix usage via yarn resolution ( #2158 )
...
swc_common:
- Deprecate some unused types.
swc:
- `BoolOrObject`: Improve the error message for deserialization failure.
- `BoolOrObject`: Treat an empty object as `true`.
- `JsMinifyFormatOptions`: Add fields. (#2153 )
node_swc:
- Improve error message for deserialization failure.
2021-08-26 06:18:59 +00:00
강동윤
18e2232dbc
feat(plugin): Groundwork for rust plugin system ( #1893 )
2021-08-25 15:07:09 +00:00
강동윤
838a7a8b33
fix(es/minifier): Make use of hygiene optimizer ( #2145 )
...
swc_ecma_ast:
- Implement `Display` for `Ident`.
swc_ecma_minifier:
- Expose `unique_scope`, which is required for `hygiene_optimizer`.
- Improve `hygiene_optimizer`.
swc:
- Use hygiene optimizer. (#1600 , #2137 )
- Add `jsc.experimental.optimizeHygiene`
2021-08-24 15:03:31 +00:00