oxc/tasks
overlookmotel eb825edee2 fix(transformer/class-properties): replace references to class name with temp var in static prop initializers (#7610)
Similar to #7516. Fix class properties transform to replace references to class name in static prop initializers with temp var.

Input:

```js
class C {
  static getSelf = () => C;
}
const C2 = C;
C = 123;
assert(C2.getSelf() === C);
```

Output:

```js
var _C;
class C {}
_C = C;
_defineProperty(C, "getSelf", () => _C);
const C2 = C;
C = 123;
assert(C2.getSelf() === C);
```

Previously, temp var wasn't used so code was `_defineProperty(C, "getSelf", () => C);`. `C` is altered later by `C = 123`, so `C2.getSelf()` returned `123`, instead of reference to the class.
2024-12-03 12:43:21 +00:00
..
ast_tools chore(deps): update dependency rust to v1.83.0 (#7537) 2024-11-29 07:25:36 +00:00
benchmark feat(sourcemap): move oxc_sourcemap to github.com/oxc-project/oxc-sourcemap (#7604) 2024-12-03 11:59:43 +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 chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
coverage feat(sourcemap): move oxc_sourcemap to github.com/oxc-project/oxc-sourcemap (#7604) 2024-12-03 11:59:43 +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): map prefix node to n (#7397) 2024-11-21 13:58:53 +00:00
minsize chore(minifier): temporary remove try_fold_if_block_one and try_fold_if_one_child (#7536) 2024-11-29 05:05:07 +00:00
prettier_conformance chore(tasks): Update prettier_conformance task (#7500) 2024-11-27 08:40:43 +00:00
rulegen fix(rulegen): update lint rule template (#7502) 2024-11-27 17:40:38 +08:00
transform_checker chore: Rust v1.83.0 changes (#7535) 2024-11-29 11:59:45 +08:00
transform_conformance fix(transformer/class-properties): replace references to class name with temp var in static prop initializers (#7610) 2024-12-03 12:43:21 +00:00
website docs(linter): fix config example headings (#7562) 2024-12-01 16:31:22 +08:00