oxc/tasks
Dunqing 0d0bb17ad9 feat(transformer): complete the async-to-generator plugin (#6658)
In this PR, most of the async functions have transformed correctly. But the async arrow functions don't fully transform correctly yet, it is related to we need to transform the arrow function to the generator function. For example:

Input:
```js
function declaration() {
  const asy = async () => {
  console.log(this.name)
 }
}
```

Output:
```js
function declaration() {
  const asy = babelHelpers.asyncToGenerator(function* () {
     console.log(this.name);
  });
}
```

Expected Output:

```js
function declaration() {
  var _this = this;
  const asy = /*#__PURE__*/function () {
    var _ref = babelHelpers.asyncToGenerator(function* () {
      console.log(_this.name);
    });
    return function asy() {
      return _ref.apply(this, arguments);
    };
  }();
}
```

From the expected output, we haven't handled `this` correctly, which means even if the `arrow-function` plugin doesn't enable, we still need to handle this correctly as the `arrow-function` plugin does, and further question if `arrow-function` plugin is enabled, how to avoid these making conflict?

I thought we may move out the implementation of `arrow-function` and as a common helper, this way every plugin can handle this well
2024-10-25 03:23:31 +00:00
..
ast_tools refactor(rust): remove the annoying clippy::wildcard_imports (#6860) 2024-10-24 13:57:19 +00:00
benchmark chore: remove unnecessary packageManager from package.json 2024-10-25 10:38:02 +08:00
common perf(rust): use cow_utils instead (#5664) 2024-09-11 18:39:30 +08:00
coverage feat(regular_expression)!: Support ES2025 Duplicated named capture groups (#6847) 2024-10-25 02:13:57 +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(tasks/lint_rules): sync rules with ESLint v9 (#6777) 2024-10-22 20:14:10 +08:00
minsize feat(minifier): improve folding block stmts (#6793) 2024-10-23 04:13:58 +00:00
prettier_conformance refactor(prettier)!: remove source_text argument from constructor (#6448) 2024-10-11 06:27:33 +00:00
rulegen feat(rulegen): add module definitions for new rules (#6845) 2024-10-24 15:47:07 +08:00
transform_checker refactor(rust): remove the annoying clippy::wildcard_imports (#6860) 2024-10-24 13:57:19 +00:00
transform_conformance feat(transformer): complete the async-to-generator plugin (#6658) 2024-10-25 03:23:31 +00:00
website docs(linter): add schema to config examples (#6838) 2024-10-24 08:44:04 +08:00