Sosuke Suzuki
4ead801295
refactor(es/parser): Cleanup ( #2033 )
...
swc_ecma_parser:
- Use `tok!` macro.
2021-08-09 23:21:43 +09:00
강동윤
53b031b019
fix(swc): Fix bugs ( #2034 )
...
swc_ecma_transforms_base:
- `resolver`: Handle constructor properties correctly. (#2021 )
swc_ecma_transforms_compat:
- `block_scoping`: Handle arrows in loops. (#2027 )
- `block_scoping`: Handle nested for loops with function between them. (#2027 )
- `regenerator`: Handle rhs of `||` correctly. (#2024 )
swc:
- Add a test for #1734 . (#1734 )
2021-08-09 07:38:46 +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
Sosuke Suzuki
f4e0e91f64
feat(es/parser): Always enable features in ES spec ( #2029 )
2021-08-08 22:53:41 +09:00
OJ Kwon
abb1451061
fix(node/swc): Allow specifying filename when parsing ( #2031 )
2021-08-08 20:14:45 +09: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
Sosuke Suzuki
8a39c1db97
fix(es/parser): Use correct error message ( #2025 )
...
swc_ecma_parser:
- Use correct error message for import statements in a script.
2021-08-07 16:43:23 +09: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
Iron Lu
403f647752
fix(es/transforms/classes): Fix a bug related to super property access ( #1960 )
...
swc_ecma_transforms_classes:
- Fix super access. (#1959 )
2021-08-06 23:20:02 +09:00
강동윤
eb45760697
fix(es/transforms/react): Handle escape correctly ( #2014 )
...
swc_ecma_transforms_react:
- Handle escapes properly. (#2013 )
2021-08-05 08:34:28 +09:00
강동윤
48bc26d3c9
fix(es): Fix codegen & minifier ( #2006 )
...
swc_ecma_codegen:
- Emit a semicolon before `!`.
- Emit a semicolon before `[`. (#2007 )
swc_ecma_minifier:
- Disable buggy passes.
- `iife`: Don't inline async functions. (#2007 )
2021-08-04 10:27:17 +00:00
강동윤
68608db0b3
fix(es/minifier): Improve output of minifier ( #2005 )
...
swc_ecma_minifier:
- Don't reorder import statements.
2021-08-04 07:20:02 +00: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
David Sherret
064416c079
feat(common): Add an utiliy method for comments ( #2002 )
...
swc_common:
- Add `SingleThreadedComments::from_leading_and_trailing`.
2021-08-04 13:36:49 +09:00
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
강동윤
a4fb114821
fix(ci): Fix CI ( #2003 )
2021-08-04 03:31:17 +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
강동윤
6285f20cfa
fix(es): Ensure that #1681 is fixed ( #1970 )
...
swc:
- Ensure #1681 is fixed. (#1681 )
2021-08-02 14:18:50 +00: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
Sosuke Suzuki
eecaac12a0
fix(node/swc): Fix typings for parser options ( #1971 )
2021-07-30 12:49:55 +09: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
David Sherret
d64aa6f80d
fix(es/transforms): Strip out private method overloads ( #1977 )
...
swc_ecma_transforms_typescript:
- `strip`: Remove private method overloads. (denoland/deno#11550 )
2021-07-30 08:02:50 +09:00
nuintun
ef4bb314b9
fix(es/codegen): Remove extra space of import decl ( #1975 )
...
swc_ecma_codegen:
- Remove extra space from import declarations. (#1690 )
2021-07-29 18:56:59 +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
OJ Kwon
af4cbbae23
fix(es/transforms/base): Fix hygiene ( #1964 )
...
swc_ecma_transforms_base:
- `hygiene`: Fix handling of class method parameters. (#1948 )
2021-07-26 19:16:39 +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
Makuza Mugabo Verite
cd4a564eea
chore: Fix typo ( #1958 )
2021-07-24 13:37:47 +09: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
강동윤
ebdd04d7c7
fix(es/transforms/typescript): Fix typescript stripper ( #1945 )
...
swc_ecma_transforms_typescript:
- Fix usage detection logic. (denoland/deno#10684 )
2021-07-21 14:24:57 +00:00
강동윤
21848ce2ea
fix(es/transforms): Fix passes related to optimizations ( #1942 )
...
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
OJ Kwon
de24ff275d
fix(es/transforms/module): Allow namespace import with default import ( #1940 )
...
swc_ecma_transforms_module:
- Allow using a namespace import specifier with a default import specifier. (#1938 )
2021-07-20 18:00:27 +09:00
LongYinan
d6454add72
fix(node/swc): Fix for m1 mac ( #1939 )
2021-07-20 14:54:02 +09:00
강동윤
39ee7b962d
fix(es/codegen): Fix codegen of template literals ( #1936 )
...
swc_ecma_codegen:
- Fix codegen of template literals. (Closes #1791 )
2021-07-20 14:11:33 +09:00
plylrnsdy
d5cdf444e8
fix(node/swc): Fix field name ( #1923 )
...
node/swc:
- Rename `member` of `TsEnumDeclaration` to `members`.
2021-07-18 19:40:01 +09:00
강동윤
7f968472fb
chore: Publish v1.2.65
2021-07-18 19:29:08 +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
Iron Lu
4a9b31df3e
fix(swc): Fix order of passes ( #1931 )
...
swc:
- Run `import_analyzer` after `regenerator`.
2021-07-17 13:12:30 +09:00
강동윤
a26a18989f
fix(es/transforms): Allow using rest pattern in arrow functions. ( #1926 )
...
swc_ecma_transforms_compat:
- `parameters`: Allow using rest pattern within arrow functions.
2021-07-16 07:05:00 +00:00
강동윤
7a8ad8826a
fix(es/transforms): Fix fixer ( #1919 )
...
swc_ecma_transforms_base:
- `fixer`: Allow using await expressions as a callee of a new expression.
2021-07-14 22:43:17 +09:00
David Sherret
6dc6d8a847
refactor(es/dep-graph): Remove SourceMap dependency ( #1908 )
2021-07-14 00:59:13 +09:00
Iron Lu
d13eff99d8
fix(es/transforms/proposal): Fix order of constructor statements ( #1914 )
...
swc_ecma_transforms_proposal:
- `decorators`: Fix order. (#1913 )
2021-07-13 22:32:45 +09:00
David Sherret
4e42c66663
chore(ci): Switch installation method of deno ( #1915 )
2021-07-13 21:41:40 +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