swc_ecma_codegen:
- Fix source map of string literals. (#2253)
swc_ecma_transforms_typescript:
- Allow using same name for a module with function. (#2243)
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`.
swc_ecma_transforms_compat:
- Fix `this` in class properties. (#2228)
swc_ecma_transforms_typescript:
- Handle `import =` correctly. (#2234)
- Ensure that #1653 is not the case anymore. (#1653)
swc:
- Ensure that #2232 is not the case. (#2232)
swc_ecma_loader:
- `TsConfigResolver`: Use `baseUrl`. (#2050)
swc:
- Change type of `JscConfig.base_url` to `PathBuf`.
testing:
- Improve `NormalizedOutput::compare_to_file`.
swc_ecma_codegen:
- Don't panic on `Pat::Invalid`.
- Fix codegen of unary minus. (#2213)
swc_ecma_minifier:
- Remove identifier of function expressions if a variable with same name exists.
- `sequences`: Merge into the argument of a throw statement.
- Use `ignore_return_value` for `void` expressions.
- Improve inlining.
- Drop last `return` if the return value is not used.
- `sequences`: Merge `c++; use(c)` as `use(++c)`.
- `sequences`: Merge assignments with an operator.
- `comparisons`: Optimize the comparison operator if type is equivalent.
- Fix `negate_cost`.
- `unused`: Fix order or variable initalizer when variables are dropped.
- Fix `top_retain` option.
- `if_return`: Don't merge nested if it's wrong to do so. (#2214)
- Fix negation of `if_return`.
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)
swc_ecma_codegen:
- Use span for `await` token.
- Use span for debugger statements.
- Use span for object literals.
- Use span for object patterns.
- Use span for array literals.
- Use span for `try`.
- Use span for `for`.
- Use span for `return`.
- Use span for `break`.
- Use span for `continue`.
- Use span for `this`.
- Use span for `switch`.
- Use span for `catch`.
- Use span for `case`.
- Use span for `function`.
- Use span for unary expressions.
swc_ecma_minifier:
- Normalize sequences expressions if the length is 1.
swc_ecma_parser:
- Fix panic from span assertion. (#2040)
swc_ecma_transforms_compat:
- Fix handling of `await for`. (#1918)
swc_ecma_transforms_base:
- Allow using decorator metadata even if `reflect-metadata` is not imported. (#1362)
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)
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)
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)