Commit Graph

1103 Commits

Author SHA1 Message Date
강동윤
9a07869c21
fix(bundler): Improve performance (#1599)
swc_bundler:
 - Skip sorting of statements if a module does not import anything.
2021-04-22 10:43:35 +00:00
강동윤
8222cc075d
feat(ast_node): Add #[ast_serde] (#1595)
ast_node:
 - Add `#[ast_serde]`.
2021-04-21 09:11:50 +00:00
강동윤
dbec753ca1
fix(swc): Fix bugs (#1591)
swc_ecma_parser:
 - Support optional async class methods. (#1454)

swc_ecma_transforms_compat:
 - Hoist import statements. (#1457)
2021-04-21 09:26:07 +09:00
Devon Govett
1c4fa63bdc
fix(es/transforms/compat): Handle references to arguments inside arrow functions and block scoped loops (#1585)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-04-19 15:50:44 +00:00
강동윤
c765c7e06e
fix: Fix bugs (#1590)
swc_ecma_transforms_proposal:
 - Detect decorators in typescript parameter properties. (#1456)

swc:
 - Add tests for #1362. (#1362)
2021-04-19 10:16:10 +00:00
강동윤
4db24fb7f6
fix(swc): Fix various bugs (#1588)
swc_ecma_transforms_module:
 - Change the order of functions exported as default. (#1568)
 - Handle mixed imports correctly. (#1525)

swc:
 - Ensure that #1581 is fixed. (#1581)
2021-04-18 20:58:30 +00:00
Devon Govett
d7ea5ae00c
fix(es/transforms/compat): Fix syntax context of super classes (#1586) 2021-04-18 15:40:06 +00:00
강동윤
46c3d62ebd
fix(swc): Fix bugs (#1560)
spack:
 - Ensure that #1533 is fixed. (#1533) 

swc_ecma_parser:
 - Support `async override` in classes. (#1558)

swc_ecma_transforms_compat:
 - `async_to_generator`: Preserve this in async object methods. (#1575)
 - `nullish_coaelscing`: Fix assignments. (#1570)
 - `export_namespace_from`: Preserve order of statements. (#1457)

swc:
 - Disable aes. (#1583)
2021-04-17 06:00:14 +00:00
강동윤
1178686a4c
fix(bundler): Fix bundler (#1576)
swc_bundler:
 - Fix remapping of exports. (denoland/deno#9350)
2021-04-16 18:09:38 +00:00
Devon Govett
efa7a9af78
fix(es/transforms/compat): Fix regenerator pass for yield* expressions (#1580)
swc_ecma_transforms_compat:
 - `regenerator`: Fix delegating yield expressions.
2021-04-16 15:44:36 +00: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
강동윤
246bdd5088
fix(bundler): Fix bugs (#1572)
swc_bundler:
 - Ensure that denoland/deno#10141 is fixed. 
 - Run deno tests on ci.
 - Support nested `export *`. (denoland/deno#10153, denoland/deno#10174)

swc_ecma_codegen:
 - Remove `,` after rest elements. (#1573, denoland/deno#10167)

swc_ecma_transforms_optimization:
 - Don't drop items used by the discriminant of a switch.

swc_ecma_transforms_typescript:
 - Remove constructors without a body.
2021-04-14 14:00:33 +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
Niklas Mischkulnig
e43de77ec6
fix(es/transforms/optimization): Preserve missing object members (#1567)
swc_ecma_transforms_optimization:
 - Don't replace missing object members with undefined
2021-04-12 11:18:17 +00: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
Devon Govett
8f5daa3bbb
feat(es/transforms/react): Add pure annotation comments (#1564)
swc_ecma_transforms_react:
 - Add pure annotations for react.
2021-04-11 15:09:27 +09: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
강동윤
2211a9908a
fix(swc): Fix various bugs (#1550)
swc:
 - Improve error message for invalid configs. (#1532)

swc_common:
 - Handle input source map correctly. (#1404)

swc_ecma_parser:
 - Fix parsing of generics type declarations when tsx is enabled. (#1526)

swc_ecma_transforms_compat:
 - Allow using carriage return. (#1549)
2021-04-08 12:55:02 +00:00
Devon Govett
ee641bab63
fix(es/transforms/optimization): Fix function hoisting with early return branch simplification (#1539)
swc_ecam_transforms_optimization:
 - Fix function hoisting.
2021-04-08 05:15:59 +00:00
Pig Fang
f002b73d82
fix(es/parser): Fix error message (#1551)
swc_ecma_parser:
 - Use correct error code for implements preceding extends.
2021-04-07 17:13:54 +00:00
Pig Fang
39e1e54ee4
fix(es/parser): Disallow override in non-subclass (#1552)
swc_ecma_parser:
 - Disallow `override` in classes without super class.
2021-04-07 15:38:24 +00:00
강동윤
645de92762 Bump version 2021-04-07 12:02:35 +09:00
Pig Fang
3d0ad22ace
feat(es): Support override syntax in class for TS 4.3 (#1541)
swc_atoms:
 - Add `override`.

swc_ecma_ast:
 - Add `is_override` to class members.

swc_ecma_parser:
 - Support override syntax of typescript 4.3.
2021-04-06 17:06:18 +00:00
강동윤
62d0cbcabb
fix(es): Fix sourcemap (#1548)
swc_ecma_codegen:
 - Consider indentions while calculating starting point of source map entries. (denoland/deno#10014)
2021-04-06 11:26:51 +00:00
Arend van Beelen jr
228429c7bb
fix(node-swc): Fix handling of tagged template expressions in Visitor (#1544) 2021-04-06 15:22:05 +09:00
Devon Govett
beeb1f9067
fix(es/transforms/base): Fix named function expression handling in resolver (#1540) 2021-04-06 13:31:11 +09:00
WaveSheep
c7dc9116e1
fix(node-swc): Fix VariableDeclarationKind typescript definition (#1542) 2021-04-06 11:43:43 +09:00
David Sherret
f1792708b4 fix(es/ast): Remove TsSignatureDecl (#1531) 2021-04-04 20:12:17 +09:00
WaveSheep
dcaea5fd31
fix(node-swc): Make Argument.spread optional (#1535) 2021-04-04 17:25:32 +09:00
Devon Govett
0d79ca617d
fix(es/transforms/optimization): Fix inlining nested block statements in branch simplifier (#1536)
swc_ecma_transforms_optimization:
 - Fix branch remover.
2021-04-04 17:24:49 +09:00
Austaras
6cad184dfd
feat(es/transforms/react): Fast refresh config (#1538)
swc_ecma_transforms_react:
 - Add a config for fast refresh.
2021-04-04 16:18:17 +09:00
Pig Fang
65122163cf
feat(es): Support TS 4.3 static index signature in class (#1537) 2021-04-04 11:43:13 +09:00
강동윤
252804d2e3
fix(swc): Fix bugs (#1529)
swc_ecma_parser:
 - Fix comment positions. (#1530)

swc_ecam_transforms_compat:
 - Handle default in destructuring binding patterns. (#1477, #1449)
 - `async_to_generator`: Handle `this` correctly for async function in key-value properties. (#1455)

swc_ecam_transforms_typescript:
 - Handle import defaults. (#1448)
2021-04-02 18:47:05 +09:00
Devon Govett
b9f5a50d18
fix(es/transforms/typescript): Fix TS import elision with shadowed declarations (#1521) 2021-04-01 11:46:57 +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
Austaras
0fabc2cfc9
feat(es/transforms/react): Support fast refresh (#1524)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-31 22:14:47 +09:00
강동윤
5ce4e1e927
fix(es/parser): Use correct position for comments (#1527)
swc_ecma_parser:
 - Use correct position for comments in

```ts
function Bar() {
  const [foo, setFoo] = useState(0);
  React.useEffect(() => {
    // @refresh reset
  });
  return <h1>{foo}</h1>;
}
```
2021-03-31 19:30:05 +09:00
강동윤
13a9d12c84
chore(ci): Configure github actions for rustdoc (#1523) 2021-03-31 13:09:10 +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
Nayeem Rahman
8b1f8dde4b
fix(strip): Expand class expressions as sequences
swc_ecma_transforms_typescript:
 - `strip`: Expand class expressions as sequences.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-30 12:09:11 +09:00
Devon Govett
393808a8f6
fix(es/codegen): Fix sourcemaps of multi line block comments (#1511)
swc_ecma_codegen:
 - Fix sourcemaps of multiline block comments.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-29 23:41:05 +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
강동윤
3ddf229c18
fix(es/parser): Fix assert after imports (#1513)
swc_ecma_parser:
 - Check for newline while parsing import assertions. (#1512)
2021-03-29 11:30:00 +09:00
Nayeem Rahman
8eae00900f
fix(es/transforms/typescript): Precompute class field keys (#1498)
swc_ecma_transforms_typescript:
 - `strip`: Precompute keys.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-28 12:14:59 +09:00
강동윤
232cfc5f4f
fix(es/transforms/react): Handle jsx entities in attributes correctly (#1501)
swc_ecma_transforms_react:
 - Fix jsx entities in attribute values. (#1479)
2021-03-27 21:06:47 +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
강동윤
7853b0a76c
fix(bundler): Fix inlining pass (#1495)
swc_bundler:
 - Fix inlining pass. (denoland/deno#9868)
2021-03-26 16:21:30 +09:00