oxc/tasks
overlookmotel ccb7bdcc56 fix(transformer): exponentiation transform: do not replace object when private property (#6313)
Fix exponentiation operator transform to bail out early if a private class property.

We can't transform this:

```js
class C {
    #p;
    method() {
        this.#p **= 2;
    }
}
```

But we should at least leave it alone. Previously `get_obj_ref` called `ast.move_expression(expr)` on the member expression's object before bailing out, so example above was transformed to:

```js
class C {
    #p;
    method() {
        null.#p **= 2; // <-- `null`
    }
}
```

This PR makes it spot this case early and bail out *before* calling `ast.move_expression(expr)`.
2024-10-06 23:08:08 +00:00
..
ast_tools perf(linter, ast-tools, coverage): Use FxHashSet instead of std::collections::HashSet (#6001) 2024-09-24 19:29:08 +08:00
benchmark refactor(codegen)!: change to CodegenReturn::code and CodegenReturn::map (#6310) 2024-10-06 05:05:47 +00:00
common perf(rust): use cow_utils instead (#5664) 2024-09-11 18:39:30 +08:00
coverage refactor(codegen)!: change to CodegenReturn::code and CodegenReturn::map (#6310) 2024-10-06 05:05:47 +00:00
javascript_globals perf(ast-tools): use FxHashMap over std::collections::HashMap (#5997) 2024-09-23 18:28:54 +00:00
lint_rules chore: use dprint to format js, json and markdown 2024-09-08 13:24:58 +08:00
minsize refactor(codegen)!: change to CodegenReturn::code and CodegenReturn::map (#6310) 2024-10-06 05:05:47 +00:00
prettier_conformance perf(linter, ast-tools, coverage): Use FxHashSet instead of std::collections::HashSet (#6001) 2024-09-24 19:29:08 +08:00
rulegen feat(rulegen): add diagnostic for rule template (#6187) 2024-10-01 11:04:50 +08:00
transform_checker ci(transformer): move post-transform checker to tasks crate (#6288) 2024-10-05 14:48:37 +00:00
transform_conformance fix(transformer): exponentiation transform: do not replace object when private property (#6313) 2024-10-06 23:08:08 +00:00
website feat(linter): add oxc-security/api-keys (#5906) 2024-09-22 22:39:56 +00:00