Commit Graph

157 Commits

Author SHA1 Message Date
David Sherret
080b1fa3ac
fix(common): Remove potential race condition (#2001)
swc_common:
 - Remove potential race condition in `CommentsExt`.
2021-08-04 13:02:03 +09: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
강동윤
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
강동윤
03be315921
fix(es/transforms): Fix decorator bugs (#1905)
swc_ecma_transforms_proposal:
 - Initialze decorators lazily. (#1278)
2021-07-08 20:48:07 +09: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
강동윤
35af4c5186
chore: Publish v1.2.63 & Update rustc (#1894) 2021-07-05 12:51:09 +00:00
강동윤
c49e9b0b8d
feat(babel/compat): Implement reverse operation of babelify (#1655)
swc_babel_compat:
 - Move `babelify` to a submodule.
 - Add `swcify`.
2021-06-27 15:30:40 +00:00
Maxime Guerreiro
c5f1c6b8ba
chore(es/ast): Upgrade arbitrary crate to v1 (#1844)
swc_ecma_ast:
 - Upgrade arbitrary crate.
2021-06-25 14:40:51 +09: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
muji
7b9b9fe9ce
fix(common): Fix compiler error (#1747)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-28 20:57:57 +09:00
강동윤
470c8f4745
fix(es/minifier): Publish (#1716) 2021-05-20 15:09:30 +09:00
강동윤
c6b22c57f8
feat(es/minifier): Implement minifier partially (#1302)
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
2021-05-20 13:51:30 +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
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
Daniel Woznicki
d1415f9bf7
feat(node-swc): Babel ast translator (#1465) 2021-05-01 18:09:10 +09:00
강동윤
8222cc075d
feat(ast_node): Add #[ast_serde] (#1595)
ast_node:
 - Add `#[ast_serde]`.
2021-04-21 09:11:50 +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
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
강동윤
645de92762 Bump version 2021-04-07 12:02:35 +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
강동윤
13a9d12c84
chore(ci): Configure github actions for rustdoc (#1523) 2021-03-31 13:09:10 +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
강동윤
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
강동윤
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
Yehuda Katz
db85d123b7
Fix a number of typos (#1412)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-02-20 15:18:09 +09:00
강동윤
6984217200
feat(ES/transform/typescript): Support namespace (#1325)
swc_common:
 - Update `serde`.

swc_ecma_transforms_typescript:
 - Add support for namespace.
2021-01-12 21:59:42 +09:00
강동윤
34249bbf47
feat(ecmascript/ast): Add EqIgnoreSpan and TypeEq (#1295) 2020-12-27 13:11:44 +09:00
David Sherret
01b6a0a90f
Add borrow_all() to SingleThreadedComments (#1262)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-12-09 10:45:33 +09:00
강동윤
46b553ecc3
feat(swc_common): Expose non-tty EmitterWriter (#1240)
swc_bundler:
 - Expose non-tty EmitterWriter
2020-11-29 01:37:09 +09:00
Bartek Iwańczuk
546a01cdc2
fix: SourceMap::span_to_lines for empty file (#1198)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2020-11-02 11:01:48 +09:00
강동윤
11d137ac11
ast: Add support for fuzzing (#1167)
swc_common:
 - Add support for fuzzing.

swc_ecma_ast:
 - Add support for fuzzing.
2020-10-15 14:58:11 +09:00
강동윤
6c6f1aaaa3
Fixs bugs (#1095)
spack:
 - fix resolver. (#1076)

swc_common:
 - preserve original sourcemap. (#1091)

swc_ecma_transforms:
 - optional chaining: `a?.b.c.d.e`. (#1092)
 - fixer: preserve parenthesis in `(a || b)()`. (#1093)
 - compat::es2015: Change order of passes (#1036)
2020-09-22 16:39:00 +09:00
강동윤
4490e2551d
swc.rs (#1085)
Changes url from https://swc-project.github.io to https://swc.rs
2020-09-21 22:53:48 +09:00
강동윤
274b112ef4 Bump version 2020-08-29 20:00:34 +09:00
강동윤
9f2120ed4b
Improve performance of parser (#1004) 2020-08-27 21:33:34 +09:00
강동윤
511dc54961
Fix codegen of VisitMut for Option (#996)
swc_visit:
 - Fix codegen of VisitMut for Option
2020-08-25 16:29:11 +09:00
강동윤
3262052e33
Improve performance and reduce binary size (#973)
spack:
 - Optimize resolver

swc_bunder:
 - Parallize merging of reexports
 - Remove useless `clone`s

swc_ecma_utils:
 - Migrate DropSpan to VisitMut

swc_ecma_transforms:
 - Migrate simple transforms to VisitMut
 - Ignore types to reduce binary size
 - Hide actual types so that we can optimize it in future without breaking change

swc_visit:
 - Apply transforms for vector in-place
 - Apply transforms for box in-place
2020-08-19 01:29:49 +09:00
강동윤
2fedf32747
swc_bundler (#943)
swc_bundler:
 - Splitted from spack

swc_ecma_parser:
 - Fix unexpected eof problem which occurs if log level is trace

swc_ecma_transforms:
 - Fix bugs of dce pass

spack:
 - Support cyclic dependencies
2020-08-12 22:18:47 +09:00
강동윤
2de59759de
Reduce size (#928)
Reduce binary size and make some dependencies optional for deno
2020-08-04 01:33:23 +09:00
강동윤
0ac55ae68b
Improve ux for rust users (#909)
testing:
 - Remove dependency on relative_path

swc_common:
 - Span's byte positions are now self-contained and `GLOBALS` is not required while parsing.
 - Changed `Comments` into a trait.
 - Provide single-threaded implementation of `Comments`
 - Cargo feature `tty-emiiter` (To remove tty related stuffs )
 - Cargo feature `sourcemap` (To remove sourcemap for web assets)
 - Removed dependency on dashmap

swc_ecma_parser:
 - No duplicated comments.
 - Removed dependency on once_cell and regex
 - Add a test suite to visualize and test span of nodes.

swc_ecma_utils:
 - Removed dependency on parser

swc:
 - Remove dependency on derive_more and path-clean
 - Add multi-threaded implementation of `Comments`

swc_ecmascript:
 - A new crate contains `ast`, `codegen`, `parser`, `utils`, `visit`.
2020-07-31 18:49:07 +09:00
강동윤
9b8bfb2455
Use stable rustc (#886) 2020-07-24 02:18:22 +09:00
강동윤
a2369be5b2
Fix random panic (#876) 2020-07-02 13:10:44 +09:00
강동윤
38adc49e7e
Bugfixes (#873)
swc_common:
 - Fix new_source_file

swc_ecma_parser:
 - Fix parsing of paren expr in lhs of an assignment
2020-07-01 16:31:55 +09:00