Boshen
445603444f
feat(ast)!: add IdentifierReference to ExportSpecifier ( #3820 )
...
closes #3795
closes #3796
2024-06-22 11:43:41 +00:00
Boshen
99a40ce6ac
fix(semantic): export default foo should have ExportLocalName::Default(NameSpan) entry ( #3823 )
2024-06-22 11:09:23 +00:00
Boshen
7302429b2b
refactor(linter/prefer_number_properties): remove the unused IdentifierName check ( #3822 )
2024-06-22 09:40:02 +00:00
Boshen
a1b2d83ea9
chore(ast): move ast implementations to ast_impl ( #3821 )
...
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-06-22 16:58:24 +08:00
rzvxa
567334834b
chore(ci): now we mark both ts alias and eslint rules. ( #3813 )
...
Fixes the unmarked implemented rules in #479 .
2024-06-22 04:55:34 +00:00
overlookmotel
4f7ff7e3ad
perf: do not pass &Atom to functions ( #3818 )
...
`Atom` is just a wrapper around `&str`, so better not to pass `&Atom` to functions, as that's a double-reference. Prefer `Atom` or `&str` instead to avoid indirection.
2024-06-22 04:48:00 +00:00
overlookmotel
aaa944d66b
improve(transformer): avoid reallocating strings ( #3817 )
...
Re-use existing `Atom`s rather than allocating duplicate strings in TS transforms.
2024-06-22 04:47:58 +00:00
overlookmotel
6dcc3f4002
fix(transformer): fix TS annotation transform scopes ( #3816 )
...
Create symbol references for `IdentifierReferences` created in TS annotations transform.
2024-06-22 04:47:57 +00:00
Dunqing
2cdb34f6df
feat(isolated-declarations): support for class function overloads ( #3811 )
2024-06-21 14:37:10 +00:00
Boshen
dd540c8f0f
feat(minifier): add skeleton for ReplaceGlobalDefines ast pass ( #3803 )
2024-06-21 13:53:59 +00:00
Dunqing
58e54f4aea
fix(isolated-declarations): report an error for parameters if they are ObjectPattern or ArrayPattern without an explicit type ( #3810 )
2024-06-21 10:20:28 +00:00
Dunqing
231b8f0946
feat(isolated-declarations): support for export default function overloads ( #3809 )
2024-06-21 10:20:25 +00:00
Dunqing
eadf495e85
chore(isolated-declarations): add tests from Deno ( #3808 )
2024-06-21 10:20:21 +00:00
Dunqing
cb8a272392
fix(isolated-declarations): cannot infer nested as const ( #3807 )
2024-06-21 10:20:17 +00:00
Dunqing
d8ecce5b3c
fix(isolated-declarations): infer BigInt number as bigint type ( #3806 )
2024-06-21 10:20:13 +00:00
Dunqing
4e241fcda8
fix(isolated-declarations): missing const after transformed const enum ( #3805 )
2024-06-21 10:20:10 +00:00
Dunqing
683c7b0dd1
fix(isolated-declarations): shouldn’t add declare in declaration with export default ( #3804 )
...
Added tests in #3808
2024-06-21 10:20:06 +00:00
Boshen
f3c3970131
feat(minifier): add skeleton for RemoveDeadCode ast pass ( #3802 )
2024-06-21 07:18:14 +00:00
Boshen
8027b1e894
refactor(minifier): change prepass to ast_passes::remove_parens ( #3801 )
2024-06-21 07:18:08 +00:00
Boshen
49fab9d6be
Release npm/oxc-transform v0.15.1
2024-06-20 23:41:31 +08:00
Boshen
f8fe583a0b
ci: run cargo check first
2024-06-20 23:38:21 +08:00
Boshen
0511a1b014
chore(justfile): run cargo shear in just ready
2024-06-20 23:27:46 +08:00
Boshen
4f2f96e716
chore(napi/transform): remove unused dependencies
2024-06-20 23:26:57 +08:00
Boshen
05e97b615d
chore: fix clippy warning
2024-06-20 23:22:01 +08:00
Boshen
25b607cde1
ci: fix
2024-06-20 23:18:42 +08:00
Boshen
fe38a20715
refactor(napi/transform): output normal error messages
2024-06-20 23:14:17 +08:00
Boshen
152195b67b
ci: try fix graphite optimize ci
2024-06-20 23:14:17 +08:00
Dunqing
a37138f1ec
feat(isolated-declarations): improve the inference template literal ( #3797 )
2024-06-20 15:02:45 +00:00
Dunqing
b0d7355c98
feat(isolated-declarations): transform const expression correctly ( #3793 )
2024-06-20 15:02:41 +00:00
Boshen
2a16ce0624
feat(traverse): disable syntax check and disable build module record ( #3794 )
...
These can be skipped because :
* semantic errors are not passed to the caller
* module record is not used
2024-06-20 13:05:35 +00:00
Dunqing
01da2f78c1
feat(codegen): print TSThisParameter for TSCallSignatureDeclaration and TSMethodSignature ( #3792 )
2024-06-20 10:13:58 +00:00
Dunqing
2821e0e307
feat(codegen): print readonly keyword for TSIndexSignature ( #3791 )
2024-06-20 10:13:51 +00:00
Dunqing
7d47fc3fcc
fix(isolated-declarations): should stripe async and generator keyword after transformed ( #3790 )
2024-06-20 10:13:44 +00:00
Dunqing
dc8e2b8dc0
feat(coverage/transpile): compare error message ( #3789 )
2024-06-20 10:13:36 +00:00
Boshen
ebb6eb8c67
chore(coverage): add a prepass benchmark
2024-06-20 15:07:17 +08:00
Alexander S
a5e0f2274a
fix(docs): detect typescript alias rules and mark them as supported ( #3779 )
...
Some tpyescript rules are extensions of the core eslint rules.
Now we mark them as supported :)
Maybe add a info for the user about this behavior?
Some discord discussion:
https://discord.com/channels/1079625926024900739/1080712072012238858/1226407188650659845
## Current State
Found Aliases:
- default-param-last
- max-params
- no-array-constructor
- require-await
- no-dupe-class-members
- no-empty-function
- no-loss-of-precision
- no-redeclare
- no-useless-constructor
Todo: why im getting following output:
```
👀 typescript/require-await is implemented but not found in their rules
👀 tree-shaking/no-side-effects-in-initialization is implemented but not found in their rules
```
2024-06-20 14:56:31 +08:00
overlookmotel
24df88099a
ci: enable semantic benchmarks ( #3784 )
...
#3776 does seem to have stabilized the benchmark results. Re-enable
semantic benchmarks which we disabled because they were showing wild
variance, and see if they still do.
2024-06-20 14:55:33 +08:00
Boshen
a94ef68c0f
ci: add JEMALLOC_SYS_WITH_LG_PAGE=16 to aarch64 systems
...
closes #3783
2024-06-20 14:30:17 +08:00
Dunqing
97575d8cab
feat(codegen): print TSClassImplements and TSThisParameter ( #3786 )
...
close: https://github.com/oxc-project/oxc/issues/3692#issuecomment-2178994839
2024-06-20 06:15:23 +00:00
Dunqing
497769cb60
feat(ast): add some visitor functions ( #3785 )
2024-06-20 05:23:04 +00:00
overlookmotel
aea3e9a3f5
fix(transformer): correct spans for TS annotations transform ( #3782 )
...
Correct spans in output for TS annotations transform.
2024-06-20 01:33:12 +00:00
overlookmotel
21b0d0196b
refactor(transformer): pass ref to function ( #3781 )
...
Tiny refactor. Pass `&TSEnumDeclaration` to function instead of `&Box<TSEnumDeclaration>` (which is a reference to a reference).
2024-06-20 01:33:09 +00:00
rzvxa
4bd2c882d3
fix(linter): fix and promote getter-return to correctness. ( #3777 )
...
I had to rewrite some parts of this rule so now it uses a set dfs. It is arguably a little bit slower than before but it is less prone to false negatives.
closes #2312
[oxlint-ecosystem-ci](https://github.com/oxc-project/oxlint-ecosystem-ci/actions/runs/9586832129/job/26435575457?pr=16 )
2024-06-20 01:27:07 +00:00
rzvxa
3e78f9852f
feat(cfg): add depth first search with hash sets. ( #3771 )
...
petgraph allocates a chunk of memory for all of the graph for its dfs which is really costly for small subgraph sreachs.
This PR adds a new `set_depth_first_search` function which uses a `FxHashSet` instead.
2024-06-20 01:27:03 +00:00
overlookmotel
6ba60e978a
ci: custom global allocator for benchmarks ( #3776 )
...
Use a custom global allocator for benchmarks. Will hopefully fix the wild variance in many benchmarks that we've been seeing, which I believe is caused by unpredictable behavior in the system allocator.
2024-06-19 17:02:19 +00:00
Boshen
ae6654f247
ci: speed up conformance with thin lto ( #3773 )
2024-06-19 16:05:06 +00:00
Dunqing
4b06dc72ae
feat(ast): add TSType::TSIntrinsicKeyword to is_keyword ( #3775 )
...
follow up #3767
2024-06-19 16:00:57 +00:00
overlookmotel
7c44703a4c
refactor(transformer): remove needless pub on TS enum transform methods ( #3774 )
...
Tiny refactor. Remove `pub` visibility on methods not used outside of module.
2024-06-19 15:51:04 +00:00
Dunqing
b38c34dfce
feat(isolated-declarations): support inferring ParenthesizedExpression ( #3769 )
2024-06-19 15:43:21 +00:00
Dunqing
8ce794d740
fix(isolated-declarations): inferring an incorrect return type when there is an arrow function inside a function ( #3768 )
2024-06-19 15:43:15 +00:00