IWANABETHATGUY
4bbc977971
chore: upgrade rustc toolchain to stable 1.75.0 ( #1853 )
...
ref:
https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html
2023-12-29 12:20:51 +08:00
秦宇航
ae27a8d1e6
feat(transformer): add partial support for babel-plugin-transform-instanceof ( #1802 )
2023-12-25 15:06:41 +08:00
magic-akari
a2858ed452
refactor(ast): introduce ThisParameter ( #1728 )
...
Most TypeScript types can be eliminated during the code generation phase
by not printing the corresponding AST nodes.
The changes in this PR enable applying a similar technique to the `this`
parameter.
2023-12-19 13:20:33 +08:00
Dunqing
f58b6279c8
feat(transformer): add arrow_functions plugin ( #1663 )
2023-12-13 20:46:28 +08:00
Dunqing
864176a051
feat(transformer/react-jsx): returns ThisExpression when identifier is this ( #1661 )
2023-12-13 13:47:54 +08:00
Ken-HH24
e331cc2677
feat(transformer): duplicate keys ( #1649 )
2023-12-10 18:07:32 +08:00
Boshen
8347e2225c
Release crates v0.4.0
2023-12-08 17:20:37 +08:00
Miles Johnson
c6ad6603a4
feat(semantic): support scope descendents starting from a certain scope. ( #1629 )
...
@Boshen
The `ScopeTree.descendants` function would return all scopes starting
from the root, and wasn't truly descendants from a specific scope. To
improve this, I've renamed this function to `descendants_from_root` and
have introduced a new `descendants` function that does support from a
specific scope.
Furthermore, I've introduced helper functions to `SymbolTree` to make
reading symbols/scopes easier.
To verify this functionality, I enabled the `function_name` transformer
(and fixed it), and ran some example transforms. Here's the input:
```js
let fn;
fn = function (a, b, c) {
const d = "";
};
const func = function (arg) {
{
const value = "";
}
};
const f = function (f) {};
```
And the output using _the old implementation_. Note that all function
names are suffixed with a number, this is incorrect, since it was
inheriting far too many scopes.
```js
let fn;
fn = function fn1(a, b, c) {
const d = '';
};
const func = function func1(arg) {
{
const value = '';
}
};
const f = function f2(f) {
};
```
And here's the output with the new implementation. Note that only `f` is
suffixed with a number. That's because it has a shadowed argument of the
same name.
```js
let fn;
fn = function fn(a, b, c) {
const d = '';
};
const func = function func(arg) {
{
const value = '';
}
};
const f = function f1(f) {
};
```
2023-12-07 17:29:11 +08:00
Miles Johnson
6cbc5dd75b
feat(transformer): Start on function_name transform. ( #1510 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
2023-12-04 13:35:44 +08:00
IWANABETHATGUY
c034eee5c1
feat(transformer): handle invalid react jsx runtime ( #1502 )
2023-11-28 23:19:58 +08:00
magic-akari
92c1d9d527
feat(transform): TypeScript Enum ( #1173 )
2023-11-28 10:33:01 +08:00
IWANABETHATGUY
b6393f052f
feat(transformer/react): handle babel 8 breaking removed-options ( #1489 )
...
1. removed options react jsx
2. Passed 4 test cases.
2023-11-22 11:01:40 +08:00
IWANABETHATGUY
f66e4d8ac3
feat(transformer): add transform property-literal plugin ( #1458 )
...
1. Add `transform-property-literal-plugin`
2. Passing 2 testcases.
---------
Co-authored-by: Wenzhe Wang <mysteryven@gmail.com>
2023-11-21 23:07:43 +08:00
Boshen
1a576f60a8
refactor(rust): move to workspace lint table ( #1444 )
2023-11-20 14:38:10 +08:00
Dunqing
7f01d48df3
feat(transformer/react-jsx): set automatic to the default value for runtime ( #1270 )
...
Align babel8
2023-11-14 09:26:21 +08:00
Dunqing
d62631e239
refactor(transformer/react-jsx): use extend instead of for-in with push ( #1236 )
2023-11-12 19:26:15 +08:00
Dunqing
47ba874f4f
refactor(transformer/react-jsx): improve SpreadChildrenAreNotSupported error implementation ( #1235 )
2023-11-12 19:17:09 +08:00
Dunqing
1eef241788
feat(transformer/react-jsx): support for throwing SpreadChildrenAreNotSupported error ( #1234 )
2023-11-12 18:37:19 +08:00
Dunqing
39e608734f
feat(transformer/react-jsx): support for throwing ImportSourceCannotBeSet error ( #1224 )
2023-11-12 11:17:23 +08:00
Dunqing
b7e8feb7c1
feat(transformer/react-jsx): support throw valueless-key error ( #1221 )
2023-11-11 20:10:07 +08:00
Dunqing
a22ced78f1
feat(transformer/react-jsx): implement throwIfNamespace option ( #1220 )
2023-11-11 13:31:45 +08:00
Dunqing
48242367bb
fix(transformer/react-jsx): missing import jsxs in nested fragment ( #1218 )
2023-11-11 02:45:42 +00:00
Dunqing
a0f40cb058
fix(transformer/react-jsx): missing default options when plugin without config ( #1219 )
2023-11-11 10:38:28 +08:00
Dunqing
d9b450414b
feat(transformer/react-jsx): when the source type is a script, use require to import the react ( #1207 )
2023-11-10 18:17:31 +08:00
Dunqing
3e15fa624b
fix(transformer/react-jsx): undetectable comments in multiline comments ( #1211 )
2023-11-10 08:20:55 +00:00
Dunqing
8c624abf9c
feat(transformer/react-jsx): throw the pragma and pragmaFrag cannot be set when runtime is automatic error ( #1196 )
...
close : #1194
Here's a rough implementation of my idea of throwing an error.
2023-11-10 12:50:54 +08:00
Dunqing
b65094b995
fix(transformer/react-jsx): no need to wrap the Array when there is only one correct child element ( #1205 )
2023-11-10 10:52:37 +08:00
Dunqing
7d85492a03
feat(transformer/react-jsx): support the sourceType is a script ( #1192 )
2023-11-08 15:15:00 +08:00
Dunqing
28c0b85646
feat(transformer/react-jsx): support @jsxFrag annotation ( #1189 )
2023-11-08 11:35:40 +08:00
Dunqing
633c469d2d
feat(transformer/react-jsx): support @jsx annotation ( #1182 )
2023-11-07 20:30:26 +08:00
Dunqing
3cb7c0b199
feat(transformer/react-jsx): support pragmaFrag option ( #1181 )
2023-11-07 10:34:15 +00:00
Dunqing
4ed0813f9b
feat(transformer/react-jsx): support pragma option ( #1180 )
2023-11-07 18:26:54 +08:00
Dunqing
bf23d87848
feat(transformer/react-jsx): support @jsxImportSource annotation ( #1179 )
2023-11-07 17:29:38 +08:00
Dunqing
f0e452a599
feat(transformer): support importSource option in react_jsx ( #1115 )
2023-11-07 16:42:08 +08:00
Boshen
ba603cebb9
Release Oxc v0.3.0
2023-11-06 19:11:16 +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
Boshen
203cf37695
feat(transformer/react): read comment pragma @jsxRuntime classic / automatic ( #1133 )
...
closes #1120
2023-11-03 11:10:11 +08:00
Boshen
69150d812c
refactor(transformer): move Semantic into Transformer ( #1130 )
2023-11-02 13:10:15 +08:00
Boshen
a455c81db6
fix(linter): revert changes to JSX attribute strings ( #1101 )
2023-10-30 15:26:04 +08:00
Boshen
262631da62
feat(transformer/react): implement fixup_whitespace_and_decode_entities ( #1091 )
2023-10-29 18:11:51 +08:00
Boshen
6295f9ce18
fix(ast): jsx attribute value and text child should be jsx string ( #1089 )
2023-10-29 15:32:24 +08:00
Boshen
1051f15005
feat(transformer/jsx): escape xhtml in jsx attributes ( #1088 )
2023-10-29 15:16:50 +08:00
Boshen
1ad2dca45a
fix(transformer/react_jsx): add imports to the top body ( #1087 )
2023-10-29 15:05:52 +08:00
Boshen
e8a4e81298
feat(transformer): implement some of jsx decode entities ( #1086 )
2023-10-29 14:57:39 +08:00
Boshen
fe4a5ed535
fix(transformer): fix position of inserted react import statement ( #1082 )
2023-10-28 23:05:02 +08:00
Boshen
0856111bea
feat(transformer): implement more of react transform attributes ( #1081 )
2023-10-28 22:47:39 +08:00
Boshen
96332c85c6
feat(transformer): import jsxs when children is static ( #1080 )
2023-10-28 17:25:25 +08:00
Boshen
c7a04f42e7
refactor(transformer): remove returning None from transform functions ( #1079 )
2023-10-28 16:55:38 +08:00
Boshen
d411258be4
feat(transformer): finish transform jsx attribute value ( #1078 )
2023-10-28 16:46:33 +08:00
Boshen
5fb27fbe8a
feat(transformer): implement key extraction for react automatic ( #1077 )
2023-10-28 16:34:54 +08:00