oxc/tasks
sapphi-red 8d52cd0a5e
feat(minifier): merge assign expression in conditional expression (#8345)
compresses `a ? b = 0 : b = 1` into `b = a ? 0 : 1`

This can be done when `b` is an IdentifierReference and the assignment operator is `=`.

In this circumstance, the evaluation of `b = a ? 0 : 1` is:

1. Let lref be ? Evaluation of LeftHandSideExpression. (this does not have a side effect when LeftHandSideExpression is an IdentifierReference)
2. Let rref be ? Evaluation of AssignmentExpression. (ConditionalExpression is evaluated here)
3. Let rval be ? GetValue(rref).
4. Perform ? PutValue(lref, rval).
5. Return rval.

**References**
- [spec of `=`](https://262.ecma-international.org/15.0/index.html#sec-assignment-operators-runtime-semantics-evaluation)
- [spec of `? :`](https://262.ecma-international.org/15.0/index.html#sec-conditional-operator-runtime-semantics-evaluation)
2025-01-08 13:34:12 +00:00
..
ast_tools refactor(ast)!: no unneccesary trailing underscores on AstBuilder method names (#8283) 2025-01-06 15:09:05 +00:00
benchmark refactor(linter): refactor LintBuilder to prep for nested configs (#8034) 2025-01-05 04:08:26 +00:00
common chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
compat_data refactor(global): sort imports (#7883) 2024-12-14 15:07:21 +00:00
coverage chore(minifier): disable RemoveUnusedCode (#8243) 2025-01-04 08:49:20 +00:00
javascript_globals feat(linter)!: sync sindresorhus/globals; removed Object.prototype properties from builtin and es* globals (#6991) 2024-10-29 04:13:20 +00:00
lint_rules fix(tasks/lint_rules): sync unicorn rules with eslint rules (#8224) 2025-01-03 11:39:51 +08:00
minsize feat(minifier): merge assign expression in conditional expression (#8345) 2025-01-08 13:34:12 +00:00
prettier_conformance refactor(prettier): Update tasks/prettier to correctly handle snapshots (#8337) 2025-01-08 17:10:30 +08:00
rulegen feat(linter)!: remove unmaintained security plugin (#7773) 2024-12-10 14:29:22 +00:00
transform_checker perf(semantic): allocate UnresolvedReferences in allocator (#8046) 2024-12-20 15:18:16 +00:00
transform_conformance fix(transformer/arrow-functions): _this = this should be inserted after super call expression (#8024) 2025-01-07 13:53:44 +00:00
website docs(tasks/website): add legend for fixable column (#7945) 2024-12-17 10:25:11 +08:00