Commit Graph

142 Commits

Author SHA1 Message Date
강동윤
4011703af5
fix(testing): Allow using it with stable rustc ()
testing_macros:
 - Make `#[fixture]` relative to cargo manifest dir.
2021-07-29 14:18:21 +09:00
강동윤
85a216ef56
feat(es/parser): Allow stripping out typescript parser ()
swc_ecma_parser:
 - Add a cargo feature to remove typescript parser.
2021-07-25 09:37:59 +00:00
강동윤
204a71ca94
fix(es/transforms): Fix bugs ()
swc_ecma_trasnsforms_base:
 - `fixer`: Don't de-optimize `++foo || bar`.

swc_ecma_trasnsforms_typescript:
 - Allow using properties from a decorated class. ()

swc_ecma_transforms_optimization:
 - Fix infinite loop. (, )
2021-07-22 07:33:00 +00:00
강동윤
21848ce2ea
fix(es/transforms): Fix passes related to optimizations ()
swc_ecma_transofrms_base:
 - `fixer`: Handle `in`.
 - `fixer`: Handle `in` in the head of for statements.
 - `fixer`: Optimize `- (1 / 0)`.
 - `fixer`: Optimize `void 0 === a`.
 - `fixer`: Optimize `a-- && b = c`.
 - `fixer`: Don't de-optimize if statements.
 - `fixer`: Fix handling of if statements.

swc_ecma_transforms_optimization:
 - `dead_branch_remover`: Preserve `var`s in dropped switch cases.
2021-07-20 11:07:36 +00:00
강동윤
39ee7b962d
fix(es/codegen): Fix codegen of template literals ()
swc_ecma_codegen:
 - Fix codegen of template literals. (Closes )
2021-07-20 14:11:33 +09:00
강동윤
a26a18989f
fix(es/transforms): Allow using rest pattern in arrow functions. ()
swc_ecma_transforms_compat:
 - `parameters`: Allow using rest pattern within arrow functions.
2021-07-16 07:05:00 +00:00
David Sherret
6dc6d8a847
refactor(es/dep-graph): Remove SourceMap dependency () 2021-07-14 00:59:13 +09:00
강동윤
104be9837b
fix(es/transforms): Fix transforms ()
swc_ecma_transforms_compat:
 - `regenerator`: Use es6 import while folding module. ()
 - `typeof_symbol`: Handle `undefined` specially. ()
 - `regenerator`: Do not create useless codes. ()
 - `typeof_symbol`: Migrate to `VisitMut`.

swc_ecma_transforms_module:
 - Add `import_hoister`.
 - Improve import analyzer. ()
 - Allow overriding `export *` wth named exports. ()

swc_ecma_transforms_testing:
 - Add a hack for `regenerator-runtime`.

swc:
 - Run import analyzer ahead of time. ()

misc:
 - Downgrade rustc to the version rust-analyzer supports.
2021-07-10 11:18:28 +00:00
강동윤
35af4c5186
chore: Publish v1.2.63 & Update rustc () 2021-07-05 12:51:09 +00:00
Austaras
76341068d0
fix(es/ast): Fix handling of reserved words () 2021-07-04 19:44:33 +09:00
강동윤
ea93e1d1be
fix(bundler): Prevent infinite loop ()
swc_bundler:
 - Fix cycle detection. ()
 - Add fallback logic for topoligcal sorting.
2021-07-01 12:56:08 +00:00
강동윤
33f2ab2d79
fix(es/transforms): Fix transforms ()
swc_ecma_transforms_compat:
 - Organize logical assignment pass correctly.

swc_ecma_transforms_optimization:
 - `dead_branch_remover`: Handle nullish coalescing operator correctly. ()
2021-06-26 16:02:15 +09:00
강동윤
737ce63b78
chore(es/ast): Bump version () 2021-06-25 08:19:15 +00:00
강동윤
4cd43375a5
feat(swc): Add import resolvers ()
swc_ecma_loader:
 - Add `Resolve`. 
 - Add `TsConfigResolver`. 

swc_ecma_transforms_module:
 - Use `Resolve` for remapping import paths.
 - Add `ImportResolver`.
 - Add `NodeImprortResolver`.

swc:
 - Add `paths` to `.swcrc`.
 - Use `paths`. (, )
 - Canonicalize file names.
2021-06-24 06:32:09 +00:00
강동윤
6ad3f7b90e
feat(es/visit): Groundwork to use VisitMut instead of Fold ()
swc_ecma_transforms:
 - Expose `VisitMut` if possible.

swc_ecma_visit:
 - Implement `VisitMut` for` Folder<V>`.
 - Implement `VisitMut` for `AndThen<A, B>`.
2021-06-23 04:18:41 +00:00
강동윤
5a6c4fd5a0
fix(swc): Fix sourcemap ()
swc_common:
 - `SourceMap`: Don't panic for dummy spans.

swc_ecma_codegen:
 - Use span for `throw`. ()
 - Use span for `var` / `let` / `const`.
 - Use span for `new`.
 - Use span for `if`.
 - Add spans to braces of a block statement. ()

swc_ecma_transforms_compat:
 - `parameters`: Don't drop the span of block statements. ()

swc:
 - Allow specifying input source map in `.swcrc`.
 - Ensure that the inline source map works properly. ()
2021-06-18 11:34:17 +00:00
강동윤
f9bdc7b227
fix(es/parser): Fix panic on debug mode ()
swc_ecma_parser:
 - Handle undefined unicode code point gracefully. ()
2021-06-16 15:55:20 +09:00
강동윤
3c3fb359ee
fix(es): Remove UB ()
swc_ecma_parser:
 - Remove UB.

swc_ecma_codegen:
 - Remove codes related to the UB of the parser. ()
2021-06-12 05:17:09 +00:00
강동윤
97ef7c0553
fix(swc): Fix bugs ()
swc_ecma_ast:
 - Add `es2021`. 

swc_ecma_transforms_compat:
 - Handle `||=`. ()
2021-06-11 16:55:34 +09:00
강동윤
0bd2a3a07e
fix(es/transforms): Fix bugs ()
swc_ecma_transforms_base:
- `fixer`: Wrap operand of a unary expression if it's a binary expression. (, )

swc_ecma_transforms_module:
 - Allow multiple `export *` even if it has the same item. ()
2021-06-05 11:13:42 +09:00
강동윤
4e7723a7a0
fix(bundler): Fix cycle detection ()
swc_bundler:
 - Fix cycle detection. ()
2021-06-03 14:15:20 +09:00
강동윤
d60c3242af
fix(swc): Fix bugs ()
swc_bundler:
 - Fix cycle detection for complex circular imports. ()

swc_ecma_transforms_typescript:
 - Allow using large values for an enum variant.
2021-05-25 14:30:17 +09:00
강동윤
a795de7f43
fix(swc): Fix bugs ()
swc_ecma_transforms_react:
 - Escape some characters. ()

swc_ecma_transforms_compat:
 - `regenerator`: Handle `||` properly. ()
2021-05-24 09:41:22 +00:00
강동윤
dee82904f8
fix(es): Fix bugs ()
swc_ecma_transforms_base:
 - `fixer`: Fix regression related to `??` and `||`. ()
2021-05-18 15:34:44 +09:00
Pig Fang
1dbc3644a5
feat(es): Support type-only import equals declaration ()
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-15 14:26:24 +09:00
Pig Fang
1548f6d799
feat(es/parser): Allow override in parameter properties ()
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-09 22:17:58 +09:00
Pig Fang
4aed9423de
fix(es/parser): Allow using override with static () 2021-05-09 21:04:42 +09:00
Niklas Mischkulnig
f4d0e46cbb
feat(es/transforms/compat): Add pure comment to classes ()
swc_ecma_transforms_compat:
 - Add pure annotations while tranpiling classes.
2021-05-08 15:47:20 +09:00
강동윤
d10671bbda
fix(swc): Fix various bugs. ()
swc_ecma_transforms_typescript:
 - Fix import analyzer. ()
2021-05-03 13:34:13 +09:00
강동윤
28bb61fb8d
fix(swc): Fix bugs ()
spack:
 - Add ability to exclude module from the bundle. ()

swc_ecma_ast:
 - Make `Param.decorators` optional. ().

swc_ecma_transforms_compat:
 - Fix super calls in seq exprs in a class. ()

swc_ecma_transforms_module:
- `common_js`: Fix dynamic imports. ()

swc_ecma_transforms_typescript:
 - Fix common js imports. ()
2021-04-30 06:25:24 +00:00
강동윤
5a0bacb5b8
fix(swc): Fix various bugs ()
swc_ecma_codegen:
 - Fix codegen of `\x00`. ()

swc_ecma_preset_env:
 - Fix order of core-js imports. ()

swc_ecma_transforms_react:
 - Preserve `&nbsp;`. ()

swc:
 - Upgrade dashmap. ()
2021-04-28 14:49:21 +09:00
강동윤
731dc68c92
fix(bundler): Use proper algorithm for dependency analysis ()
swc_bundler:
 - Optimize detection of circular imports.
2021-04-26 09:18:57 +00:00
강동윤
308792dc90
fix(bundler): Fix performance ()
swc_bundler
 - Use a faster hash algorithm while sorting modules.
 - Remove plan system.
2021-04-24 04:28:38 +00:00
강동윤
9a07869c21
fix(bundler): Improve performance ()
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] ()
ast_node:
 - Add `#[ast_serde]`.
2021-04-21 09:11:50 +00:00
강동윤
46c3d62ebd
fix(swc): Fix bugs ()
spack:
 - Ensure that  is fixed. () 

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

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

swc:
 - Disable aes. ()
2021-04-17 06:00:14 +00:00
강동윤
1178686a4c
fix(bundler): Fix bundler ()
swc_bundler:
 - Fix remapping of exports. ()
2021-04-16 18:09:38 +00:00
강동윤
246bdd5088
fix(bundler): Fix bugs ()
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. (, )

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
14edb69826
fix(es/transforms/base/fixer): Fix parens of sequence expressions ()
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 ()
swc_ecma_transforms_react:
 - Add pure annotations for react.
2021-04-11 15:09:27 +09:00
Pig Fang
39e1e54ee4
fix(es/parser): Disallow override in non-subclass ()
swc_ecma_parser:
 - Disallow `override` in classes without super class.
2021-04-07 15:38:24 +00:00
David Sherret
f1792708b4 fix(es/ast): Remove TsSignatureDecl () 2021-04-04 20:12:17 +09:00
강동윤
13a9d12c84
chore(ci): Configure github actions for rustdoc () 2021-03-31 13:09:10 +09:00
강동윤
51d0cef287
fix: Fix bugs ()
swc_ecma_ast:
 - Support TypeScript 4.3. ()

swc_ecma_parser:
 - Support new syntaxes from typescript 4.3. () 

swc_ecma_transforms_compat:
 - Fix '\\`' in template literals. ()
 - `classes`: Fix super calls. ()

swc_ecma_transforms_module:
 - Respect `esModuleInterop` for dynamic imports. ()

swc_ecma_transforms_typescript:
 - `strip`: Remove `declare`-d namespaces. ()
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
강동윤
7853b0a76c
fix(bundler): Fix inlining pass ()
swc_bundler:
 - Fix inlining pass. ()
2021-03-26 16:21:30 +09:00
Nayeem Rahman
fa3d65cd58
fix(strip): Transform static class fields to assignments ()
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
David Sherret
da62c73239
refactor(es/ast): Change TaggedTpl to have a Tpl ()
swc_ecma_ast:
 - Make `TaggedTpl` have `Tpl`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-03-25 20:09:36 +09:00
강동윤
fec189f2f3
fix(bundler): Fix stack overflow on Windows ()
bundler:
 - Prevent stack overflow. ()

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() ()
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