강동윤
4c8d68bfe2
fix(es): Improve handling of typescript ( #1824 )
...
swc_ecma_codegen:
- Implement more code generator for typescript ast nodes.
swc_ecma_transforms_base:
- Mark LHS of typescript import equals as a variable instead of a type.
2021-06-15 01:13:06 +09:00
강동윤
03db7adc9f
fix(es/transforms/base): Wrap binary operands of unary expressions. ( #1793 )
...
swc_ecma_transforms_base:
- `fixer`: Handle binary operands of unary expressions correctly. (#1789 )
2021-06-05 12:58:50 +00:00
강동윤
0bd2a3a07e
fix(es/transforms): Fix bugs ( #1783 )
...
swc_ecma_transforms_base:
- `fixer`: Wrap operand of a unary expression if it's a binary expression. (#1781 , #1789 )
swc_ecma_transforms_module:
- Allow multiple `export *` even if it has the same item. (#1780 )
2021-06-05 11:13:42 +09:00
강동윤
99e738643a
feat(es/minifier): Implement rules and classify tests ( #1750 )
...
swc_ecma_minifier:
- Classify tests so we can focus on MVP.
2021-05-28 19:44:03 +09:00
강동윤
9fa878c1a6
fix(es/transforms/base): Fix ts_resolver ( #1761 )
...
swc_ecma_transforms_base:
- `ts_resolver`: Handle type-only imports properly. (denoland/deno_lint#705 )
2021-05-28 14:04:00 +09:00
강동윤
ef6a745599
feat(es/minifier): Implement more rules ( #1735 )
...
swc_ecma_minifier:
- Implement `evaluate` partially.
- Store 'expected output' from terser along with our result.
swc_ecma_transforms_base:
- `fixer`: Don't wrap `+ (a % b)`.
swc_ecma_transforms_optimization:
- `expr_simplifier`: Preserve this in calls.
2021-05-25 16:39:07 +09:00
강동윤
5e2db21e47
feat(es/minifier): Implement more rules ( #1731 )
...
swc_ecma_codegen:
- Don't panic while checking if 2 dots are required.
swc_ecma_minifier:
- Implement some rules related to the option `evaluate`.
- Implement some rules related to strings.
- Implement some rules related to numbers.
swc_ecma_transforms_base:
- `fixer`: Handle `- (1 / 0)`.
- `fixer`: Handle `(void 0)(0)`.
2021-05-23 15:39:59 +09:00
강동윤
3522fc71e4
feat(es/minifier): Implement more rules ( #1730 )
...
swc_ecma_codegen:
- Fix codegen of `-0.0`.
swc_ecma_transforms_base:
- `fixer`: Handle tag of tagged template literals.
swc_ecma_minifier:
- Implement more rules for strings.
- Implement more rules for teplate literals.
- Implement more rules for comparisons.
- Implement more rules for destructuring bindings.
- Implement more rules for switch statements.
- Implement more rules for expressions.
2021-05-23 11:19:11 +09:00
강동윤
a1341dcdc6
fix(es/transforms/compat): Fix async_to_generator
pass. ( #1724 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Fix async iife. (#1722 )
- `async_to_generator`: Don't apply iife optimization to named function expressions.
- `async_to_generator`: Remove duplicated works.
- `async_to_generator`: Support `await for`. (#1721 )
- `async_to_generator`: Support async generators.
2021-05-21 13:13:22 +09:00
강동윤
8a2909bc51
fix(es/preset-env): Update core js compat data ( #1719 )
...
swc_ecma_preset_env:
- Update `core-js-compat`. (https://github.com/swc-project/swc/issues/1712#issuecomment-844959483 )
2021-05-20 20:46:03 +09:00
강동윤
a0241c88b2
fix(es/transforms/base): Fix resolver ( #1710 )
...
swc_ecma_transforms_base:
- `ts_resolver`: Treat the type parameter of a mapped type as a binding.
2021-05-18 17:47:43 +09:00
강동윤
dee82904f8
fix(es): Fix bugs ( #1709 )
...
swc_ecma_transforms_base:
- `fixer`: Fix regression related to `??` and `||`. (denoland/deno#10668 )
2021-05-18 15:34:44 +09:00
강동윤
b044d2c6dd
fix(es/transforms/compat): Support private methods ( #1700 )
...
swc_ecma_transforms_base:
- Add some helpers.
swc_ecma_transforms_compat:
- `class_properties`: Support private methods. (Closes #1694 )
2021-05-15 20:35:24 +09:00
강동윤
b4aa1d48e3
fix(es/transform): Fix bugs ( #1699 )
...
swc_ecma_transforms_base:
- Fix bug of `ts_resolver`.
swc_ecma_transforms_typescript:
- `strip`: Emit `export {}` for type-only modules. (#1698 )
- `strip`: Support scripts.
2021-05-15 16:07:24 +09:00
강동윤
2ad0af9e91
fix(es/transforms/compat): Improve performance ( #1673 )
...
swc_ecma_transforms_compat:
- `classes`: Fast-path.
- `destructuring`: Fast-path.
- `sticky_regex`: Fast-path.
- `spread`: Fast-path.
- `shorthand`: Fast-path.
- `typeof_symbol`: Fast-path.
- `block_scoped_functions`: Fast path.
- `duplicate_keys`: Use fxhash.
- `instance_of`: Fast path.
- `reserved_words`: Make string comparison efficient.
2021-05-11 04:53:36 +00:00
강동윤
9381d0dbc2
fix(es/transforms/base): Fix resolver ( #1672 )
...
swc_ecma_transforms_base:
- `resolver`: Handle variables in for in/of loop body correctly.
2021-05-10 20:39:07 +09:00
강동윤
2b918b0c3d
fix(es/transforms/compat): Don't create unnecessary IIFE. ( #1669 )
...
swc_ecma_transforms_compat:
- `class_properties`: Do not create iife if possible. (#1660 )
2021-05-10 16:18:31 +09:00
강동윤
9585500476
fix(es/transforms/base): Fix resolver ( #1666 )
...
swc_ecma_transforms_base:
- `resolver`: Handle function declarations in arrow body.
2021-05-09 09:52:29 +00:00
강동윤
aea08fb8c9
fix(es/tranforms/base): resolver: Handle function declarations in ts modules ( #1665 )
...
swc_ecma_transforms_base:
- `resolver`: Handle function names in ts modules correctly.
2021-05-09 16:03:59 +09:00
Niklas Mischkulnig
f4d0e46cbb
feat(es/transforms/compat): Add pure comment to classes ( #1646 )
...
swc_ecma_transforms_compat:
- Add pure annotations while tranpiling classes.
2021-05-08 15:47:20 +09:00
강동윤
1b1c46b492
fix(es/transforms/compat): Allow keywords in method names. ( #1651 )
...
swc_ecma_transforsm_compat:
- Allow using a keyword as a method name.
2021-05-07 11:27:25 +00:00
강동윤
abc24c9256
fix(es/transforms/resolver): Fix setter properties ( #1647 )
...
swc_ecma_transorms_base:
- Handle parameters of a setter property correctly.
2021-05-06 13:56:42 +09:00
강동윤
deec1f67a3
fix(es/transforms/resolver): Fix setter properties ( #1645 )
...
swc_ecma_transorms_base:
- Handle parameters of a setter property correctly.
2021-05-06 03:09:03 +09:00
강동윤
27a1c30fef
fix(es/transforms/fixer): Handle binary expressions in super class expr ( #1636 )
...
swc_ecma_transforms_base:
- Handle binary expressions in super class expressions. (denoland/deno#10487 )
2021-05-04 12:11:40 +09:00
강동윤
5a0bacb5b8
fix(swc): Fix various bugs ( #1613 )
...
swc_ecma_codegen:
- Fix codegen of `\x00`. (#1619 )
swc_ecma_preset_env:
- Fix order of core-js imports. (#1605 )
swc_ecma_transforms_react:
- Preserve ` `. (#1446 )
swc:
- Upgrade dashmap. (#1616 )
2021-04-28 14:49:21 +09:00
grimly
60ad0df3f5
@swc/helpers exports typeOf instead of typeof ( #1578 )
...
swc_ecma_transforms_base:
- Fix helper names.
2021-04-16 13:48:37 +09:00
Devon Govett
00461f3a76
fix(es/transforms/base): Fix precedence of yield expression inside ternary ( #1577 )
2021-04-15 05:50:43 +00:00
Devon Govett
d8a18dfd9e
fix(es/transforms/compat): Fix block scoping of class declarations ( #1569 )
2021-04-14 17:42:07 +09:00
Austaras
df2a926e9d
fix(es/transforms/module): Use correct this ( #1561 )
...
swc_ecma_transforms_module:
- Preserve semantics of `this` in imported functions. (#1556 )
2021-04-14 00:18:24 +09:00
Devon Govett
92bbde3b53
fix(es/transforms/base): Fix nested function scopes ( #1559 )
...
swc_ecma_transforms_base:
- `resolver`: Handle nested function scopes correctly.
2021-04-13 16:23:04 +09:00
Devon Govett
14edb69826
fix(es/transforms/base/fixer): Fix parens of sequence expressions ( #1566 )
...
swc_ecma_transforms_base:
- Fix parens of sequence expressions in callee and function parameters.
2021-04-12 06:14:55 +00:00
강동윤
5ef3c43522
fix(es): Fix bugs. ( #1565 )
...
swc_ecma_parser:
- Don't panic for `try` statements without handler and finalizer. (denoland/deno#10112)
swc_ecma_transforms_base:
- Fix `typeof`s used with `externalHelpers: true`. (#1458 , #1557 )
2021-04-10 20:55:17 +00:00
Devon Govett
beeb1f9067
fix(es/transforms/base): Fix named function expression handling in resolver ( #1540 )
2021-04-06 13:31:11 +09:00
David Sherret
f1792708b4
fix(es/ast): Remove TsSignatureDecl ( #1531 )
2021-04-04 20:12:17 +09:00
강동윤
4ab7a91fe3
fix(es): Fix for the type checker ( #1528 )
...
swc_ecma_codegen:
- Fix codegen of type assertions.
swc_ecma_transforms_base:
- `resolver`: Handle getter properties.
- •resolver`: Handle setter properties.
2021-04-01 03:01:44 +09:00
강동윤
51d0cef287
fix: Fix bugs ( #1516 )
...
swc_ecma_ast:
- Support TypeScript 4.3. (#1517 )
swc_ecma_parser:
- Support new syntaxes from typescript 4.3. (#1517 )
swc_ecma_transforms_compat:
- Fix '\\`' in template literals. (#1488 )
- `classes`: Fix super calls. (#1490 )
swc_ecma_transforms_module:
- Respect `esModuleInterop` for dynamic imports. (#1480 )
swc_ecma_transforms_typescript:
- `strip`: Remove `declare`-d namespaces. (#1508 )
2021-03-30 16:47:12 +09:00
강동윤
99f4f0f280
fix(swc): Fix bugs for v1.2.52 ( #1506 )
...
swc_ecma_parser:
- Support `private declare`. (#1503 )
- Recover `backtracking` state while doing some nested backtracking. (#1505 )
- Allow using `readonly` as the name of class properties. (#1514 )
swc_ecma_transforms_base:
- `hygiene`: Keep the name of class expressions. (#1507 )
swc_ecma_transforms_typescript:
- Allow a namespace and a class to have the same name. (#1515 )
swc:
- Disable `tsx` if the ext of a file is ts.
2021-03-29 20:48:48 +09:00
강동윤
b7eb1f9154
fix(es/transforms/base): Fix fixer ( #1496 )
...
swc_ecma_transforms_base:
- Fix `('a' ?? 'b') || c`.
2021-03-27 00:45:51 +09:00
강동윤
df3f3106df
fix(es/transforms/fixer): Fix await expressions. ( #1475 )
...
swc_ecma_transforms_base:
- Handle assign expressions in `await` correctly. (denoland/deno#9810 )
2021-03-24 19:25:04 +09:00
강동윤
bc07215d4d
fix(es/parser): Fix lexing of template literals. ( #1450 )
...
swc_ecma_parser:
- Fix lexing of template literals. (denoland/deno#9620 )
- Ensure that denoland/deno#9650 is not a bug of parser.
2021-03-03 17:46:36 +09:00
강동윤
a3105428ba
fix(swc): Fix various bugs ( #1440 )
...
swc:
- Use `hygiene_with_config` instead. (#1279 )
- Allow enabling source map with `.swcrc`. (#1309 )
swc_ecma_transforms_base:
- `hygiene`: Add an option to preserve class names. (#1279 )
swc_ecma_transforms_compat:
- `block_scoping`: Allow using `break` in switch cases. (#1415 )
2021-03-01 17:19:37 +09:00
강동윤
a4d408dc6e
fix(es/transforms/base): Fix span hygiene of type elements ( #1436 )
...
swc_ecma_transforms_base:
- `ts_resolver`: Fix span hygiene of type elements.
2021-02-28 15:55:20 +09:00
David Sherret
adcca03cfa
fix(es/ast): Remove TsTypeCastExpr it's not used ( #1420 )
2021-02-22 17:05:51 +09:00
Yehuda Katz
db85d123b7
Fix a number of typos ( #1412 )
...
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-02-20 15:18:09 +09:00
강동윤
eecdca4e86
fix(es/transforms/base): Fix resolver ( #1414 )
...
swc_ecma_transforms_base:
- `resolver`: Handle private class methods. (denoland/deno_lint#615 )
2021-02-19 19:51:50 +09:00
강동윤
27aad87798
fix(es/transforms/base): Fix hygiene of catch clause ( #1413 )
...
swc_ecma_transforms_base:
- `hygiene`: Apply ops in catch clauses. (#1402 )
2021-02-19 16:52:02 +09:00
강동윤
eaeffabf74
fix(es): Improve performance ( #1411 )
...
swc_ecma_ast:
- Add `BindingIdent`.
- Reduce size of `Ident`.
2021-02-19 15:34:22 +09:00
강동윤
8fb0b4c303
fix(es/transforms/react): Use VisitMut instead of Fold ( #1409 )
...
swc_ecma_transforms_base:
- Implement `MapWithMut` for more types.
swc_ecma_transforms_react:
- Migrate to `VisitMut`.
2021-02-17 14:40:03 +09:00
강동윤
9dabf00200
fix(es): Fix bugs ( #1395 )
...
swc_ecma_codegen:
- Implement `emit_ts_type_assertion`.
- Implement `emit_ts_type_cast_expr`.
- Implement `emit_ts_ns_export_decl`.
- Implement `emit_ts_signature_decl`.
swc_ecma_parser:
- Ensure that we report an error for invalid input. (#1391 )
swc_ecma_transforms_base:
- fixer: Handle `await (await foo)()`. (#1397 )
2021-02-14 22:18:05 +09:00
강동윤
bf445a75c4
fix(swc): Fix bugs ( #1372 )
...
swc_ecma_ast:
- Support import assertions for exports.
swc_ecma_parser:
- Support import assertions for exports.
swc_ecma_transform_typescript:
- Strip `declare globals` correctly. (#1383 )
spack:
- Re-enable multi-entry tests.
2021-02-10 17:25:28 +09:00