magic-akari
08dc0adeab
feat(transformer): add object-spread plugin ( #3133 )
2024-08-28 15:57:20 +00:00
Boshen
aa7718ab7b
feat(transform_conformance): show printed output alongside with errors ( #5105 )
...
closes #5098
```
cargo run -p oxc_transform_conformance -- --filter logical-assignment/arrow-functions-transform/input.js
Input:
var a;
a ||= () => {};
a &&= () => {};
a ??= () => {};
Expected:
var a;
a || (a = () => {});
a && (a = () => {});
a ?? (a = () => {});
Transformed:
var a;
a || (a = () => {});
a && (a = () => {});
a ?? (a = () => {});
Errors:
x Symbol reference IDs mismatch:
| after transform: SymbolId(0): [ReferenceId(0), ReferenceId(1),
| ReferenceId(2), ReferenceId(3), ReferenceId(4), ReferenceId(5),
| ReferenceId(6), ReferenceId(7), ReferenceId(8)]
| rebuilt : SymbolId(0): [ReferenceId(0), ReferenceId(1),
| ReferenceId(2), ReferenceId(3), ReferenceId(4), ReferenceId(5)]
x Reference flags mismatch:
| after transform: ReferenceId(4): ReferenceFlags(Write)
| rebuilt : ReferenceId(1): ReferenceFlags(Read | Write)
x Reference flags mismatch:
| after transform: ReferenceId(6): ReferenceFlags(Write)
| rebuilt : ReferenceId(3): ReferenceFlags(Read | Write)
x Reference flags mismatch:
| after transform: ReferenceId(8): ReferenceFlags(Write)
| rebuilt : ReferenceId(5): ReferenceFlags(Read | Write)
Passed: true
```
2024-08-23 04:00:45 +00:00
Boshen
64ace42566
feat(transform_conformance): show transform conformance errors ( #4976 )
2024-08-19 09:01:34 +00:00
Dunqing
0d7912217a
feat(transformer): support logical-assignment-operators plugin ( #4890 )
...
part of #4754
The implementation copy from the original implementation which removed in https://github.com/oxc-project/oxc/pull/2865 .
2024-08-15 10:10:36 +00:00
Dunqing
ab1d08ccfb
feat(transformer): support optional-catch-binding plugin ( #4885 )
...
part of #4754
The implementation copy from the original implementation which removed in https://github.com/oxc-project/oxc/pull/2865 .
2024-08-15 10:10:34 +00:00
Dunqing
69da9fda3a
feat(transformer): support nullish-coalescing-operator plugin ( #4884 )
...
The implementation copy from the original implementation which removed in https://github.com/oxc-project/oxc/pull/2865 .
2024-08-15 10:10:33 +00:00
Dunqing
3a66e5843d
feat(transformer): support exponentiation operator plugin ( #4876 )
...
The implementation copy from the original implementation which removed in https://github.com/oxc-project/oxc/pull/2865 .
2024-08-15 10:10:32 +00:00
Boshen
c041e9d1a9
chore: bump test262, babel and TypeScript submodules ( #3644 )
2024-06-12 18:42:32 +08:00
Dunqing
816a782254
feat(transformer): support targets option of preset-env ( #3371 )
...
The implementation of the `targets` options was copied from
[swc](https://github.com/swc-project/swc/tree/main/crates/preset_env_base ),
which resulted in some added dependencies in transformer.
Currently, it has supported enabling plugins by `targets`
2024-05-27 10:33:40 +08:00
Boshen
530455849b
chore(tasks): add commit sha to snapshots to make sure submodules are not outdated ( #3267 )
...
If submodules are outdated, it'll panic with the following message
```
Repository is outdated, please run `just submodules` to update it.
```
For us maintainers, we'll need the env `UPDATE_SNAPSHOT` to force an update.
2024-05-14 10:18:00 +00:00
Dunqing
905ee3fef1
feat(transformer): add arrow-functions plugin ( #3083 )
...
close : #2983
2024-04-29 08:04:01 +00:00
Boshen
14754777a4
feat(transformer): implement react-jsx-source ( #2948 )
2024-04-12 20:21:54 +08:00
Boshen
07bd85e25d
chore(transform_conformance): clear the conformance snapshot
2024-04-11 14:09:59 +08:00
Boshen
c1a2958a5a
chore: remove oxc_transformer for a reimplementation ( #2865 )
...
closes #2860
2024-03-30 17:19:46 +08:00
Dunqing
220f722f19
chore: update snapshots ( #2817 )
...
Babel repo is updated in #2813 and #2814
2024-03-26 11:53:26 +08:00
Dunqing
9e598ff650
feat(transformer): add decorators plugin ( #2139 )
2024-01-24 11:09:19 +08:00
underfin
78b427bc50
feat(transform): support es2015 new target ( #1967 )
...
Here implementing the es2015 new target transform, see detail at
https://babel.dev/docs/babel-plugin-transform-template-new-target .
Here has three kinds need to be distinguished.
- `NewTargetKind::Method`, it from `AstKind::ObjectMethod` or
`AstKind::MethodDefinitionKind::Get/Set/Method`. It will be transformed
to `void 0`.
- `NewTargetKind::Constructor`, is from `
AstKind::MethodDefinitionKind::Constructor`. It will be transformed to
`this.constructor`.
- `NewTargetKind::Function`, is from ` AstKind::Function`, here the
function is not the above function. It will be transformed to `this
instanceof _target ? this.constructor : void 0`, here `_target` comes
from the function name or is created by scope uid ident.
2024-01-10 23:59:56 +08:00
秦宇航
ae27a8d1e6
feat(transformer): add partial support for babel-plugin-transform-instanceof ( #1802 )
2023-12-25 15:06:41 +08:00
Boshen
ddab18f5af
chore: update snapshots - upgrading bun fixes this???
2023-12-14 16:58:47 +08:00
Dunqing
f58b6279c8
feat(transformer): add arrow_functions plugin ( #1663 )
2023-12-13 20:46:28 +08:00
Boshen
37a592cc33
chore: update transform conformance exec snapshot
2023-11-28 16:38:20 +08:00
Dunqing
472707c04e
feat(task/transformer-conformance): skip babel 8 unsupported test cases ( #1258 )
...
Prior to babel8, object merging would use `babelHelper.extend`, which
caused most tests to fail
2023-11-13 11:05:36 +08:00
Wenzhe Wang
f71cb9f1da
feat(transform): support TemplateLiteral of babel/plugin-transform-template-literals ( #1132 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-03 22:19:44 +08:00
Wenzhe Wang
8105ee5872
feat(tasks): skip cases start with dot ( #1114 )
...
0effd92d88/packages/babel-helper-fixtures/src/index.ts (L223)
2023-10-30 23:34:43 +08:00
Wenzhe Wang
7192520d2b
feat(transformer_conformance): use bun to run babel exec.js test cases ( #1012 )
...
closes #999
Co-authored-by: Boshen <boshenc@gmail.com>
2023-10-25 03:06:07 +00:00