Boshen
cb8f4210c3
refactor(prettier)!: remove source_text argument from constructor ( #6448 )
2024-10-11 06:27:33 +00:00
Boshen
520096030a
refactor(oxc)!: remove passing Trivias around ( #6446 )
...
part of #6426
2024-10-11 06:09:25 +00:00
Cam McHenry
65d8f9e8fe
perf(linter, ast-tools, coverage): Use FxHashSet instead of std::collections::HashSet ( #6001 )
2024-09-24 19:29:08 +08:00
overlookmotel
8ade793dfe
test(prettier): move prettier conformance snapshots into separate directory ( #5921 )
2024-09-20 11:34:13 +00:00
dalaoshu
d18c896a2c
perf(rust): use cow_utils instead ( #5664 )
...
Related to #5586 and #5662
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2024-09-11 18:39:30 +08:00
Boshen
c3cfbfb480
chore: clippy::allow_attributes ( #5521 )
...
https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#expectlint
https://rust-lang.github.io/rust-clippy/master/index.html#/allow_attributes
2024-09-06 03:07:02 +00:00
leaysgur
c7e61a1391
chore(prettier): Update conformance tests to Prettier v3.3.3 ( #5394 )
...
- v3.3.3 is latest released version
- Test file name was changed from v3.3.x
- https://github.com/prettier/prettier/pull/16244
2024-09-02 10:32:17 +00:00
Boshen
b2ff2df5af
refactor(parser)!: remove builder pattern from Parser struct ( #5000 )
...
part of #4455
use `with_options(ParseOptions { ..ParseOptions::default() })` API instead.
2024-08-20 07:40:25 +00:00
Boshen
051ceb6539
chore: improve some format by running cargo +nightly fmt
2024-06-19 00:48:30 +08:00
Boshen
982e6f08df
chore: make println and eprintln opt-in ( #3712 )
...
I noticed accidental `println` can be merged, which isn't really nice.
2024-06-17 10:40:34 +00:00
Boshen
f6752b482f
feat!(ast): make Trivias clonable by adding Arc ( #3638 )
...
This makes `Trivias` cloneable and stops us from using `Rc::new` and
`Rc::clone` everywhere.
`Trivias` is rarely cloned so an `Arc` should suffice.
2024-06-12 13:16:10 +08:00
Boshen
0f86333437
refactor(ast): refactor Trivias API - have less noise around it ( #2692 )
2024-03-12 20:16:36 +08:00
Boshen
be6b8b7ce6
[BREAKING CHANGE] Change Atom to Atom<'a> to make it safe ( #2497 )
...
Part of #2295
This PR splits the `Atom` type into `Atom<'a>` and `CompactString`.
All the AST node strings now use `Atom<'a>` instead of `Atom` to signify
it belongs to the arena.
It is now up to the user to select which form of the string to use.
This PR essentially removes the really unsafe code
93742f89e9/crates/oxc_span/src/atom.rs (L98-L107)
which can lead to

2024-02-26 19:34:40 +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
15a8857927
refactor(prettier): improve print_statement_sequence ( #2383 )
2024-02-11 00:16:26 +08:00
Dunqing
3268d7d66e
feat(tasks/prettier): add some information for debug no spec calls ( #2333 )
2024-02-07 16:55:59 +08:00
Dunqing
0c19991471
feat(prettier): print CallExpression arguments correctly ( #1631 )
2023-12-10 15:59:13 +08:00
Wenzhe Wang
cfe207fb53
feat(tasks): ignore some invalid cases and support read parser from source text ( #1616 )
2023-12-03 21:17:47 +08:00
Wenzhe Wang
9af24842a8
fix(tasks): escape more special characters ( #1615 )
...
We also need escape `$` and `\`:
9527e65a38/packages/snapshot/src/port/inlineSnapshot.ts (L78-L94)
2023-12-03 16:56:18 +08:00
Wenzhe Wang
2f90ca1b54
fix(tasks): find the right output to diff ( #1596 )
2023-12-03 15:29:13 +08:00
Wenzhe Wang
9f38072002
feat(tasks): add visualize_end_of_line ( #1593 )
2023-11-30 23:42:57 +08:00
Boshen
e6681a8683
feat(prettier_conformance): ignore more stage3 features ( #1584 )
2023-11-29 19:51:41 +08:00
Boshen
e6f85a9a62
chore(prettier_conformance): remove stage3 export-default-from ( #1580 )
2023-11-29 19:03:26 +08:00
Dunqing
63b9d2cf81
feat(prettier/conformance): print options ( #1579 )
2023-11-29 18:37:38 +08:00
Boshen
f7cb7838e5
chore(prettier_conformance): ignore range / cursor tests; ignore module-blocks
2023-11-28 23:30:32 +08:00
Boshen
6ea1bf2f18
Revert "chore(prettier_conformance): temporary disable code coverage"
...
This reverts commit e1266c69f9 .
2023-11-28 17:34:59 +08:00
Boshen
32b19561a8
chore(prettier_conformance): ignore bind-expressions ( #1535 )
2023-11-24 20:26:27 +08:00
Dunqing
aa8656df0f
feat(task/prettier-confromance): escape template literal ( #1493 )
2023-11-22 15:30:59 +08:00
Dunqing
f06f0f2078
feat(task/prettier-confromance): ignore tests with non-standard syntax ( #1492 )
2023-11-22 11:01:26 +08:00
Boshen
064353c97e
feat(prettier): turn off preserve_parens and start working on need-parens ( #1487 )
2023-11-21 16:26:56 +00:00
Dunqing
51a78e2223
feat(prettier): support print inner comment in CallExpression ( #1475 )
2023-11-21 12:28:46 +08:00
Boshen
27dc1ed1b2
chore(prettier_conformance): ignore more non-es6 syntax ( #1437 )
2023-11-19 23:15:24 +08:00
Boshen
95f1b3beba
chore(prettier_conformance): ignore stage3 and multiparser tests ( #1432 )
2023-11-19 18:47:39 +08:00
Wenzhe Wang
3c567d6549
task(prettier): add diff view ( #1428 )
2023-11-19 17:13:25 +08:00
Boshen
24c2580435
chore(prettier_conformance): remove stage 3 features
2023-11-18 16:13:12 +08:00
Dunqing
badf6f51cf
feat(task/prettier-conformance): splitting test cases by file ( #1373 )
2023-11-17 20:14:00 +08:00
Dunqing
a099d06866
fix(tasks/prettier-conformance): incorrect snapshot ( #1352 )
...
fix(tasks/prettier-conformance): incorrect snapshot
fix: lint
2023-11-16 20:43:32 +08:00
Dunqing
638bd1ce23
feat(tasks/prettier-conformance): allow specifying filter as specific files ( #1343 )
...
This is useful in directories with a large number of files, so that we only need to focus on the file we are debugging.
2023-11-16 15:56:47 +08:00
Dunqing
ba0e4d1a6a
feat(tasks/prettier-conformance): parse the specs and pass the correct options to prettier ( #1327 )
...
### This PR did the following things.
1. Parse specs
2. Collect `run_spec's` arguments
3. Pass the correct `PrettierOptions` to the `Prettier`
4. Printing snapshots correctly
2023-11-15 13:30:44 +08:00
Boshen
5f316626f6
feat(prettier): add the basics of comment printing ( #1313 )
2023-11-14 12:32:03 +00:00
Boshen
e1266c69f9
chore(prettier_conformance): temporary disable code coverage
2023-11-14 15:13:25 +08:00
Dunqing
f13e9aa69d
feat(task/prettier-conformance): incorrect compatibility percentage ( #1292 )
2023-11-14 12:22:27 +08:00
Cameron
561c73d88c
feat(printer) Basic Printer options ( #1278 )
2023-11-14 09:37:18 +08:00
Boshen
5c1637b786
feat(prettier): add some basic formatting functions ( #1266 )
2023-11-13 13:27:53 +00:00
Boshen
4a6f54cc1a
feat(prettier_conformance): add prettier test runner ( #1262 )
2023-11-13 20:14:35 +08:00