Commit Graph

1169 Commits

Author SHA1 Message Date
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
Nayeem Rahman
fa3d65cd58
fix(strip): Transform static class fields to assignments (#1487)
swc_ecam_transforms_compat:
 - Deprecate `typescript_class_properties`.

swc_ecma_tranforms_typescript:
 - Merge `typescript_class_properties` into `strip`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-26 13:48:55 +09:00
강동윤
0351a47678
fix(ci): Speed up (#1494) 2021-03-26 01:22:09 +09:00
David Sherret
da62c73239
refactor(es/ast): Change TaggedTpl to have a Tpl (#1114)
swc_ecma_ast:
 - Make `TaggedTpl` have `Tpl`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-25 20:09:36 +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
강동윤
fec189f2f3
fix(bundler): Fix stack overflow on Windows (#1464)
bundler:
 - Prevent stack overflow. (denoland/deno#9752)

testing:
 - Bump version
 - Fix handling of paths on windows.

testing_macros:
 - Bump version
 - Correctly ignore files.
2021-03-22 19:42:42 +09:00
Nayeem Rahman
9bc074ed46
fix(strip): Combine typescript_class_properties() into strip() (#1478)
swc_ecma_utils:
 - Use `&mut` for inject_after_super.

swc_ecma_transforms_typescript:
 - Merge `typescript_class_properties` into `strip`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-21 22:31:35 +09:00
강동윤
9445c109f9
fix(es/codegen): Fix codegen of arrow expressions. (#1452)
swc_ecma_codegen:
 - Fix codegen of arrow functions.  (#1451)
2021-03-20 15:30:54 +09:00
강동윤
dcdac2db6f
fix(swc): Fix bugs (#1453)
swc_ecma_transforms_typescript:
  - Add option to use define propert for `strip` pass. (#1472)

node-swc:
  - Fix `keepClassNames`. (Brooooooklyn/swc-node#335)
2021-03-17 15:24:35 +09:00
Devon Govett
9d53a70221
fix(common): Fix column positions in generated sourcemaps (#1470)
Co-authored-by: 강동윤 <kdy1@dudy.kr>
2021-03-16 15:18:12 +09:00
Arend van Beelen jr
a90368372f
chore: Add note about required dev tools (#1467) 2021-03-13 00:08:24 +09:00
Alexander van Ratingen
06cb4b89cb
fix(es/codegen): Fix SX spread props (#1463) 2021-03-11 11:24:31 +09:00
강동윤
97269a37b9
fix(swc): Fix bugs for v1.2.50 (#1444)
swc:
 - Respect `react` config.

swc_ecma_transforms_compat:
 - `export-namespace-from`: Preserve `use strict`. (#1423)

swc_ecma_transforms_module:
 - Inject `use strict` before imports. (#1423)

swc_ecma_transforms_proposal:
 - Emit metadata for literal types. (#1421)
2021-03-03 20:39:02 +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
강동윤
bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00
Devon Govett
eec65f25bb
feat(es/transforms): Port @babel/preset-modules (#1439)
swc_ecma_preset_env:
 - Add options to enable bugfix transforms.

swc_ecma_transforms_compat:
 - Add bugfix transform for async arrows in a class.
 - Add bugfix transform for default parameters.
 - Add bugfix transform for templit literal caching.

swc_ecma_transforms_react:
 - Respect `use_spread`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-02 16:03:22 +09:00
Giorgi Rostomashvili
73b8826a2f
fix(es/parser): Recover from type annotations after = (#1445) 2021-03-02 15:50:13 +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
Sanath Kumar U
7d62fdf761
chore: Fix link (#1443) 2021-03-01 14:06:28 +09:00
marieell
24dac8605b
chore: Typo (#1442) 2021-03-01 13:44:44 +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
강동윤
c047e0e54d
fix(bundler): Fix bundler (#1427)
swc_bundler:
 - Create variables for export while preparing a module. (denoland/deno#9560)
 - Fix order of statements.
 - Invoke dce multiple time if required. (denoland/deno#9546)

swc_ecma_transforms_optimization:
 - dce: Track modifications correctly.
2021-02-26 18:21:42 +09:00
강동윤
05a90715d1 Bump version 2021-02-24 01:58:14 +09:00
LongYinan
6ece76367b
fix(node-swc): Fix glibc compatibility issue (#1431) 2021-02-24 01:53:36 +09:00
Jakub Koralewski
59bd00d841
fix: Fix tests on windows (#1419)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-02-23 00:33:11 +09:00
강동윤
f28cd51e22 Bump version 2021-02-22 21:50:39 +09:00
playX
abfff69300
fix(common): Allow using with MIRI (#1426) 2021-02-22 21:50:19 +09:00
강동윤
7f5bfdcc00
fix(bundler): Fix bugs (#1382)
swc_bundler:
 - Improve performance
 - Use `Vec<AHashSet<usize>>` instead of `AHashSet<(usize, usize)>`.
 - Fix statement orderings. (denoland/deno#9464) 
 - Fix wrapped esm mixed with circular imports. (denoland/deno#8224)
 - Store content of wrapped esm at top level. (denoland/deno#8224)
2021-02-22 17:27:40 +09:00
David Sherret
adcca03cfa
fix(es/ast): Remove TsTypeCastExpr it's not used (#1420) 2021-02-22 17:05:51 +09:00
LongYinan
9d896c746e
feat(node-swc): Reduce binary size (#1418) 2021-02-20 17:07:58 +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
강동윤
0be20ff0ae
feat(es/transforms/react): New jsx transform (#1408)
swc_ecma_transforms_react:
  - Implement new jsx transform. (#1103, denoland/deno#7993)
2021-02-19 14:32:53 +09:00