Commit Graph

163 Commits

Author SHA1 Message Date
강동윤
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
강동윤
be23e66ca8
fix(es/minifier): Fix minifier (#1985)
swc_ecma_minifier:
 - Don't create an identifier starting with number. (#1983)
 - Fix panic. (#1984)
 - Don't use time api on wasm. (#1982)
2021-07-31 13:34:16 +00:00
강동윤
d600d52157 fix(build): Increase memory 2021-07-31 19:50:13 +09:00
강동윤
839476dc3c chore: Publish a new version 2021-07-31 18:32:51 +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
강동윤
b02e189d07
feat(es/minifier): Implement more rules (#1871)
swc_ecma_codegen:
 - Fix codegen of `U+0028` and `U+0029`. 

swc_ecma_minifier:
 - Implement MVP.

swc_ecma_transforms_base:
 - `fixer`: Handle seq/await in rhs of for-of.
2021-07-30 10:11:27 +09:00
강동윤
360b4bcc04 fix: Remove println 2021-07-29 14:29:22 +09: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
강동윤
f3603b2cb8
chore: Use correct license for the node package (#1966) 2021-07-27 14:59:46 +09:00
강동윤
fb3b52ddbb ignore Cargo.lock 2018-01-13 19:06:38 +09:00
강동윤
e949c40517
ECMAScript parser (#1)
- Parser and lexer for lastest ecma spec https://tc39.github.io/ecma262

  - Lexer is currently very inefficient

 - Use https://github.com/tc39/test262-parser-tests/ for testing.

 - Implement proc-macro based ast folder and assert_eq_ignore_span! based on it.

 - Some utilities for proc macro at /macros/common
2018-01-12 16:53:06 +09:00