oxc/tasks/coverage/snapshots
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
..
codegen_babel.snap chore(coverage): bump babel submodule (#8508) 2025-01-15 22:58:15 +08:00
codegen_misc.snap fix(parser): allow line breaks between const and enum (#8193) 2024-12-31 08:45:17 +08:00
codegen_test262.snap chore(coverage): bump test262 (#8055) 2024-12-21 10:20:14 +00:00
codegen_typescript.snap chore(coverage): bump test262, babel and TypeScript submodules (#7452) 2024-11-24 16:26:45 +00:00
minifier_babel.snap chore(coverage): bump babel submodule (#8508) 2025-01-15 22:58:15 +08:00
minifier_test262.snap chore(minifier): disable RemoveUnusedCode (#8243) 2025-01-04 08:49:20 +00:00
parser_babel.snap chore(coverage): bump babel submodule (#8508) 2025-01-15 22:58:15 +08:00
parser_misc.snap fix(parser): allow line breaks between const and enum (#8193) 2024-12-31 08:45:17 +08:00
parser_test262.snap fix(parser): parse import source from from 'mod' (#8056) 2024-12-21 10:20:14 +00:00
parser_typescript.snap fix(semantic): report error for super property appearing in function body (#8376) 2025-01-09 06:38:09 +00:00
prettier_babel.snap chore(coverage): bump babel submodule (#8508) 2025-01-15 22:58:15 +08:00
prettier_misc.snap
prettier_test262.snap
prettier_typescript.snap
runtime.snap 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
semantic_babel.snap chore(coverage): bump babel submodule (#8508) 2025-01-15 22:58:15 +08:00
semantic_misc.snap fix(transformer/arrow-functions): store super_methods on a Stack to fix nested async methods (#8331) 2025-01-08 21:00:45 +00:00
semantic_test262.snap 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
semantic_typescript.snap fix(transformer/typescript): correct the semantic for TSImportEqualsDeclaration transformation (#8463) 2025-01-14 11:26:50 +00:00
transformer_babel.snap chore(coverage): bump babel submodule (#8508) 2025-01-15 22:58:15 +08:00
transformer_misc.snap fix(parser): allow line breaks between const and enum (#8193) 2024-12-31 08:45:17 +08:00
transformer_test262.snap chore(coverage): bump test262 (#8055) 2024-12-21 10:20:14 +00:00
transformer_typescript.snap chore(transformer): enable class-properties plugin (#7750) 2024-12-31 12:30:58 +00:00
transpile.snap fix(isolated-declarations): unexpected error when global Symbol as property key (#8475) 2025-01-14 05:27:17 +00:00