<!-- Input -->- [x] short first line.
second paragraph at six spaces that wraps
onto another line here.
<!-- Prettier 3.9.6 -->- [x] short first line.
second paragraph at six spaces that wraps
onto another line here.
<!-- Prettier 3.9.7 -->- [x] short first line.
second paragraph at six spaces that wraps
onto another line here.
JavaScript: Fix embedded template literal idempotency (#19725 by @fisker)
Markdown: Preserve single tildes in Markdown (#19739 by @lazerg)
Since 3.9.0, single-tilde spans like H~2~O were rewritten to double tildes, turning subscript syntax into strike-through. Only double tildes are treated that way now, matching GitHub.
Markdown: Cap ordered list mark at 999,999,999 (#19351 by @tats-u)
CommonMark parsers only support ordered list item numbers up to 999,999,999.
With this change, Prettier now caps the ordered list item number at 999,999,999 to ensure that the output is correctly parsed as an ordered list by CommonMark parsers. Numbers larger than 999,999,999 are not parsed as list item numbers and are left unchanged in the output:
<!-- Input -->999999998. text
999999998. text
999999998. text
999999998. text
1234567890123456789012) text
<!-- Prettier 3.9.4 -->999999998. text
999999999. text
1000000000. text
1000000001. text
1234567890123456789012) text
<!-- Prettier 3.9.5 -->999999998. text
999999999. text
999999999. text
999999999. text
1234567890123456789012) text
Markdown: Avoid corrupting empty link with title (#19487 by @andersk)
Do not remove <> from an inline link or image with an empty URL and a title, as this removal would change its interpretation.
CSS: Prevent addition space in type() with + (#19516 by @bigandy)
This fixes the addition space before + in CSS type() declaration. For example type(<number>+) was being converted into type(<number> +) which is invalid CSS and does not work.
Miscellaneous: Preserving comments' placement property (#19567 by @Janther)
Prettier@3.9.0 deleted an undocumented property on comments, which was already used by plugins, comment.placement is now available again after comment attach.
Flow: Stop enforcing empty module declaration to break (#19568 by @fisker)
Markdown: Fix unexpected removal of characters in liquid syntax (#19489 by @seiyab)
// Input
<!-- Input -->
{{ page.title
}} text
<!-- Prettier 3.9.1 -->
{{ page.title
text
<!-- Prettier 3.9.3 -->
{{ page.title
}} text
TypeScript: Allow decorators to be used with declare on class fields (#19492 by @evoactivity)
Extensively used within the Ember ecosystem, decorators with declare on class fields will ignore the babel parser error and allow Prettier to format the code without breaking it.
// Input
exportdefaultclassProjectStatusComponentextendsComponent<ProjectStatusSig>{@​servicedeclareserver: ServerService;}// Prettier 3.9.1
// SyntaxError: Decorators can't be used with a declare field. (2:3)
// 1 | export default class ProjectStatusComponent extends Component<ProjectStatusSig> {
//> 2 | @​service declare server: ServerService;
// | ^
// 3 | }
// Prettier 3.9.3
exportdefaultclassProjectStatusComponentextendsComponent<ProjectStatusSig>{@​servicedeclareserver: ServerService;}
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
3.8.4→3.9.7Release Notes
prettier/prettier (prettier)
v3.9.7Compare Source
diff
Markdown: Prevent indentation drift in list-item code blocks (#19647, #19990 by @Austin1serb, @giaBaoJS)
JavaScript: Fix embedded template literal idempotency (#19725 by @fisker)
Markdown: Preserve Liquid blocks after Markdown tables (#19730 by @wanxiankai, @seiyab)
Markdown: Preserve single tildes in Markdown (#19739 by @lazerg)
Since 3.9.0, single-tilde spans like
H~2~Owere rewritten to double tildes, turning subscript syntax into strike-through. Only double tildes are treated that way now, matching GitHub.Markdown: Fix Markdown blockquote containing
>characters (#19802 by @seiyab)Markdown: Strip blockquote markers from a setext heading's continuation lines (#19878 by @Kjubikstronk)
A setext heading spanning multiple lines inside a blockquote kept the
>marker of its continuation lines as literal text.Markdown: Fix HTML block indentation drift in markdown list items (#19987 by @lazerg)
Angular: Support
@boundaryerror boundaries (#20014 by @Yahiro025)v3.9.6Compare Source
diff
TypeScript: Preserve quotes for methods named
new(#19621 by @kovsu)TypeScript: Support
import defer(#19624, #19675 by @fisker)JavaScript: Added a new official plugin
@prettier/plugin-yuku(#19628, #19629 by @fisker)@prettier/plugin-yukuis powered by Yuku (A high-performance JavaScript/TypeScript compiler toolchain written in Zig).This plugin includes two new parsers:
yuku(JavaScript syntax) andyuku-ts(TypeScript syntax).To use this plugin:
Install the plugin:
Add it to your
.prettierrc:Due to package size limitations, this plugin is not bundled with the main prettier package and must be installed separately.
For more information, check the package homepage.
Big thanks to @arshad-yaseen for his excellent work.
v3.9.5Compare Source
diff
Markdown: Cap ordered list mark at 999,999,999 (#19351 by @tats-u)
CommonMark parsers only support ordered list item numbers up to 999,999,999.
With this change, Prettier now caps the ordered list item number at 999,999,999 to ensure that the output is correctly parsed as an ordered list by CommonMark parsers. Numbers larger than 999,999,999 are not parsed as list item numbers and are left unchanged in the output:
Markdown: Avoid corrupting empty link with title (#19487 by @andersk)
Do not remove
<>from an inline link or image with an empty URL and a title, as this removal would change its interpretation.Less: Remove extra spaces after
[in map lookups (#19503 by @kovsu)CSS: Prevent addition space in
type()with+(#19516 by @bigandy)This fixes the addition space before
+in CSStype()declaration. For exampletype(<number>+)was being converted intotype(<number> +)which is invalid CSS and does not work.Less: Remove spaces between merge markers and colons (#19517 by @kovsu)
Markdown: Preserve wiki links with aliases (#19527 by @kovsu)
TypeScript: Fix comments being dropped on shorthand
typeimport/export specifiers (#19565 by @kirkwaiblinger)Miscellaneous: Preserving comments'
placementproperty (#19567 by @Janther)Prettier@3.9.0 deleted an undocumented property on comments, which was already used by plugins,
comment.placementis now available again after comment attach.Flow: Stop enforcing empty module declaration to break (#19568 by @fisker)
Angular: Support expression for exhaustive typechecking (#19571 by @fisker)
TypeScript: Ignore comments inside mapped type when checking type parameter comments (#19572 by @fisker)
Less: Fix adjacent block comments being corrupted (#19574 by @kovsu)
JavaScript: Handle dangling comments in
SwitchStatement(#19581 by @fisker)TypeScript: Remove space in comment-only object type (#19583 by @fisker)
v3.9.4Compare Source
diff
Angular: Format
@content(name)->@content (name)to align with other block syntax (#19499 by @fisker)v3.9.3Compare Source
diff
Markdown: Fix unexpected removal of characters in liquid syntax (#19489 by @seiyab)
TypeScript: Allow decorators to be used with declare on class fields (#19492 by @evoactivity)
Extensively used within the Ember ecosystem, decorators with
declareon class fields will ignore the babel parser error and allow Prettier to format the code without breaking it.v3.9.2Compare Source
v3.9.1Compare Source
diff
CLI: Fix ignored file has been cached incorrectly (#19483 by @kovsu)
Bug details #18016
v3.9.0Compare Source
diff
🔗 Release Notes
v3.8.5Compare Source
diff
Flow: Support
readonlyas a variance annotation (#19022 by @marcoww6)Flow now accepts
readonlyas a property variance annotation, equivalent to+(covariant/read-only).Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
9af25dddf0tob7f8a41a42Update dependency prettier to v3.9.1to Update dependency prettier to v3.9.4b7f8a41a42to89091cd975Update dependency prettier to v3.9.4to Update dependency prettier to v3.9.589091cd975toee905dd83eUpdate dependency prettier to v3.9.5to Update dependency prettier to v3.9.6ee905dd83eto6378de5c83Update dependency prettier to v3.9.6to Update dependency prettier to v3.9.7View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.