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 fix(transformer): fix arrow function transform (#5933) 2024-09-21 07:48:18 +00:00
babel-plugin-transform-async-generator-functions/test/fixtures fix(transformer/async-generator-functions): incorrect transformation for for await if it's not placed in a block (#7148) 2024-11-06 05:51:01 +00:00
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 feat(transformer): class static block transform (#6733) 2024-10-22 03:40:02 +00:00
babel-plugin-transform-exponentiation-operator/test/fixtures test(transformer): fix indentation in transformer test fixtures (#6346) 2024-10-08 01:32:07 +00:00
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 feat(transformer): transform object rest spread (#7003) 2024-11-21 11:33:26 +00:00
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 fix(oxc_transformer): correct generate ThisExpr and import.meta in jsx pragma (#7553) 2024-12-03 13:54:15 +00:00
babel-plugin-transform-react-jsx-source/test/fixtures/react-source fix(transformer): JSX source: add var _jsxFileName statement (#5894) 2024-09-20 01:26:52 +00:00
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 test(transformer): fix indentation in transformer test fixtures (#6346) 2024-10-08 01:32:07 +00:00