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
Donny/강동윤
b5f832193a
perf(bundler): Improve performance ( #2394 )
...
swc_ecma_utils:
- Make `collect_decls` parallel. (with threshold of 128)
swc_bundler:
- Make inlining of synthesized variables parallel.
2021-10-11 13:00:02 +00: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/강동윤
f5607891e4
fix(es/transforms/testing): Fix test_fixture
( #2400 )
...
swc_ecma_transforms_testing:
- Make logic depends on `NormalizedOutput::compare_to_file`.
2021-10-11 05:03:57 +00:00
Pig Fang
d7f570ff7c
fix(es/parser): Fix async function in SeqExpr
( #2399 )
2021-10-11 12:38:35 +09:00
Alexander Akait
2678c34488
feat(css/ast): Add raw
to Url
( #2389 )
2021-10-11 12:33:11 +09:00
Pig Fang
4458f9c74d
fix(es/parser): Allow async
in TsAsExpr
( #2395 )
2021-10-10 20:22:42 +09:00
Donny
fd08a27f0c
chore(plugin): Publish
2021-10-10 20:18:19 +09:00
Donny/강동윤
897f4b670e
fix(dev/cli): Remove CLI from main swc repositoy ( #2393 )
2021-10-10 11:17:12 +00:00
Donny/강동윤
ff2baf75b4
fix(swc): Fix bugs ( #2396 )
...
swc_ecma_codegen:
- Check for comments deeply while emitting a return statement.
swc_ecma_transforms_react:
- Fix handling of texts in attributes.
2021-10-10 09:19:47 +00:00
Donny/강동윤
a33032279a
perf(es/transforms/base): Make resolver
faster ( #2392 )
...
swc_ecma_transforms_base:
- `resolver`: Don't use `Mark::parent()`.
2021-10-10 05:06:07 +00:00
Donny/강동윤
ab687a0f98
fix(es/minifer): Fix handling of callable expressions ( #2379 )
...
swc_ecma_minifier:
- `sequences`: Don't inline into arrow expression or function expressions.
- Inject variables to arrow expressions correctly.
2021-10-10 03:47:11 +00:00
Pig Fang
be3dca295b
fix(es/parser): Allow using async
as the first one in parameters ( #2388 )
2021-10-10 11:02:32 +09:00
Alexander Akait
a5592e3207
feat(css/ast): Add raw
to Str
( #2295 )
2021-10-10 10:43:11 +09:00
Donny/강동윤
7a31a3f530
feat(plugin/api): Determine plugin api ( #2199 )
2021-10-09 17:47:42 +09:00
Pig Fang
2379fe1ce0
fix(es/parser): Allow using async
as the first one in parameters ( #2386 )
2021-10-09 17:09:09 +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
Pig Fang
644e49c7fa
refactor(es/parser): Simplify parsing logic ( #2381 )
2021-10-09 10:22:47 +09: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
Alexander Akait
cf1235ece1
fix(css): Change the type of the source of @import
rules. ( #2363 )
2021-10-08 20:55:19 +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/강동윤
4466ca6ab8
fix(es/transforms/react): Allow non-first jsx directives ( #2377 )
...
swc_ecma_transforsm_react:
- Allow using jsx directives like `jsxRuntime` at any statement.
2021-10-08 06:49:14 +00:00
Yunfei He
500dbf244b
feat(es/codegen): Expose more API ( #2375 )
...
swc_ecma_codegen:
- `Emitter`: Make `emit_module_item` public.
2021-10-08 14:36:47 +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
Niklas Mischkulnig
1f99c3a44c
fix(es/transforms/optimization): Fix dead_branch_remover
( #2373 )
...
swc_ecma_transforms_optimization:
- `dead_branch_remover`: Fix handling of `switch(boolean)`.
2021-10-08 11:56:09 +09:00
Donny/강동윤
b0ee9543d4
doc(es/ast): Document identifier mangagement system ( #2371 )
2021-10-08 01:02:02 +09:00
Donny/강동윤
7a19fc6e8c
fix(es/trasnforms/testing): Improve test_fixture
( #2369 )
...
swc_ecma_transforms_testing:
- `test_fixture`: Don't print stderr to file.
- Enable logging.
- Add `test_fixture_allowing_error`.
2021-10-07 12:24:41 +00:00
Alexander Akait
4ff1b7568c
feat(css/ast): Add raw to Text
( #2361 )
2021-10-07 20:32:54 +09:00
Pig Fang
d65ce85030
fix(es/parser): Report errors for array patterns without comma ( #2365 )
2021-10-07 17:03:06 +09:00
Pig Fang
521e6717ad
fix(es/parser): Report errors for multiple array elements without comma ( #2366 )
2021-10-07 16:08:53 +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/강동윤
3714802bd3
feat(css): Add error recovery for tokens in selector positions ( #2357 )
...
swc_css_ast:
- Add `Rule::Invalid`.
swc_css_parser:
- Add error recovery for tokens in selector positions.
- Report an error while recovering property errors.
2021-10-06 09:25:05 +00: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/강동윤
a553451562
chore(es/minifier): Publish ( #2354 )
2021-10-06 14:02:24 +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/강동윤
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/강동윤
87b20a8896
fix(es/minifier): Fix inlining into shorthand properties ( #2348 )
...
swc_ecma_minifer:
- Fix inlining of bindings into shorthand properties.
2021-10-05 09:53:00 +00:00
Donny/강동윤
b64afb5b6f
fix(es/utils): Fix macros ( #2349 )
...
swc_ecma_utils:
- Allow using macros from crates using `swc_ecmascript`.
2021-10-05 09:14:25 +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
Julien Roncaglia
20171a3654
fix(testing): Fix CRLF issue on windows ( #2338 )
2021-10-04 10:58:36 +09:00
Donny/강동윤
9f4c5b7ba5
fix(css/parser): Fix error recovery logic of property values ( #2331 )
...
swc_css_parser:
- Fix `state` used for error recovery.
2021-10-01 11:04:24 +00:00
Donny/강동윤
dad73926e6
fix(es/minifier): Fix minifier ( #2323 )
...
swc_ecma_minifier:
- Don't inline literals if a property is mutated.
2021-09-30 07:50:34 +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/강동윤
bd92d89306
fix(es/codegen): Fix codegen of numbers ( #2317 )
...
swc_ecma_codegen:
- Fix codegen of numbers when minification is enabled. (#2294 )
2021-09-29 11:08:59 +00:00
Donny/강동윤
ce40ff73a7
feat(css/parser): Implement more error recovery ( #2316 )
...
swc_css_parser:
- Recover from wrong properties like `flex-basis: __styled-jsx-placeholder__2%;`.
2021-09-29 05:38:49 +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
Donny/강동윤
36c83127e8
fix(css): Reexport codegen from swc_css
( #2314 )
...
swc_css:
- Reexport `swc_css_codegen`.
2021-09-28 13:32:35 +00:00
Pig Fang
2b292e6d17
feat(es): Support type-only import/export specifiers ( #2309 )
2021-09-28 22:05:20 +09:00
Donny/강동윤
b206404d94
feat(css): Recover from invalid properties ( #2312 )
...
swc_css_ast:
- Add `DeclBlockItem`.
- Change `DeclBlock.properties` to `DeclBlock.items`.
swc_css_parser:
- Add a way to recovered errors.
2021-09-28 09:58:56 +00:00
Donny/강동윤
e8a1710a21
fix(es/minifier): Fix bugs ( #2283 )
...
swc_ecma_transforms_optimization:
- `expr_simplifier`: Don't inject `0` needlessly. (#2257 )
2021-09-27 12:05:31 +00: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
Pig Fang
552fc2374d
fix(es/parser): Improve error message ( #2304 )
...
swc_ecma_parser:
- Improve error message for unexpected tokens.
2021-09-26 01:19:08 +09:00
Donny/강동윤
83d88ce388
chore: Improve docs ( #2301 )
2021-09-24 19:41:01 +09:00
Donny/강동윤
5e1003ec4c
fix(es/transforms/base): Fix hygiene
( #2299 )
...
swc_ecma_transforms_base:
- `hygiene`: Support usage-def conflict where def comes first. (#2297 )
2021-09-24 10:26:01 +00:00
Alexander Akait
75c930caf1
fix(css/ast): Fix typo ( #2298 )
2021-09-24 15:48:31 +09:00
Alexander Akait
2f4da9a8ff
fix(css/parser): Fix parsing of !important
( #2286 )
2021-09-23 20:50:16 +09: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
Donny/강동윤
2156364121
fix(es/transforms/base): Fix hygiene
( #2282 )
...
swc_ecma_transforms_base:
- `hygiene`: Handle decl-ref conflict. (#2211 )
2021-09-22 06:56:04 +00:00
Alexander Akait
b5ad03d0b1
fix(css/parser): Fix parsing of url ( #2280 )
...
swc_css_parser:
- Fix parsing of url values with space.
2021-09-21 23:52:28 +09: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
Alexander Akait
9eb45e8515
fix(css/parser): Allow @at-rules to be lowercased ( #2274 )
...
swc_css_parser:
- Allow lowercase for @at-rules.
2021-09-21 16:55:46 +09:00
Fábio Santos
3f306f0b79
fix(es/minifier): Don't drop used variables ( #2272 )
...
swc_ecma_minifier:
- Don't drop used variables. (#2262 )
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2021-09-21 16:45:28 +09: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
David Sherret
8e0a5450b1
fix(es/codegen): Emit static
before readonly
( #2271 )
2021-09-19 16:28:33 +09:00
강동윤
ce01b8a9b7
fix(es): Fix bugs ( #2256 )
...
swc_ecma_codegen:
- Fix source map of string literals. (#2253 )
swc_ecma_transforms_typescript:
- Allow using same name for a module with function. (#2243 )
2021-09-18 07:52:08 +00:00
강동윤
f087d1515b
fix(es/transforms/testing): Fix comparing logic ( #2263 )
...
swc_ecma_transform_testing:
- Fix comparing logic.
2021-09-16 20:21:09 +09:00
강동윤
e2d8465565
fix(es/codegen): Fix codegen of ` in synthesized template literals ( #2260 )
...
swc_ecma_codegen:
- Fix codegen of ` in synthesized template string literals.
2021-09-16 09:26:02 +00:00
강동윤
20ce326909
feat(es/minifer): Improve minifier ( #2229 )
...
swc_ecma_minifier:
- `if_return`: Allow side-effect-free statements to come after `if_return`.
- `collapse_vars`: Move variables without init to first.
- `analyzer`: Remove useless fields.
- Don't drop `return` tokens if there's a finally block.
- `drop_return_value`: Drop side-effect-free return arguments.
- `make_sequences`: Don't inject `void 0` to return args.
- `if_terminate`: Move to the pure optimizer.
- Fix a bug related to `RegExp`.
2021-09-16 04:23:33 +00:00
강동윤
6f33c327cb
fix(es/transforms): Fix bugs ( #2249 )
...
swc_ecma_transforms_compat:
- Fix `this` in class properties. (#2228 )
swc_ecma_transforms_typescript:
- Handle `import =` correctly. (#2234 )
- Ensure that #1653 is not the case anymore. (#1653 )
swc:
- Ensure that #2232 is not the case. (#2232 )
2021-09-15 07:46:03 +00: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
Iron Lu
6e12ef0306
fix(es/transforms/compat): Add new.target
to es5
( #2231 )
2021-09-13 15:51:17 +09: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
강동윤
a9573b9a5f
fix(css/parser): Fix parsing of selectors ( #2221 )
...
swc_css_parser:
- Allow parsing `foo` as selector.
2021-09-09 05:36:56 +00:00
강동윤
b4796d9d54
fix: Fix simple bugs ( #2220 )
...
swc_ecma_utils:
- Don't panic on jsx.
swc_ecma_transforms_typescript:
- Drop type-only reexports. (#2219 )
2021-09-09 05:06:03 +00:00
강동윤
c8b46bf6db
feat(es/minifier): Implement more rules ( #2183 )
...
swc_ecma_codegen:
- Don't panic on `Pat::Invalid`.
- Fix codegen of unary minus. (#2213 )
swc_ecma_minifier:
- Remove identifier of function expressions if a variable with same name exists.
- `sequences`: Merge into the argument of a throw statement.
- Use `ignore_return_value` for `void` expressions.
- Improve inlining.
- Drop last `return` if the return value is not used.
- `sequences`: Merge `c++; use(c)` as `use(++c)`.
- `sequences`: Merge assignments with an operator.
- `comparisons`: Optimize the comparison operator if type is equivalent.
- Fix `negate_cost`.
- `unused`: Fix order or variable initalizer when variables are dropped.
- Fix `top_retain` option.
- `if_return`: Don't merge nested if it's wrong to do so. (#2214 )
- Fix negation of `if_return`.
2021-09-08 09:45:39 +00:00
강동윤
d8ae4c4e90
fix(css/parser): Fix parsing of selectors ( #2217 )
...
swc_css_parser:
- Remove `Parse<CompoundSelector>` implementation.
- Add `Parse<ComplexSelector>` implementation.
- Add `Parse<Vec<ComplexSelector>>` implementation.
- Verify tokens input.
2021-09-08 01:19:14 +00:00
Sosuke Suzuki
cbc8230310
fix(es/parser): Fix parsing of static blocks ( #2200 )
...
swc_ecma_parser:
- Fix parsing of static blocks with line breaks. (#2195 )
2021-09-03 14:57:23 +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