Donny
72e892ec12
chore: Publish crates
2021-11-26 23:29:33 +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
a38889be91
chore: Publish crates
2021-11-26 08:31:11 +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
730e138925
chore: Publish crates
2021-11-25 16:17:34 +09:00
Donny
2c9de7dd4a
chore: Publish crates
2021-11-25 15:22:34 +09:00
Donny
62a48875bd
chore: Publish crates
2021-11-25 14:14:43 +09:00
Donny
e04f0867fc
chore: Publish crates
2021-11-24 17:04:09 +09:00
Donny
1cc4de3e9b
chore: Publish v1.2.112
2021-11-24 15:07:18 +09:00
Donny
770da5ae9e
chore: Publish crates
2021-11-24 15:05:46 +09:00
Donny
a8bda3bb9c
chore: Publish crates
2021-11-24 13:54:33 +09:00
Donny
d4ffce13b5
chore: Publish crates
2021-11-24 10:08:01 +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
e4216a2e6c
chore: Publish crates
2021-11-23 21:10:35 +09:00
Donny
c1e99eee3e
chore: Publish crates
2021-11-23 19:07:48 +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
Donny
e99c4d26ae
chore: Publish crates
2021-11-23 18:14:38 +09:00
Donny/강동윤
d0cabc37ed
chore: Publish babel crates ( #2835 )
2021-11-22 21:41:03 +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
7ec522f165
chore: Publish crates
2021-11-22 17:55:07 +09:00
Donny
46e722559e
chore: Publish crates
2021-11-22 01:02:49 +09:00
Donny
a392a4c0fd
chore: Publish crates
2021-11-21 23:43:31 +09:00
Donny/강동윤
7a6bf424c5
fix(es/transforms/base): Fix ts_resolver
( #2826 )
...
swc_ecma_transforms_base:
- `ts_resolver`: Hoist type aliases.
2021-11-21 16:31:12 +09:00
Donny
96d8ee522c
chore: Publish crates
2021-11-21 16:30:42 +09:00
Donny
218a269bb5
chore: Publish crates
2021-11-21 15:48:05 +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
2749817545
chore: Publish crates
2021-11-20 20:25:28 +09:00
Donny/강동윤
6a7775b5da
fix(es/transforms/compat): Fix this
in constructor ( #2818 )
...
swc_ecma_transforms_classes:
- Don't modify `this` in constructors.
swc_ecma_transforms_compat:
- Fix handling of `this` in constructors.
2021-11-20 19:07:42 +09:00
Donny
cdf7f5f5a0
chore: Publish crates
2021-11-20 17:06:40 +09:00
Donny
5a037876dd
chore: Publish crates
2021-11-20 17:05:17 +09:00
Donny
43586d0b7c
chore: Publish crates
2021-11-20 16:29:43 +09:00
Donny
e39748ed4a
chore: Publish crates
2021-11-20 15:52:34 +09:00
Donny/강동윤
1368981f19
fix(wasm): Fix wasm-web
( #2803 )
2021-11-19 15:04:01 +09:00
Donny
51bee9bfd3
chore: Publish crates
2021-11-19 03:02:31 +09:00
David Sherret
02ffe8a289
fix(es/utils): Fix extract_var_ids
( #2798 )
...
swc_ecma_utils:
- `extract_var_ids`: Handle assignment object pattern property.
2021-11-19 03:02:08 +09:00
Donny
ca55539938
chore: Publish crates
2021-11-19 00:12:37 +09:00
Donny
8615a64f2f
chore: Publish crates
2021-11-18 22:19:10 +09:00
Donny
a2f7bade39
chore: Publish crates
2021-11-18 17:25:19 +09:00
Donny
4e8cb5dbfd
chore: Publish crates
2021-11-18 15:46:30 +09:00
Donny
88fe823e77
chore: Publish crates
2021-11-18 15:13:30 +09:00
Donny
ee12362688
chore: Publish crates
2021-11-18 14:18:11 +09:00
Donny
e5604c3e56
chore: Publish
2021-11-18 01:08:33 +09:00
Donny
225af14b52
chore: Publish crates
2021-11-18 01:07:46 +09:00
Donny
8c04d396e4
chore: Publish crates
2021-11-17 16:06:57 +09:00
Donny/강동윤
53c8939550
test(swc): Add a test for sourcemap ( #2777 )
2021-11-17 16:06:37 +09:00
Donny
e03af45c09
chore: Publish crates
2021-11-17 14:00:33 +09:00
Donny
7fcbdf20dd
chore: Publish crates
2021-11-17 13:50:10 +09:00
Donny
3e4fbe7667
chore: Publish crates
2021-11-16 21:57:24 +09:00
Donny
262c8941a2
chore: Publish crates
2021-11-16 21:17:19 +09:00
Donny
6129e990d4
chore: Publish crates
2021-11-16 11:55:00 +09:00
Donny
c15116de07
chore: Publish crates
2021-11-15 17:45:19 +09:00
Donny
2cd565bfc0
chore: Publish crates
2021-11-15 14:31:44 +09:00
Donny/강동윤
f2c67b8caf
fix(es/minifier): Don't inline string literals if it's used multiple time ( #2748 )
...
swc_ecma_minifier:
- Don't inline strings because it's simple.
- Inline short strings.
2021-11-15 14:03:03 +09:00
Donny
8df860e16c
chore: Publish crates
2021-11-14 06:21:28 +09:00
Donny
898ed7015c
chore: Publish crates
2021-11-14 05:35:02 +09:00
Donny/강동윤
b869c81888
refactor(swc_bundler): Extract logic for analyzing cycles ( #2733 )
2021-11-12 23:33:32 +09:00
Donny
3294a35417
chore: Publish crates
2021-11-12 21:27:00 +09:00
Donny
fd4a71747b
chore: Publish crates
2021-11-12 19:10:21 +09:00
Donny
90b7074556
chore: Publish crates
2021-11-12 16:26:08 +09:00
Donny
544835a3a5
chore: Publish crates
2021-11-11 23:37:43 +09:00
Donny/강동윤
665c8e05fc
fix(es): Move TargetEnv
to loader from ast ( #2719 )
...
swc_ecma_ast:
- Move `TargetEnv` to `swc_ecma_loader`.
swc_ecma_loader:
- Drop unused dependencies.
2021-11-11 20:00:46 +09:00
Donny/강동윤
1d028fe940
fix(es): Fix paths
support ( #2712 )
...
swc_ecma_loader:
- `TsConfigResolver`: Use `baseUrl` on exact match while resolving. (Closes #2126 )
swc_ecma_transforms_module:
- Add `import_rewriter`.
- `NodeImportResolver`: Don't strip extension if it's a directory. (Closes #2269 )
- `NodeImportResolver`: Don't strip extension if it's not `.ts`, `.js` nor `.tsx`.
swc:
- Use `import_rewriter`. (Closes #1943 , Closes #2523 )
- Update test (Closes #2715 )
2021-11-11 16:57:31 +09:00
Donny
c5aac71660
chore: Publish crates
2021-11-11 14:15:29 +09:00
Donny
5db7bdc133
chore: Publish crates
2021-11-10 21:59:34 +09:00
Donny
3adeb6bf30
chore: Publish crates
2021-11-10 20:57:43 +09:00
Donny
4863bee163
chore: Publish crates
2021-11-10 17:35:07 +09:00
Donny
158136fae9
chore: Publish crates
2021-11-10 16:16:19 +09:00
Donny
2be8559e35
chore: Publish crates
2021-11-10 13:58:42 +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
797f4fff14
chore: Publish crates
2021-11-09 16:13:52 +09:00
Donny/강동윤
22ce68cfaa
fix(swc): Don't print same error twice ( #2692 )
2021-11-09 15:18:11 +09:00
Donny
bcf1cfa6a1
chore: Publish crates
2021-11-09 15:17:27 +09:00
Donny/강동윤
368b9e2ff2
chore: Update rustc to prevent CVE-2021-42574
( #2690 )
2021-11-09 14:20:02 +09:00
Donny
7e259abae1
chore: Publish crates
2021-11-08 16:26:51 +09:00
Donny
76d9ae7656
chore: Publish crates
2021-11-08 16:01:09 +09:00
Donny
6b478ccce0
chore: Publish crates
2021-11-08 15:05:21 +09:00
Donny
98fc40988c
chore: Publish crates
2021-11-08 13:06:54 +09:00
Donny
fd14b4f1dd
chore: Publish crates
2021-11-08 00:29:47 +09:00
Donny
999ad77a3d
chore: Publish crates
2021-11-07 02:27:34 +09:00
Donny
5c2479c005
chore: Publish crates
2021-11-07 01:19:57 +09:00
Donny
b3fd7046d7
chore: Publish crates
2021-11-06 18:35:38 +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
0240beccdf
chore: Publish crates
2021-11-05 20:48:06 +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
224972f487
chore: Publish crates
2021-11-05 05:14:56 +09:00
Donny/강동윤
a6836368a2
fix(plugin): Fix serialization and deserialization ( #2651 )
...
swc_plugin_api:
- Add `serialize_ast`.
- Add `deserialize_ast`.
2021-11-04 21:15:18 +09:00
Donny
46e32a6a72
chore: Publish crates
2021-11-04 19:59:54 +09:00
Donny/강동윤
0414c31480
feat(es/ast): Implement Take
for more types ( #2649 )
2021-11-04 19:59:28 +09:00
Donny
04befab67a
chore: Publish crates
2021-11-04 19:27:31 +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
Alexander Akait
8c61d0d609
feat(css/ast): Add RoundBracketBlock
to Value
( #2618 )
2021-11-04 12:05:29 +09:00
Donny
7403956d4a
chore: Publish crates
2021-11-03 22:46:51 +09:00
Donny
a973b0bed4
chore: Publish crates
2021-11-03 13:55:27 +09:00
Donny
1c5f75485f
chore: Publish crates
2021-11-03 13:21:40 +09:00
Donny
4e003b60f7
chore: Publish crates
2021-11-03 11:25:56 +09:00
Donny/강동윤
04238d0b93
feat(swc_common): Allow dylib
( #2628 )
...
swc_common:
- Add `dylib` to `crate-type`.
2021-11-02 23:54:20 +09:00
Donny
74aa0068db
chore: Publish crates
2021-11-02 20:15:43 +09:00
Donny
170a53a4ce
chore: Publish crates
2021-11-02 18:42:35 +09:00
Donny
9a2f729322
chore: Publish crates
2021-11-02 14:53:36 +09:00
Alexander Akait
c89a9ea171
fix(css/lexer): Fix some edge cases ( #2612 )
2021-11-02 05:28:19 +00:00
Donny
6644a06da6
chore: Publish crates
2021-11-02 14:00:33 +09:00
Donny
befda9752e
chore: Publish crates
2021-11-02 13:59:56 +09:00
Donny
fbbdeeae56
chore: Publish crates
2021-11-01 16:54:32 +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
cd2a2777d9
chore: Publish crates
2021-10-31 18:17:31 +09:00
Donny/강동윤
306cf989db
fix(es/minifier): Fix minifier ( #2597 )
...
swc_ecma_minifier:
- Fix `negate_cost`.
2021-10-31 08:43:44 +00:00
Donny
4328276414
chore: Publish crates
2021-10-30 21:41:20 +09:00
Donny
bb189c74ac
chore: Publish crates
2021-10-30 15:53:07 +09:00
Alexander Akait
f77d6ceb00
feat(css/ast): Add SquareBracketBlock
( #2573 )
2021-10-30 14:53:11 +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
Alexander Akait
47f7f1ad4f
fix(css/parser): Resolve some TODOs ( #2572 )
2021-10-29 19:55:02 +09:00
Alexander Akait
67c0d4cc37
feat(css/parser): Use Function
token. ( #2571 )
2021-10-29 17:48:04 +09:00
Alexander Akait
4f0473616d
feat(css/ast): Add value
to the whitespace token ( #2533 )
2021-10-28 23:48:31 +09:00
Donny/강동윤
69cfa98c50
fix(es/minifier): Fix block unwrapping issue ( #2570 )
...
swc_ecma_minifier:
- Check more before removing `{` and `}`.
2021-10-28 10:58:26 +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/강동윤
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
7fae0bb979
chore: Pulbish
2021-10-28 09:25:30 +09:00
David Sherret
7b4af435f2
feat(es/parser): Enable ergonomic brand checks for TypeScript ( #2562 )
2021-10-28 09:22:51 +09:00
Donny/강동윤
79a426e0d8
fix(es/minifier): Don't treat catch clause as a scope ( #2557 )
...
swc_ecma_minifier:
- Don't treat a catch clause as a scope.
2021-10-27 11:19:30 +00:00
OJ Kwon
97b5a738c2
fix(es/fixer): Preserve more parens ( #2553 )
...
swc_ecma_transforms_base:
- `fixer`: Preserve parens of a binary expression if the LHS is an object literal. (#2550 )
2021-10-27 16:56:45 +09:00
Donny/강동윤
5f0524c54e
fix(es/transforms/react): Revert #2542 ( #2552 )
2021-10-27 04:42:12 +00:00
Donny/강동윤
f81b60fd1b
fix(es/minifier): Fix minifier ( #2551 )
...
swc_ecma_minifier:
- `hoist_props`: Check for infection. (#2506 )
2021-10-27 04:19:14 +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
Alexander Akait
0e458778ec
refactor(css/ast): Rename types ( #2532 )
2021-10-27 03:38:05 +09:00
Donny/강동윤
70f55833e9
feat(es/transforms/react): Improve development more ( #2542 )
...
swc_ecma_transforms_react:
- `jsx_src`: Add column to `__source`.
- `jsx`: Support `jsxDEV`.
- `jsx`: Handle `__source` and `__self` specially.
2021-10-26 11:09:09 +00:00
Donny/강동윤
b8933e3db9
fix(swc): Fix bugs ( #2538 )
...
swc_ecma_transforms_base:
- `unique_scopes`: Handle method properties.
- `hygiene`: Fix handling of method properties. (#2539 )
swc_ecma_transforms_compat:
- Fold children of for-of/in statements. (#2531 )
swc_ecma_minifier:
- `name_mangler`: Fix handling of method properties.
2021-10-26 07:43:32 +00:00
Alexander Akait
5ef6686029
refactor(css/codegen): Use raw
instead ( #2534 )
...
swc_css_codegen:
- Remove `write_ident`.
- Use `raw` for printing identifiers.
2021-10-26 14:34:47 +09:00
Nayeem Rahman
693181ee6a
fix(es/transforms/typescript): Remove declare
d class properties ( #2530 )
...
swc_ecma_transforms_typescript:
- `strip`: Remove class properties with `declare` keyword.
2021-10-26 14:31:20 +09:00
Alexander Akait
6876b1b26c
refactor(css/parser): Fix parsing of some selectors ( #2525 )
...
swc_css_parser:
- Fix whitespace bugs related to parsing of attribute selectors.
- Fix bugs related to empty namespace selectors.
2021-10-25 23:48:56 +09:00
Donny/강동윤
dcf5f05195
fix(es/minifier): Fix minifier ( #2528 )
...
swc_ecma_minifier:
- `collapse_vars`: Respect operator.
2021-10-25 12:24:40 +00:00
Donny/강동윤
a099e8f846
perf(es/minifier): Make name mangler parallel ( #2527 )
...
swc_ecma_minifier:
- Remove useless `RefCell<T>`.
- Make name mangler parallel.
2021-10-25 07:09:00 +00:00
Donny/강동윤
e7189fbdbd
fix(es/transforms/compat): Fix async_to_generator
( #2526 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Handle `for-await` correctly. (#2306 )
2021-10-25 05:37:13 +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/강동윤
cead404a53
fix(bundler): Fix bundler ( #2510 )
...
swc_bundler:
- Consider usage in named export specifier while analyzing imports.
2021-10-24 16:25:59 +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
Alexander Akait
430a06ce4d
refactor(css/parser): Respect spec ( #2487 )
2021-10-23 21:27:16 +09:00
Donny/강동윤
f33d3218cd
feat(es/transforms/compat): Add single-property optimization to destructuring
( #2511 )
...
swc_ecma_transforms_compat:
- `destructuring`: Convert single-property destructuring to direct field access.
2021-10-22 13:46:29 +00:00
Alexander Akait
e327c9a502
feat(css/ast): Add Percent
token ( #2482 )
2021-10-22 13:35:29 +09:00
Donny/강동윤
175c997676
fix(es/transforms/react): Fix hygiene of react fast refresh ( #2501 )
...
swc_ecma_trasnforms_react:
- `refresh`: Use span hygiene system.
2021-10-21 14:09:00 +00:00
Donny/강동윤
9e215769cc
fix(es/minifier): Fix minifier using Deno
test suite ( #2503 )
...
swc_ecma_codegen:
- Emit `;` after private class properties.
swc_ecma_minifier:
- `pure`: Drop more invalid expressions.
- `sequences`: Drop more invalid expressions.
- `strings`: Fix concat.
- `inline`: Inline into `b` in `a[b] = foo`.
2021-10-21 11:56:48 +00:00
Nayeem Rahman
c29a6e11c9
fix(es/transforms/typescript): Fix strip
( #2496 )
...
swc_ecma_transforms_typescript:
- Visit the RHS of import equals declaration properly.
2021-10-21 15:12:51 +09:00
Donny
7af0f8c81b
chore: Publish
2021-10-21 14:16:15 +09: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
Alexander Akait
d83bde8ca5
fix(css/parser): Fix parsing of url ( #2484 )
2021-10-20 15:39:01 +09: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
Sosuke Suzuki
bb1cc974c7
feat(es/trasform): Support static blocks ( #2474 )
...
swc_ecma_transforms_proposal:
- Add transform for static blocks, which is stage 3.
2021-10-20 14:18:55 +09:00
Donny/강동윤
cef2c8666e
fix(es/minifier): Fix join_vars
( #2494 )
...
swc_ecma_minifier:
- Don't join `let`/`const` into narrower scope.
2021-10-20 05:17:14 +00:00
David Sherret
3886eeddd5
fix(es/parser): Fix parsing of a property named async
( #2485 )
2021-10-20 04:31:52 +09:00
Donny/강동윤
7c5b6cafd8
fix(es/minifier): Fix regexp handling ( #2489 )
...
swc_ecma_minifier:
- Use allowlist of characters for optimizing RegExp calls.
2021-10-19 19:30:20 +00:00
Donny/강동윤
bf886bac73
perf(es/parser): Make typescript parser faster ( #2483 )
...
swc_ecma_parser:
- Check for option before backtracking.
2021-10-20 00:00:48 +09: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/강동윤
9b96885171
fix(es/transforms/compat): Fix handling of private static properties ( #2478 )
...
swc_ecma_transforms_compat:
- `class_properties`: Replace `this` in private static property initializers. (#2476 )
2021-10-19 11:21:13 +00:00
Donny/강동윤
0020e16370
fix(es/minifier): Fix minifier ( #2477 )
...
swc_ecma_minifier:
- `MultiReplacer`: Handle inlining into shorthands.
- `ExprReplacer`: Handle inlining into shorthands.
2021-10-19 11:00:51 +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
Alexander Akait
5234530cd5
fix(css/ast): Use correct type for units ( #2464 )
2021-10-19 17:32:59 +09: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/강동윤
01e171a4b4
test(es): Freeze as es2015
to verify base transforms ( #2468 )
2021-10-19 05:31:12 +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
98a18e306a
chore: Publish swc_ecma_transforms_compat
2021-10-19 00:43:00 +09:00
Donny/강동윤
5bcabb0471
fix(es/transforms/compat): Fix regenerator ( #2460 )
2021-10-18 12:35:26 +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/강동윤
06ca25f3d0
fix(es/minifier): Check for conditional usages while inlining ( #2459 )
...
swc_ecma_minifier:
- `hoist_props`: Check for `used_in_cond` before inlining.
2021-10-18 07:34:17 +00: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/강동윤
675c0e714f
test(es): Use typescript test suite as a golden testing ( #2456 )
2021-10-18 04:07:23 +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
Alexander Akait
4f2dbd816c
fix(css/parser): Fix parsing of numbers ( #2444 )
2021-10-17 23:24:28 +09:00
Donny/강동윤
de368f6bb7
fix(es/codegen): Escape backtick of synthesized template literals ( #2453 )
...
swc_ecma_codegen:
- Escape backtick of a template literal if it's synthesized.
2021-10-17 20:44:21 +09:00
Donny/강동윤
63ad4b4322
fix(es/minifier): Fix minification of react hooks ( #2450 )
...
swc_ecma_minifier:
- `analyze`: Track for conditional usages.
- `collapse_vars`: Don't inline a variable if usage it conditinal.
2021-10-17 15:24:17 +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/강동윤
7ab07ab0b9
fix(es/transforms/base): Fix resolver
( #2448 )
...
swc_ecma_transforms_base:
- `resolver`: Handle `AssignPatProp` from `Hoister`.
2021-10-16 15:12:53 +09:00
Donny/강동윤
ee9177b753
fix(es): Fix bugs ( #2447 )
...
swc_ecma_parser:
- Fix parsing of jsx escapes.
swc_ecma_minifier:
- Don't mangle name as `const` or `let`. (#2446 )
swc_ecma_transforms_react:
- Fix handling of jsx escapes. (#2351 )
2021-10-16 04:25:54 +00:00
Donny/강동윤
7f04ef4715
feat(css/parser): Allow invalid line comments ( #2443 )
...
swc_css_parser:
- Accept line comments with an option.
2021-10-15 23:21:33 +09:00
Alexander Akait
c2ce89c0fb
feat(css): Add BadUrl
token ( #2426 )
...
swc_css_ast:
- Add `BadUrl` to `Token`.
swc_css_parser:
- Implement error recovery for bad urls.
2021-10-15 22:36:54 +09:00
Donny
dcf42771ad
chore: Publish
2021-10-15 19:21:25 +09: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/강동윤
e722bd4887
perf(es/transforms): Reduce usage of #[fast_path]
( #2439 )
...
swc_ecma_transforms_compat:
- Remove `#[fast_path]` from passes.
- Migrate some passes to `VisitMut`.
2021-10-15 10:18:27 +00:00
Donny/강동윤
d045244089
fix(es/codegen): Fix codegen of synthesized template literals. ( #2440 )
...
swc_ecma_codegen:
- Don't handle synthesized backtick specially.
2021-10-15 09:12:40 +00: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/강동윤
0e48284afb
fix(es/minifier): Fix bugs ( #2433 )
...
swc_ecma_minifier:
- `sequences`: Stop searching for candidates if a dependency issue is found.
2021-10-14 13:48:14 +00:00
Donny/강동윤
f8995848b8
fix(es/transforms/proposal): Fix type detection ( #2431 )
...
swc_ecma_transforms_proposal:
- Try the type of the LHS of an assignment pattern. (#2428 )
2021-10-14 06:19:34 +00:00
Alexander Akait
e2e4f2f64f
fix(css/ast): Fix delimiter token ( #2415 )
2021-10-14 13:22:51 +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
Alexander Akait
f7b065ef0b
fix(css/parser): Fix parsing of comments ( #2414 )
2021-10-13 20:48:15 +09:00
Donny/강동윤
aff6670856
fix(es/minifier): Fix infinite loop ( #2424 )
...
swc_ecma_minifier:
- Prevent infinite loop of post-optimize inliner.
2021-10-13 19:26:47 +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
Bojan Đurđević
029cf056f2
fix(es/transforms/react): Fix escape of quote in HTML entities ( #2419 )
...
swc_ecma_transforms_react:
- Handle escape of `"` correctly.
2021-10-13 14:33:15 +09:00
Alexander Akait
fb4869f413
feat(css/ast): Add delim token ( #2398 )
2021-10-12 20:47:17 +09:00
Donny/강동윤
62f7f655a9
fix(es/minifier): Fix iteration order ( #2412 )
...
swc_ecma_minifier:
- Don't use `AHashMap::drain` for inlining variables.
2021-10-12 10:19:20 +00:00
David Sherret
d114e7d364
refactor(es/parser): Cleanup codes for the comment buffer ( #2410 )
2021-10-12 12:08:06 +09:00
Donny/강동윤
4411d1d3a5
perf(atoms): Update string_cache
( #2411 )
...
swc_atoms:
- Use `string_cache` with `parking_lot` patch applied.
wasm:
- Pin `parking_lot_core` to `=0.8.0` to workaround https://github.com/Amanieu/parking_lot/issues/269 .
2021-10-12 03:05:17 +00:00
David Sherret
4d4771109a
fix(es/parser): Ensure that comments are collected ( #2407 )
2021-10-12 11:07:52 +09:00
Pig Fang
4ad25d2155
refactor(es/parser): Simplify parsing logic ( #2405 )
2021-10-11 23:09:45 +09:00