Commit Graph

224 Commits

Author SHA1 Message Date
Donny/강동윤
897f4b670e
fix(dev/cli): Remove CLI from main swc repositoy (#2393) 2021-10-10 11:17:12 +00:00
Donny
b9b7de0871 chore: Publish 2021-10-10 01:33:22 +09:00
Donny/강동윤
7a31a3f530
feat(plugin/api): Determine plugin api (#2199) 2021-10-09 17:47:42 +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
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
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/강동윤
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
Donny/강동윤
b0ee9543d4
doc(es/ast): Document identifier mangagement system (#2371) 2021-10-08 01:02:02 +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/강동윤
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/강동윤
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/강동윤
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
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/강동윤
2c50cde8de
fix(swc): Fix try_with_handler (#2315)
swc:
 - `try_with_handler`: Return `Err` on errors.
2021-09-29 04:55:31 +00:00
Pig Fang
2b292e6d17
feat(es): Support type-only import/export specifiers (#2309) 2021-09-28 22:05:20 +09: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
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
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
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
강동윤
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
강동윤
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
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
강동윤
cb2b0c671f
fix(es/transforms/base): Optimize hygiene (#2193)
swc_ecma_transforms_base:
 - `hygiene`: Don't rename if not required. (#1600)

swc_ecma_minifier:
 - Remove `hygiene_optimizer`.
2021-09-01 13:11:55 +00:00
강동윤
a8cb554be5
feat: Expose .take() (#2190)
swc_common:
 - Add `Take`. (#2189)

swc_ecma_ast:
 - Implement `Take` for ast nodes. 

swc_ecma_transforms_base:
 - Remove `MapWithMut`.
2021-08-31 14:45:48 +00:00
David Sherret
99c35ff980
refactor(es): Use BlockStmt instead Vec<Stmt> for static blocks. (#2188)
swc_ecma_ast:
 - Use `BlockStmt` instead of `Vec<Stmt>` for static blocks.

swc_ecma_parser:
 - Fix span of static blocks.
2021-08-31 16:12:18 +09:00
강동윤
c0b0337d1d
fix(es): Fix easy bugs (#2178)
swc_ecma_parser:
 - Fix parsing of complex arrow expressions in a conditional expression. (#2174)
 - Report an error for wrong jsx, instead of `panic!`. (#2173)

swc_ecma_transforms_react:
 - `jsx`: Handle fragment with single child correctly. (#2177)

swc:
 - Ensure that #2170 is an invalid issue. (#2170)
2021-08-29 20:40:52 +00:00
Sosuke Suzuki
a10118c90f
feat(es/parser, es/codegen, es/visit): Support static blocks in classes (#2130)
swc_ecma_ast:
 - Add support for static blocks in classes.
2021-08-30 00:03:14 +09:00
David Sherret
3d58457027
refactor(es/dep_graph): Use dyn instead of impl (#2119)
swc_ecma_dep_graph:
 - Use `dyn` instead of `impl` in `analyze_dependencies`.
2021-08-27 13:08:48 +09:00
강동윤
d975a197c9
fix(es): Fix source map (#2159)
swc:
 - Fill `names` of sourcemap.
 - Don't add `sourceContents` to sourcemap if `sources` is added.

node_swc:
 - Handle source map for `minify` correctly.
 - `minify`: Accept `{ filename: code }`.
2021-08-26 10:44:38 +00:00
강동윤
e468752ebc
fix(es/minifier): Fix usage via yarn resolution (#2158)
swc_common:
 - Deprecate some unused types.

swc:
 - `BoolOrObject`: Improve the error message for deserialization failure.
 - `BoolOrObject`: Treat an empty object as `true`.
 - `JsMinifyFormatOptions`: Add fields. (#2153)

node_swc:
 - Improve error message for deserialization failure.
2021-08-26 06:18:59 +00:00
강동윤
18e2232dbc
feat(plugin): Groundwork for rust plugin system (#1893) 2021-08-25 15:07:09 +00:00
강동윤
838a7a8b33
fix(es/minifier): Make use of hygiene optimizer (#2145)
swc_ecma_ast:
 - Implement `Display` for `Ident`.

swc_ecma_minifier:
 - Expose `unique_scope`, which is required for `hygiene_optimizer`.
 - Improve `hygiene_optimizer`.

swc:
 - Use hygiene optimizer. (#1600, #2137)
 - Add `jsc.experimental.optimizeHygiene`
2021-08-24 15:03:31 +00:00
강동윤
c05a724d84
feat(css): Port stylis (#2131)
swc_css_ast:
 - Add `Value::Comma`.

swc_css_parser:
 - Implement more `Parse<T>`.
 - Fix parsing of values separated with comma.

swc_css_codegen:
 - Fix escaping.
 - Fix codegen of `!important`.

swc_stylis:
 - Port prefixer.
2021-08-23 12:42:13 +00:00
강동윤
6896a83d54
fix(es/codegen): Fix codegen of ~ (#2104)
swc_ecma_codegen:
 - Emit pending semi on `~`. (#2091)
2021-08-19 17:21:08 +09:00
강동윤
d39acd1d11
feat(css): Implement parser (#2074) 2021-08-19 05:16:32 +00:00
Sosuke Suzuki
33bdff0957
feat(es/parser): Emit an error for top-level await in script (#2094)
swc_ecma_parser:
 - Report an error for a top-level await statements.
2021-08-18 00:17:59 +09:00
강동윤
879a0f39a8
feat(swc): Implement format.comments of terser (#2095)
swc:
 - `minify`: Support `format.comments`.
 - `process_js`: Support `jsc.minify.format.comments`.
2021-08-17 14:34:37 +00:00
강동윤
a309b36236
fix(es/transforms): Fix bugs (#2089)
swc_ecma_minifier:
 - Expose hygiene optimizer.
 - `mangle_names`: Handle private names in member expressions. (#2086)

swc_visit:
 - Make `Optional::new` const function.

swc:
 - Make `es3` optional via cargo feature.
 - Ensure that #1554 is already fixed. (#1554)
2021-08-16 10:33:18 +00:00
muji
e84ed13ffe
feat(es/loader): Support more types for browser in package.json (#2060) 2021-08-16 17:34:53 +09:00
강동윤
f6aabfce9c
perf: Use ahash instead of sip hash (#2073)
swc_common:
 - Add `AHashMap`.
 - Add `AHashSet`.
2021-08-14 10:33:16 +00:00
강동윤
c6dce67494
fix(swc): Report error correctly (#2065)
swc_common:
  - Add some utilities for `Handler`.

swc:
 - Remove `Compiler.handler`.
 - Accept `handler` for each operations. (#2035)
2021-08-13 07:05:40 +00:00
muji
cfc3725dbb
feat(bundler): Support paths (#2054)
swc_ecma_ast:
 - Implement more traits for `TargetEnv`.

swc_ecma_loader:
 - `NodeModulesResolver`: Support aliasing.
2021-08-12 14:30:49 +09:00
muji
2151366b93
feat(es/loader): Support target runtime environment. (#2045)
swc_ecma_ast:
 - Add `TargetEnv`.

swc_ecma_loader:
 - Support specifying target environment.
2021-08-10 15:36:10 +09:00
강동윤
2c52021ed4
fix(es/transforms/module): Fix paths bug. (#2043)
swc_ecma_preset_env:
 - Update compat data.

swc_ecma_transforms_module:
 - Fix `paths`. (#1934, #1935)
2021-08-09 19:21:24 +00:00
강동윤
9793926cc8
fix(es/minifier): Fix bugs and implement more rules (#2032)
swc_ecma_minifier:
 - Fix an infinite loop. (#2028)
 - Don't remove span hygiene. (#2022)

swc_ecma_codegen:
 - Fix codegen of `return` with `async` arrow. (#2020)

swc:
 - Respect `minify = false`. (#2019)
2021-08-08 14:19:04 +00:00
강동윤
026c21ec68
feat(es/minifier): Make minifier parallel (#2009)
swc_ecma_minifier:
 - Introduce `bundle` mode, which can be used to parallelize processing of bundled files.
 - Add a function analyzer that checks if the function references something from the outer scope.
 - Split out parellsizable passes.
 - Split `optimzer` into pure / non-pure.
 - Run pure optimizations in parallel.
2021-08-07 08:27:52 +00:00
강동윤
4cdb45ff2e
feat(swc): Improve swc as a crate (#2026)
]swc_ecmascript:
 - Expose `swc_ecma_preset_env`.

swc:
 - Expose `swc_atoms`.
 - Expose `swc_common`.
 - Expose `swc_ecmascript`.
2021-08-07 02:41:50 +09:00
Sosuke Suzuki
a086a203dd
feat(es/parser): Report an error for import.meta in script (#1999) 2021-08-04 14:38:07 +09:00
강동윤
81abfe55d6
fix(es): Fix bugs (#2004)
swc_ecma_codegen:
 - Fix codegen of regexp where `minify` = `true`. (#2000)

swc_ecma_transforms_react:
 - Respect `@jsxImportSource` in `classic` mode. (#1933)

swc:
 - Upgrade `base64`.
2021-08-04 04:58:10 +00:00
강동윤
f44e25c3af
fix(es/minifier): Improve output of minifier (#1990)
swc_common:
 - Add `Span.has_mark`.

swc_ecma_codegen:
 - Emit `1e3` for `1000`.
 - Optimize output. (#1986)

swc_ecma_minifier:
 - name mangler: Don't use keywords as an id.
 - `properties`: Optimize member expression with string properties.
 - `inline`: Inline some function expressions even if it's not fn-local.
 - `analyzer`: Track reassignment correctly.
 - `analyzer`: Track fn-local correctly.
 - `sequences`: Inject `void` if required.
 - `inline`: Inline function declarations correctly.
 - `sequences`: Merge expressions into test of if statements.
 - `sequences`: Reduce calls to an assigned variable.
 - Use `Marks` instead of `&dyn Comments`.


swc_ecma_transforms_optimization:
 - `expr_simplifier`: Fix infinite loops.

node/swc:
 - Ensure that `.transform` performs minification. (#1989)
2021-08-04 00:52:47 +09:00
강동윤
e916b35dd2
feat(node/swc): Support sourceFileName (#1976)
swc:
 - Support `sourceFileName`.
2021-08-03 00:49:34 +09:00
강동윤
d1c481790c
feat(swc): Expose minifier api (#1978)
swc_ecma_codegen:
 - Fix codegen of imports when minification is enabled.

swc_ecma_minifier:
 - Mangle identifiers used by imports.

swc:
 - Support specifing `jsc.minify`. (#704, #1371)

swc/node:
 - Add `.minify()`.
 - Add `.minifySync()`.

swc/wasm:
 - Add `.minifySync()`.
2021-07-31 06:30:06 +00:00
강동윤
4011703af5
fix(testing): Allow using it with stable rustc (#1974)
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 (#1962)
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 (#1950)
swc_ecma_trasnsforms_base:
 - `fixer`: Don't de-optimize `++foo || bar`.

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

swc_ecma_transforms_optimization:
 - Fix infinite loop. (#1901, #1946)
2021-07-22 07:33:00 +00:00
강동윤
ff47e2539e
fix(swc): Fix bugs (#1932)
swc_common:
 - Fix handling of input source map. (#1930)

swc:
 - Respect `paths`. (#1858)

node:
 - Fix typings of `paths`.
2021-07-17 11:16:00 +00:00
David Sherret
6dc6d8a847
refactor(es/dep-graph): Remove SourceMap dependency (#1908) 2021-07-14 00:59:13 +09:00
강동윤
104be9837b
fix(es/transforms): Fix transforms (#1909)
swc_ecma_transforms_compat:
 - `regenerator`: Use es6 import while folding module. (#1641)
 - `typeof_symbol`: Handle `undefined` specially. (#1843)
 - `regenerator`: Do not create useless codes. (#1687)
 - `typeof_symbol`: Migrate to `VisitMut`.

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

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

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

misc:
 - Downgrade rustc to the version rust-analyzer supports.
2021-07-10 11:18:28 +00:00
강동윤
19bcb06f73
fix(swc): Fix source path of a source map file (#1902)
swc:
 - Use `output_path` to make sourcemap path relative to the `.map` file. (#1255)
2021-07-08 07:32:06 +00:00
Austaras
76341068d0
fix(es/ast): Fix handling of reserved words (#1891) 2021-07-04 19:44:33 +09:00
강동윤
33f2ab2d79
fix(es/transforms): Fix transforms (#1861)
swc_ecma_transforms_compat:
 - Organize logical assignment pass correctly.

swc_ecma_transforms_optimization:
 - `dead_branch_remover`: Handle nullish coalescing operator correctly. (#1851)
2021-06-26 16:02:15 +09:00
강동윤
737ce63b78
chore(es/ast): Bump version (#1853) 2021-06-25 08:19:15 +00:00
강동윤
ff440d47a4
chore: Organize project (#1849) 2021-06-24 17:01:21 +09:00
강동윤
4cd43375a5
feat(swc): Add import resolvers (#1834)
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`. (#379, #702)
 - Canonicalize file names.
2021-06-24 06:32:09 +00:00
강동윤
f4249574da
feat(ci): Track binary size and performance (#1840) 2021-06-23 10:50:27 +00:00
강동윤
6ad3f7b90e
feat(es/visit): Groundwork to use VisitMut instead of Fold (#1842)
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 (#1832)
swc_common:
 - `SourceMap`: Don't panic for dummy spans.

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

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

swc:
 - Allow specifying input source map in `.swcrc`.
 - Ensure that the inline source map works properly. (#1713)
2021-06-18 11:34:17 +00:00
강동윤
f9bdc7b227
fix(es/parser): Fix panic on debug mode (#1828)
swc_ecma_parser:
 - Handle undefined unicode code point gracefully. (#1813)
2021-06-16 15:55:20 +09:00
강동윤
d3944f5203
fix(swc): Fix bugs (#1820)
swc_ecma_preset_env:
 - [x] Rename directory to be consistant.
 - [x] Add es2020::operators. (#1812)

swc_ecma_transforms_react:
 - [x] Don't escpae unicodes. (#1782)
2021-06-12 15:39:39 +09:00
강동윤
3c3fb359ee
fix(es): Remove UB (#1815)
swc_ecma_parser:
 - Remove UB.

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

swc_ecma_transforms_compat:
 - Handle `||=`. (#1788)
2021-06-11 16:55:34 +09: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
Pig Fang
1dbc3644a5
feat(es): Support type-only import equals declaration (#1695)
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 (#1667)
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 (#1663) 2021-05-09 21:04:42 +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
강동윤
82ef06afb8
feat(babel/compat): Improve performance of babelify (#1626)
swc_babel_compat:
 - Optimize.

swc:
 - Improve performance of comment storage.
2021-05-06 14:56:54 +09:00
강동윤
d10671bbda
fix(swc): Fix various bugs. (#1632)
swc_ecma_transforms_typescript:
 - Fix import analyzer. (denoland/deno#10462)
2021-05-03 13:34:13 +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 `&nbsp;`. (#1446)

swc:
 - Upgrade dashmap. (#1616)
2021-04-28 14:49:21 +09: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
강동윤
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
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
강동윤
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
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
David Sherret
f1792708b4 fix(es/ast): Remove TsSignatureDecl (#1531) 2021-04-04 20:12:17 +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
강동윤
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
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
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
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
강동윤
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