lukeed/tidyPublic

fix: print JS sequences and import attributes

oxc has one node for a, b, c where bun's printer expects nested
commas, so a sequence printed as nothing. The printer now treats
ExprKind::Sequence as bun treated a comma chain. oxc's WithClause
starts at its brace, so import attributes lost their with or assert
keyword; the keyword now comes from the text after the specifier.
The oracle goes from 8,952 to 9,043 files printed as Prettier prints
them, and from 150 to 55 that change when formatted again.
LELuke Edwards authored
ec31872Patch
Parent5f883ca
11 files changed+61-77
StackedSplit
crates/tidy/src/js/ast/decl.rs+4 โˆ’3
crates/tidy/src/js/ast/stmt.rs+5 โˆ’5
crates/tidy/src/js/ast/ty.rs+5 โˆ’6
crates/tidy/src/js/attach/rules.rs+7 โˆ’9
crates/tidy/src/js/attach/rules/oxfmt.rs+3 โˆ’8
crates/tidy/src/js/format.rs+7 โˆ’4
crates/tidy/src/js/parentheses/expression.rs+20 โˆ’20
crates/tidy/src/js/print/arrow_function_expression.rs+2 โˆ’8
crates/tidy/src/js/print/return_or_throw_statement.rs+5 โˆ’10
crates/tidy/src/js/utils/assignment_like.rs+2 โˆ’1
crates/tidy/src/js/utils/expression.rs+1 โˆ’3