Dunqing
27b2c212c4
refactor(transformer/decorators): if it is a private method definition, transform it ( #2427 )
2024-02-19 19:17:11 +08:00
Dunqing
60db720fa6
feat(parser): parse import attributes in TSImportType ( #2436 )
...
close : #2394
64d2eeea7b/src/compiler/types.ts (L2177-L2185)
The corresponding test cases were skipped, so I manually added some
cases to misc
f5db48237f/tasks/coverage/src/typescript.rs (L118-L121)
2024-02-19 12:26:42 +08:00
Dunqing
b5deb9a708
fix(codegen): when async is on the left-hand side of a for-of, wrap it in parentheses ( #2407 )
...
Refer to
55e1127a49/internal/js_printer/js_printer.go (L3097-L3104)
2024-02-13 22:42:23 +08:00
Boshen
83cb78fbb0
feat(coverage): add prettier idempotency test ( #2403 )
...
feat(coverage): add prettier idempotency test
closes #1329
feat(prettier_conformance): enable TypeScript
2024-02-12 16:20:09 +08:00
Boshen
1cbd7539fb
feat(coverage): add prettier idempotency test ( #2402 )
...
closes #1329
2024-02-12 15:30:16 +08:00
Boshen
70a0076eed
refactor: remove global allocator from non-user facing apps ( #2401 )
...
The runtime performance gains does not out weight the compilation speed from
building the custom allocators, which takes about a minute to build on
slower machines.
2024-02-12 14:09:05 +08:00
Dunqing
73e116e8a1
fix(parser): incorrect parsing of class accessor property name ( #2386 )
2024-02-11 22:57:13 +08:00
Boshen
9ff7986610
feat(prettier): handle binaryish expression in return statement ( #2388 )
2024-02-11 20:01:25 +08:00
Boshen
871a73afdd
fix(prettier): semi colon after class property ( #2387 )
2024-02-11 19:25:38 +08:00
Dunqing
0df7e296f9
feat(tasks/codegen): check node version >= 20 ( #2385 )
...
This syntax only works on node >= 20
`import value from './json-value-array_FIXTURE.json' with { type: 'json'
};`
2024-02-11 19:23:11 +08:00
Boshen
15a8857927
refactor(prettier): improve print_statement_sequence ( #2383 )
2024-02-11 00:16:26 +08:00
Boshen
82a6dc17d3
feat(pretter): implement print_binaryish_expressions ( #2382 )
2024-02-10 23:18:56 +08:00
Boshen
2dfe5210bb
fix(prettier): print strings as raw strings ( #2380 )
2024-02-10 17:52:17 +08:00
Boshen
642484e2cb
feat(prettier): print newlines between array expression elements ( #2379 )
2024-02-10 17:31:09 +08:00
Boshen
ef336cb66b
feat(parser): recover from async x [newline] => x ( #2375 )
...
```javascript
async x
=> x
```
Babel recovers and displays "No line break is allowed before '=>'
2024-02-10 11:19:08 +08:00
Boshen
70c983d4bb
feat(prettier): print rest parameters ( #2370 )
2024-02-09 22:59:28 +08:00
Boshen
9b6c313ebf
fix(prettier): flatten all binary expressions for now ( #2367 )
2024-02-09 21:48:27 +08:00
Boshen
90a834f87b
chore: update snapshot
2024-02-09 21:08:39 +08:00
Dunqing
2eb489e996
fix(codegen): format new expession + import expression with the correct parentheses ( #2346 )
...
Similar to #2330
2024-02-09 20:51:50 +08:00
Dunqing
e4754873ee
fix(prettier): printing value instead of key in BindingProperty ( #2334 )
...
fix : #2314
2024-02-08 21:49:10 +08:00
Boshen
5d9b0f3312
ci: speed up benchmark build ( #2343 )
...
closes #2299
Managed to figure out what `cargo codspeed build` is doing :-)
2024-02-08 19:47:50 +08:00
overlookmotel
aef593fb50
parser(refactor): promise only one Source on a thread at a time ( #2340 )
...
Introduce invariant that only a single `lexer::Source` can exist on a thread at one time.
This is a preparatory step for #2341 .
2 notes:
Restriction is only 1 x `ParserImpl` / `Lexer` / `Source` on 1 *thread* at a time, not globally. So this does not prevent parsing multiple files simultaneously on different threads.
Restriction does not apply to public type `Parser`, only `ParserImpl`. `ParserImpl`s are not created in created in `Parser::new`, but instead in `Parser::parse`, where they're created and then immediately consumed. So the end user is also free to create multiple `Parser` instances (if they want to for some reason) on the same thread.
2024-02-08 14:51:17 +08:00
Dunqing
3268d7d66e
feat(tasks/prettier): add some information for debug no spec calls ( #2333 )
2024-02-07 16:55:59 +08:00
Boshen
e8dc68c525
chore: update prettier to v3.2.5 ( #2332 )
2024-02-06 22:55:43 +08:00
Dunqing
55011e2793
feat(codegen): avoid printing comma in ArrayAssignmentTarget if the elements is empty ( #2331 )
2024-02-06 22:45:19 +08:00
Boshen
43a9cb5522
chore: update snapshot
2024-02-06 22:17:59 +08:00
Dunqing
a3570d41f0
feat(semantic): report parameter related errors for setter/getter ( #2316 )
2024-02-05 17:38:43 +08:00
Dunqing
9ca13d040d
feat(semantic): report type parameter list cannot be empty ( #2315 )
2024-02-05 16:05:51 +08:00
Dunqing
d6d931cd80
fix(tasks/coverage): when providing filter, do not run just submodules ( #2310 )
2024-02-05 15:06:37 +08:00
Dunqing
f53c54ced9
feat(semantic): report unexpected type annotation in ArrayPattern ( #2309 )
2024-02-05 13:45:52 +08:00
overlookmotel
73ec4df61c
chore(benchmark): add radix-ui.jsx as a real world jsx example ( #2304 )
...
Following #2297 , this adds another benchmark.
This one is from radix-ui website. I've chosen this particular file
because it differs from the other benchmark sources in 3 ways:
1. JSX not TSX (despite the file extension).
2. Contains no logic, only JSX component hierarchy, and content text.
3. Very small (60 LOC).
The last is particularly important, I think. Often developers will be
working on small files (single component per file convention). And some
possible directions for the parser (SIMD etc) involve optimizing chewing
through chunks of text, with a de-opt at the end to process the final
batch of bytes. If that imposes a penalty on short files, this benchmark
will surface it.
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2024-02-05 13:42:45 +08:00
Boshen
018674c56c
chore(benchmark): add cal.com.tsx as a realword tsx example ( #2297 )
...
closes #1884
2024-02-04 22:40:55 +08:00
underfin
2f97b332bd
chore: codegen test skip v8 failed test ( #2283 )
...
Because v8 isn't pass some test262 tests, we also need to skip them, you
can find it at
https://chromium.googlesource.com/v8/v8/+/refs/heads/main/test/test262/test262.status .
2024-02-04 14:02:39 +08:00
Boshen
d2f7ea2923
chore: manually clone git modules instead of using submodules ( #2274 )
...
closes #2231
Submodules are a blocker for beginners, we should make it clone on
demand.
It is also a blocker for people who wants to target this repo as a crate
for testing purposes, cargo will do a full clone if you specify
oxc_parser = { git = "this repo" } in Cargo.toml
2024-02-02 11:56:18 +00:00
Boshen
28daf83b19
feat(semantic): report no class name error ( #2273 )
...
closes #2144
2024-02-02 19:05:00 +08:00
kaykdm
2ceba79dcd
feat(tasks): add eslint-plugin-n rulegen ( #2272 )
...
related: https://github.com/oxc-project/oxc/issues/493
Support generate rules from
[eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n ).
2024-02-02 18:50:58 +08:00
Boshen
d7feadedb4
chore(lint_rules): deprecated eslint no-dupe-args / no-octal / no-with
...
These are strict mode errors.
Closes #2257
2024-02-02 17:33:54 +08:00
Dunqing
8e221cb26e
fix(transformer): update snapshot ( #2268 )
2024-02-02 17:00:44 +08:00
Boshen
650f6c942f
refactor: use our forked version of miette::Reporter for tests ( #2266 )
2024-02-02 16:15:31 +08:00
Dunqing
da2ffdf7a0
feat(semantic): check parameters property ( #2264 )
2024-02-02 15:58:32 +08:00
Dunqing
d71175e712
feat(semantic): check optional parameters ( #2263 )
2024-02-02 15:54:04 +08:00
Boshen
8d99a15ac9
feat(semantic): report error on optional variable declaration in TypeScript ( #2261 )
...
closes #2253
closes #2255
2024-02-02 14:13:10 +08:00
hjio
a95a16c2ae
feat(linter): complete custom components setting ( #2234 )
...
- add custom components setting
- let tasks/rulegen generate settings
---------
Co-authored-by: huangjunjie.coder <huangjunjie.coder@bytedance.com>
2024-02-01 23:28:11 +08:00
Tzvi Melamed
73ccf8a4da
fix(oxc_semantic): proper traversal of try statements ( #2250 )
...
Closes #2227
2024-02-01 20:46:38 +08:00
Dunqing
02c18d8506
feat(transformer/decorators): support for static and private member decorators ( #2246 )
2024-02-01 15:19:14 +08:00
Dunqing
ba85b097e0
feat(transformer/decorators): support method decorator and is not static ( #2238 )
2024-02-01 11:36:22 +08:00
Dunqing
a79988d5e2
feat(transformer/decorators): support static member ( #2235 )
2024-01-31 19:11:27 +08:00
Dunqing
3b85e1813b
feat(transformer/decorators): ensure property key consistency ( #2233 )
2024-01-31 19:05:52 +08:00
Wenzhe Wang
5fb5d8a01e
chore(tasks): update codegen runtime snapshot ( #2223 )
2024-01-31 12:25:28 +08:00
renovate[bot]
d7a9bcf191
chore(deps): update rust crates ( #2199 )
2024-01-30 15:30:22 +08:00