chore(deps): update dependency prettier to v3 #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.2.1β^3.0.0Release Notes
prettier/prettier (prettier)
v3.8.0Compare Source
diff
π Release note
v3.7.4Compare Source
diff
LWC: Avoid quote around interpolations (#β18383 by @βkovsu)
TypeScript: Fix comment inside union type gets duplicated (#β18393 by @βfisker)
TypeScript: Fix unstable comment print in union type comments (#β18395 by @βfisker)
v3.7.3Compare Source
diff
API: Fix
prettier.getFileInfo()change that breaks VSCode extension (#β18375 by @βfisker)An internal refactor accidentally broke the VSCode extension plugin loading.
v3.7.2Compare Source
diff
JavaScript: Fix string print when switching quotes (#β18351 by @βfisker)
JavaScript: Preserve quote for embedded HTML attribute values (#β18352 by @βkovsu)
TypeScript: Fix comment in empty type literal (#β18364 by @βfisker)
v3.7.1Compare Source
diff
API: Fix performance regression in doc printer (#β18342 by @βfisker)
Prettier 3.7.1 can be very slow when formatting big files, the regression has been fixed.
v3.7.0Compare Source
diff
π Release Notes
v3.6.2Compare Source
diff
Markdown: Add missing blank line around code block (#β17675 by @βfisker)
v3.6.1Compare Source
diff
TypeScript: Allow const without initializer (#β17650, #β17654 by @βfisker)
Miscellaneous: Avoid closing files multiple times (#β17665 by @β43081j)
When reading a file to infer the interpreter from a shebang, we use the
n-readlineslibrary to read the first line in order to get the shebang.This library closes files when it reaches EOF, and we later try close the same
files again. We now close files only if
n-readlinesdid not already closethem.
v3.6.0Compare Source
diff
π Release Notes
v3.5.3Compare Source
diff
Flow: Fix missing parentheses in
ConditionalTypeAnnotation(#β17196 by @βfisker)v3.5.2Compare Source
diff
Remove
module-synccondition (#β17156 by @βfisker)In Prettier 3.5.0, we added
module-synccondition topackage.json, so thatrequire("prettier")can use ESM version, but turns out it doesn't work if CommonJS and ESM plugins both imports builtin plugins. To solve this problem, we decide simply remove themodule-synccondition, sorequire("prettier")will still use the CommonJS version, we'll revisit untilrequire(ESM)feature is more stable.v3.5.1Compare Source
diff
Fix CLI crash when cache for old version exists (#β17100 by @βsosukesuzuki)
Prettier 3.5 uses a different cache format than previous versions, Prettier 3.5.0 crashes when reading existing cache file, Prettier 3.5.1 fixed the problem.
Support dockercompose and github-actions-workflow in VSCode (#β17101 by @βremcohaszing)
Prettier now supports the
dockercomposeandgithub-actions-workflowlanguages in Visual Studio Code.v3.5.0Compare Source
diff
π Release Notes
v3.4.2Compare Source
diff
Treat U+30A0 & U+30FB in Katakana Block as CJK (#β16796 by @βtats-u)
Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or βandβ. The following βCθ¨θͺγ»C++γ»Goγ»Rustβ means βC language & C++ & Go & Rustβ in Japanese.
U+30A0 can be used as the replacement of the
-in non-Japanese names (e.g. βSaint-SaΓ«nsβ (Charles Camille Saint-SaΓ«ns) can be represented as βγ΅γ³γ γ΅γΌγ³γΉβ in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. βγ΅γ³=γ΅γΌγ³γΉβ or βγ΅γ³οΌγ΅γΌγ³γΉβ).Fix comments print on class methods with decorators (#β16891 by @βfisker)
Fix non-idempotent formatting (#β16899 by @βseiyab)
This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.
v3.4.1Compare Source
diff
Remove unnecessary parentheses around assignment in
v-on(#β16887 by @βfisker)v3.4.0Compare Source
diff
π Release Notes
v3.3.3Compare Source
diff
Add parentheses for nullish coalescing in ternary (#β16391 by @βcdignam-segment)
This change adds clarity to operator precedence.
Add parentheses for decorator expressions (#β16458 by @βy-schneider)
Prevent parentheses around member expressions or tagged template literals from being removed to follow the stricter parsing rules of TypeScript 5.5.
Support
@letdeclaration syntax (#β16474 by @βsosukesuzuki)Adds support for Angular v18
@letdeclaration syntax.Please see the following code example. The
@letdeclaration allows you to define local variables within the template:For more details, please refer to the excellent blog post by the Angular Team: Introducing @βlet in Angular.
We also appreciate the Angular Team for kindly answering our questions to implement this feature.
v3.3.2Compare Source
diff
Fix handlebars path expressions starts with
@(#β16358 by @βPrinceyadav05)v3.3.1Compare Source
diff
Preserve empty lines in front matter (#β16347 by @βfisker)
Preserve explicit language in front matter (#β16348 by @βfisker)
Avoid line breaks in import attributes (#β16349 by @βfisker)
v3.3.0Compare Source
diff
π Release Notes
v3.2.5Compare Source
diff
Support Angular inline styles as single template literal (#β15968 by @βsosukesuzuki)
Angular v17 supports single string inline styles.
Unexpected embedded formatting for Angular template (#β15969 by @βJounQin)
Computed template should not be considered as Angular component template
Use
"json"parser fortsconfig.jsonby default (#β16012 by @βsosukesuzuki)In v3.2.0, we introduced
"jsonc"parser which adds trailing comma by default.When adding a new parser we also define how it will be used based on the
linguist-languagesdata.tsconfig.jsonis a special file used by TypeScript, it uses.jsonfile extension, but it actually uses the JSON with Comments syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing.jsonfile extension.We decide to treat it as a JSON file for now to avoid the extra configuration step.
To keep using the
"jsonc"parser for yourtsconfig.jsonfiles, add the following to your.prettierrcfile{ "overrides": [ { "files": ["tsconfig.json", "jsconfig.json"], "options": { "parser": "jsonc" } } ] }v3.2.4Compare Source
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "jsonc" }
v3.2.3Compare Source
diff
Throw errors for invalid code (#β15881 by @βfisker, @βJosh-Cena, @βauvred)
Fix parser inference (#β15927 by @βfisker)
v3.2.2Compare Source
diff
Fix crash when parsing template literal CSS in a JSX style tag using a spread attribute (#β15896 by @βeelco)
For example this code would crash before:
Fix formatting error on optional call expression and member chain (#β15920 by @βsosukesuzuki)
v3.2.1Compare Source
diff
Fix formatting error on member chain (#β15915 by @βsosukesuzuki)
v3.2.0Compare Source
diff
π Release Notes
v3.1.1Compare Source
diff
Fix config file search (#β15363 by @βfisker)
Previously, we start search for config files from the filePath as a directory, if it happened to be a directory and contains config file, it will be used by mistake.
Skip explicitly passed symbolic links with
--no-error-on-unmatched-pattern(#β15533 by @βsanmai-NL)Since Prettier v3, we stopped following symbolic links, however in some use cases, the symbolic link patterns can't be filtered out, and there is no way to prevent Prettier from throwing errors.
In Prettier 3.1.1, you can use
--no-error-on-unmatched-patternto simply skip symbolic links.Consistently use tabs in ternaries when
useTabsistrue(#β15662 by @βauvred)Improve config file search (#β15663 by @βfisker)
The Prettier config file search performance has been improved by more effective cache strategy.
Fix unstable and ugly formatting for comments in destructuring patterns (#β15708 by @βsosukesuzuki)
Support "Import Attributes" (#β15718 by @βfisker)
TypeScript 5.3 supports the latest updates to the import attributes proposal.
Fix false claim in docs that cursorOffset is incompatible with rangeStart/rangeEnd (#β15750 by @βExplodingCabbage)
The cursorOffset option has in fact been compatible with rangeStart/rangeEnd for over 5 years, thanks to work by @βds300. However, Prettier's documentation (including the CLI
--helptext) continued to claim otherwise, falsely. The documentation is now fixed.Keep curly braces and
fromkeyword in emptyimportstatements (#β15756 by @βfisker)Keep empty import attributes and assertions (#β15757 by @βfisker)
v3.1.0Compare Source
diff
π Release Notes
v3.0.3Compare Source
diff
Add
preferUnplugged: truetopackage.json(#β15169 by @βfisker and @βso1ve)Prettier v3 uses dynamic imports, user will need to unplug Prettier when Yarn's PnP mode is enabled, add
preferUnplugged: truetopackage.json, so Yarn will install Prettier as unplug by default.Support shared config that forbids
require()(#β15233 by @βfisker)If an external shared config package is used, and the package
exportsdon't haverequireordefaultexport.In Prettier 3.0.2 Prettier fails when attempt to
require()the package, and throws an error.Allow argument of
require()to break (#β15256 by @βfisker)Do not print trailing commas in arrow function type parameter lists in
tscode blocks (#β15286 by @βsosukesuzuki)Support TypeScript 5.2
using/await usingdeclaration (#β15321 by @βsosukesuzuki)Support for the upcoming Explicit Resource Management feature in ECMAScript.
using/await usingdeclarationv3.0.2Compare Source
diff
Break after
=of assignment if RHS is poorly breakable AwaitExpression or YieldExpression (#β15204 by @βseiyab)Do not add trailing comma for grouped scss comments (#β15217 by @βauvred)
Print
declareandexportkeywords for nested namespace (#β15249 by @βsosukesuzuki)v3.0.1Compare Source
diff
Fix cursor positioning for a special case (#β14812 by @βfisker)
Fix plugins/estree.d.ts to make it a module (#β15018 by @βkingyue737)
Add
export {}inplugins/estree.d.tsto fix the "File is not a module" errorAdd parenthesis around leading multiline comment in return statement (#β15037 by @βauvred)
Add support for Vue "Generic Components" (#β15066 by @βauvred)
https://blog.vuejs.org/posts/vue-3-3#generic-components
Fix comments print in
IfStatement(#β15076 by @βfisker)Add missing type definition for
printer.preprocess(#β15123 by @βso1ve)export interface Printer<T = any> { // ... + preprocess?: + | ((ast: T, options: ParserOptions<T>) => T | Promise<T>) + | undefined; }Add missing
getVisitorKeysmethod type definition forPrinter(#β15125 by @βauvred)Add typing to support
readonlyarray properties of AST Node (#β15127 by @βauvred)Add space before unary minus followed by a function call (#β15129 by @βpamelalozano)
v3.0.0Compare Source
diff
π Release Notes
Configuration
π Schedule: Branch creation - "every weekday,every weekend" (UTC), Automerge - "after 10pm every weekday,before 7am every weekday,every weekend" (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 was generated by Mend Renovate. View the repository job log.