oxc/tasks/transform_conformance/tests
Dunqing 06ccb51fae fix(transformer/async-to-generator): move parameters to the inner generator function when they could throw errors (#8500)
The new implementation port from [esbuild](df815ac27b/internal/js_parser/js_parser_lower.go (L355-L467)), before from `Babel`.

Babel's transform implementation for the async method is incorrect because the async method should return a rejecting promise when it throws an error. Everything is good if the errors are thrown in the async method body, but the following case will throw an error in the parameters which causes the whole program crushed not a rejecting promise. So we should move the parameters to the inner generator function when the parameters could throw an error.

Input:
```js
class Cls {
  // ReferenceError: Cannot access 'b' before initialization
  async method(a = b, b = 0) {}
}
```

Before output
```js
class Cls {
  method(a = b, b = 0) {
    return babelHelpers.asyncToGenerator(function* () {})();
  }
}
```

After output:
```js
class Cls {
  method() {
     // ReferenceError: Cannot access 'b' before initialization
    return babelHelpers.asyncToGenerator(function* (a = b, b = 0) {}).apply(this, arguments);
  }
}
```

No override tests because Babel doesn't cover this case.
2025-01-16 00:18:05 +00:00
..
babel-plugin-transform-arrow-functions/test/fixtures
babel-plugin-transform-async-generator-functions/test/fixtures
babel-plugin-transform-async-to-generator/test/fixtures fix(transformer/async-to-generator): move parameters to the inner generator function when they could throw errors (#8500) 2025-01-16 00:18:05 +00:00
babel-plugin-transform-class-properties/test/fixtures fix(transformer/class-properties): handle nested super() calls (#8506) 2025-01-15 15:09:00 +00:00
babel-plugin-transform-class-static-block/test/fixtures
babel-plugin-transform-exponentiation-operator/test/fixtures
babel-plugin-transform-logical-assignment-operators/test/fixtures feat(transformer/logical-assignment-operators): no temp vars for literals (#7759) 2024-12-10 02:28:28 +00:00
babel-plugin-transform-nullish-coalescing-operator/test/fixtures test(transformer/nullish-coalescing): failing test (#8051) 2024-12-21 07:08:29 +00:00
babel-plugin-transform-object-rest-spread/test/fixtures/object-rest
babel-plugin-transform-optional-catch-binding/test/fixtures
babel-plugin-transform-private-methods/test/fixtures fix(transformer/private-methods): no temp var for class when unused private methods (#8360) 2025-01-09 03:17:37 +00:00
babel-plugin-transform-react-jsx/test/fixtures
babel-plugin-transform-react-jsx-source/test/fixtures/react-source
babel-plugin-transform-typescript/test/fixtures fix(transformer/typescript): retain TSImportEqualsDeclaration when it is exported 2025-01-14 19:12:23 +08:00
babel-preset-typescript/test/fixtures/removeImportExtensions
regexp/test/fixtures