Yunfei He
4abde38dd7
feat(swc): Add browserslist
to optionalDependencies
( #2515 )
2021-10-23 20:04:06 +09:00
Donny/강동윤
9e215769cc
fix(es/minifier): Fix minifier using Deno
test suite ( #2503 )
...
swc_ecma_codegen:
- Emit `;` after private class properties.
swc_ecma_minifier:
- `pure`: Drop more invalid expressions.
- `sequences`: Drop more invalid expressions.
- `strings`: Fix concat.
- `inline`: Inline into `b` in `a[b] = foo`.
2021-10-21 11:56:48 +00:00
LongYinan
1b91d55277
ci: Re-enable FreeBSD build ( #2497 )
2021-10-21 15:15:52 +09:00
Donny/강동윤
eef3d6e3fb
fix(es): Fix simple bugs ( #2495 )
...
swc_ecma_parser:
- Don't panic on `declare declare`. (#2343 )
swc_ecma_transforms_react:
- Don't panic on `createElement()`. (#2492 )
swc_bundler:
- Don't panic on wasm. (#2334 )
swc:
- Disable `inline_globals` if it's not specified. (#2490 )
2021-10-20 06:12:21 +00:00
Donny/강동윤
2ca6e5d79b
feat(es/transforms/optimization): Support inlining of typeof
s ( #2473 )
...
swc_ecma_transforms_optimization:
- `inline_globals`: Support inlining of `typeof`s.
swc:
- Change error message for parsing failure to mention `Syntax Error`.
2021-10-19 09:49:18 +00:00
Donny/강동윤
123c1f5d02
chore: Fix typo ( #2472 )
2021-10-19 08:25:57 +00:00
Donny/강동윤
01e171a4b4
test(es): Freeze as es2015
to verify base transforms ( #2468 )
2021-10-19 05:31:12 +00:00
Donny/강동윤
1645bb30b7
perf(es/transforms): Reduce usage of #[fast_path]
( #2442 )
...
swc_ecma_ast:
- Implement `Take` for `ObjectLit`.
- Implement `Take` for `ArrayLit`.
swc_ecma_transforms_compat:
- `nullish_coalescing`: Remove exponential visit.
- `nullish_coalescing`: Migrate to `VisitMut`.
- `optional_chaining`: Reduce exponential visit. (But it's not removed)
- `class_properties`: Remove exponential visit.
- `jsx_src`: Migrate to `VisitMut`.
- `optional_chaining`: Mae it parallel.
- `async_to_generator`: Remove `#[fast_path]`.
- `arrow`: Remove `#[fast_path]`.
- `destructuring`: Remove `#[fast_path]`.
- `block_scoped_functions`: Remove `#[fast_path]`.
- `classes`: Remove `#[fast_path]`.
2021-10-16 08:12:02 +00:00
Donny/강동윤
ee9177b753
fix(es): Fix bugs ( #2447 )
...
swc_ecma_parser:
- Fix parsing of jsx escapes.
swc_ecma_minifier:
- Don't mangle name as `const` or `let`. (#2446 )
swc_ecma_transforms_react:
- Fix handling of jsx escapes. (#2351 )
2021-10-16 04:25:54 +00:00
Donny
dcf42771ad
chore: Publish
2021-10-15 19:21:25 +09:00
Donny/강동윤
0e48284afb
fix(es/minifier): Fix bugs ( #2433 )
...
swc_ecma_minifier:
- `sequences`: Stop searching for candidates if a dependency issue is found.
2021-10-14 13:48:14 +00:00
Donny
267d639c2e
chore: Disable freebsd to publish
2021-10-14 12:06:24 +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/강동윤
bbefa0e57e
chore: Improve documentation for rust users ( #2340 )
2021-10-04 06:10:30 +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
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/강동윤
5e1003ec4c
fix(es/transforms/base): Fix hygiene
( #2299 )
...
swc_ecma_transforms_base:
- `hygiene`: Support usage-def conflict where def comes first. (#2297 )
2021-09-24 10:26:01 +00:00
Donny/강동윤
2156364121
fix(es/transforms/base): Fix hygiene
( #2282 )
...
swc_ecma_transforms_base:
- `hygiene`: Handle decl-ref conflict. (#2211 )
2021-09-22 06:56:04 +00:00
강동윤
ce01b8a9b7
fix(es): Fix bugs ( #2256 )
...
swc_ecma_codegen:
- Fix source map of string literals. (#2253 )
swc_ecma_transforms_typescript:
- Allow using same name for a module with function. (#2243 )
2021-09-18 07:52:08 +00:00
강동윤
20ce326909
feat(es/minifer): Improve minifier ( #2229 )
...
swc_ecma_minifier:
- `if_return`: Allow side-effect-free statements to come after `if_return`.
- `collapse_vars`: Move variables without init to first.
- `analyzer`: Remove useless fields.
- Don't drop `return` tokens if there's a finally block.
- `drop_return_value`: Drop side-effect-free return arguments.
- `make_sequences`: Don't inject `void 0` to return args.
- `if_terminate`: Move to the pure optimizer.
- Fix a bug related to `RegExp`.
2021-09-16 04:23:33 +00: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
강동윤
9ffe47106a
fix(swc): Fix target
( #2226 )
...
swc:
- Fix `target` option. (#2225 )
2021-09-10 15:43:14 +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
강동윤
11fe35dbd1
feat(es/minifier): Implement static evaluator ( #2176 )
...
swc_ecma_minifier:
- Add an api to evaluate constants statically.
2021-08-30 05:21:38 +00:00
강동윤
8c5daeec2a
fix(es/transforms/base): Fix await
expressions. ( #2157 )
...
swc_ecma_transforms_base:
- Preserve parenthesis in `await (a || b)`. (#2155 )
2021-08-26 13:19:12 +09:00
강동윤
584c44a490
feat(es): Reexport minifier from swc_ecmascript
( #2146 )
2021-08-24 20:38:16 +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
강동윤
6eaf60b8a4
fix(swc): Disable aes
feature ( #2109 )
...
node/swc:
- Disable `aes`. (#1807 )
2021-08-19 12:12:16 +00: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
nicholas
035ff77f1a
fix(node/swc): Fix incorrect field package.json ( #2069 )
2021-08-14 02:17:54 +09:00
강동윤
a7cb2aba9d
fix(es/minifier): Fix bugs of the minifier ( #2052 )
...
swc_ecma_minifier:
- Test mangler using execution test suite.
- `mangler`: Preserve `arguments`.
- `mangler`: Handle shorthand. (#2051 )
- `mangler`: Handle object pattern properties.
- `precompress`: Don't drop function declarations if the variable with same name is in different scope. (#2011 )
2021-08-11 07:24:52 +00: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
강동윤
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
강동윤
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
강동윤
f3603b2cb8
chore: Use correct license for the node package ( #1966 )
2021-07-27 14:59:46 +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
강동윤
7f968472fb
chore: Publish v1.2.65
2021-07-18 19:29:08 +09: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
강동윤
04d4384482
fix(ci): Use cross-env ( #1897 )
2021-07-06 14:29:45 +09:00
강동윤
44b6400385
chore: Publish v1.2.63 ( #1895 )
2021-07-05 23:49:24 +09:00
강동윤
c4e013441b
chore(wasm): Fix license ( #1874 )
...
wasm:
- Use spdx-compatible license. (#1798 )
2021-07-01 13:48:25 +00:00