Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

chore(deps): update dependency prettier to v3.3.3#40

Closed
renovate wants to merge1 commit intomainfromrenovate/prettier-3.x-lockfile

Conversation

renovate[bot]
Copy link
Contributor

@renovaterenovatebot commentedAug 4, 2024

Mend Renovate

This PR contains the following updates:

PackageChangeAgeAdoptionPassingConfidence
prettier (source)3.0.3 ->3.3.3ageadoptionpassingconfidence

Release Notes

prettier/prettier (prettier)

v3.3.3

Compare Source

diff

Add parentheses for nullish coalescing in ternary (#​16391 by@​cdignam-segment)

This change adds clarity to operator precedence.

// Inputfoo ?bar??foo :baz;foo??bar ?a :b;a ?b :foo??bar;// Prettier 3.3.2foo ?bar??foo :baz;foo??bar ?a :b;a ?b :foo??bar;// Prettier 3.3.3foo ?(bar??foo) :baz;(foo??bar) ?a :b;a ?b :(foo??bar);
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.

// Input@​(foo`tagged template`)classX{}// Prettier 3.3.2@​foo`tagged template`classX{}// Prettier 3.3.3@​(foo`tagged template`)classX{}
Support@let declaration syntax (#​16474 by@​sosukesuzuki)

Adds support for Angular v18@let declaration syntax.

Please see the following code example. The@let declaration allows you to define local variables within the template:

@&#8203;let name = 'Frodo';<h1>Dashboard for {{name}}</h1>Hello, {{name}}

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.2

Compare Source

diff

Fix handlebars path expressions starts with@ (#​16358 by@​Princeyadav05)
{{! Input }}<div>{{@&#8203;x.y.z}}</div>{{! Prettier 3.3.1 }}<div>{{@&#8203;x}}</div>{{! Prettier 3.3.2 }}<div>{{@&#8203;x.y.z}}</div>

v3.3.1

Compare Source

diff

Preserve empty lines in front matter (#​16347 by@​fisker)
<!-- Input-->---foo:- bar1- bar2- bar3---Markdown<!-- Prettier 3.3.0-->---foo:- bar1- bar2- bar3---Markdown<!-- Prettier 3.3.1-->---foo:- bar1- bar2- bar3---Markdown
Preserve explicit language in front matter (#​16348 by@​fisker)
<!-- Input-->---yamltitle: Helloslug: home---<!-- Prettier 3.3.0-->---title: Helloslug: home---<!-- Prettier 3.3.1-->---yamltitle: Helloslug: home---
Avoid line breaks in import attributes (#​16349 by@​fisker)
// Inputimportsomethingfrom"./some-very-very-very-very-very-very-very-very-long-path.json"with{type:"json"};// Prettier 3.3.0importsomethingfrom"./some-very-very-very-very-very-very-very-very-long-path.json"with{type:"json"};// Prettier 3.3.1importsomethingfrom"./some-very-very-very-very-very-very-very-very-long-path.json"with{type:"json"};

v3.3.0

Compare Source

diff

🔗Release Notes

v3.2.5

Compare Source

diff

Support Angular inline styles as single template literal (#​15968 by@​sosukesuzuki)

Angular v17 supports single string inline styles.

// Input@&#8203;Component({template:`<div>...</div>`,styles:`h1 { color: blue; }`,})exportclassAppComponent{}// Prettier 3.2.4@&#8203;Component({template:`<div>...</div>`,styles:`h1 { color: blue; }`,})exportclassAppComponent{}// Prettier 3.2.5@&#8203;Component({template:`<div>...</div>`,styles:`    h1 {      color: blue;    }  `,})exportclassAppComponent{}
Unexpected embedded formatting for Angular template (#​15969 by@​JounQin)

Computed template should not be considered as Angular component template

// Inputconsttemplate="foobar";@&#8203;Component({[template]:`<h1>{{       hello }}</h1>`,})exportclassAppComponent{}// Prettier 3.2.4consttemplate="foobar";@&#8203;Component({[template]:`<h1>{{ hello }}</h1>`,})exportclassAppComponent{}// Prettier 3.2.5consttemplate="foobar";@&#8203;Component({[template]:`<h1>{{       hello }}</h1>`,})exportclassAppComponent{}
Use"json" parser fortsconfig.json by default (#​16012 by@​sosukesuzuki)

Inv2.3.0, we introduced"jsonc" parser which adds trialing commaby default.

When adding a new parser we also define how it will be used based on thelinguist-languages data.

tsconfig.json is a special file used byTypeScript, it uses.json file extension, but it actually uses theJSON with Comments syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing.json file 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.json files, add the following to your.pretterrc file

{"overrides": [    {"files": ["tsconfig.json","jsconfig.json"],"options": {"parser":"jsonc"      }    }  ]}

v3.2.4

Compare Source

diff

Fix incorrect parser inference (#​15947 by@​fisker)

Files like.eslintrc.json were incorrectly formatted as JSONC files.

// Inputprettier--file-info.eslintrc.json{"ignored":false,"inferredParser":"jsonc"}// Prettier 3.2.4prettier--file-info.eslintrc.json{"ignored":false,"inferredParser":"json"}

v3.2.3

Compare Source

diff

Throw errors for invalid code (#​15881 by@​fisker,@​Josh-Cena,@​auvred)
// Input1++;// Prettier 3.2.21++;// Prettier 3.2.3SyntaxError:Invalidleft-handsideexpressioninunaryoperation(1:1)>1|1++;|^
// Inputtry{}catch(error=1){}// Prettier 3.2.2try{}catch(error){}// Prettier 3.2.3SyntaxError:Catchclausevariablecannothaveaninitializer.(1:23)>1|try{}catch(error=1){}|^
Fix parser inference (#​15927 by@​fisker)
// Prettier 3.2.2prettier --file-info tsconfig.json{ "ignored": false, "inferredParser": "json" }// Prettier 3.2.3prettier --file-info tsconfig.json{ "ignored": false, "inferredParser": "jsonc" }

v3.2.2

Compare 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:

<style{...spread}>{`.{}`}</style>
Fix formatting error on optional call expression and member chain (#​15920 by@​sosukesuzuki)
// Inputa(()=>{},c?.d());// Prettier 3.2.1TypeError:Cannotreadpropertiesofundefined(reading'type')// Prettier 3.2.2a(()=>{},c?.d());

v3.2.1

Compare Source

diff

Fix formatting error on member chain (#​15915 by@​sosukesuzuki)
// Inputtest().test2().test2(thing?.something);// Prettier 3.2.0TypeError:Cannotreadpropertiesofundefined(reading'type')// Prettier 3.2.1test().test2().test2(thing?.something);

v3.2.0

Compare Source

diff

🔗Release Notes

v3.1.1

Compare 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.

├─ .prettierrc└─ test.js         (A directory)  └─ .prettierrc
// Prettier 3.1.0awaitprettier.resolveConfigFile(newURL("./test.js",import.meta.url));// <CWD>/test.js/.prettierrc// Prettier 3.1.1awaitprettier.resolveConfigFile(newURL("./test.js",import.meta.url));// <CWD>/.prettierrc
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-pattern to simply skip symbolic links.

Consistently use tabs in ternaries whenuseTabs istrue (#​15662 by@​auvred)
// Inputaaaaaaaaaaaaaaa?bbbbbbbbbbbbbbbbbb:ccccccccccccccc  ?ddddddddddddddd  :eeeeeeeeeeeeeee    ?fffffffffffffff    :gggggggggggggggg;// Prettier 3.1.0aaaaaaaaaaaaaaa?bbbbbbbbbbbbbbbbbb:ccccccccccccccc  ?ddddddddddddddd  :eeeeeeeeeeeeeee    ?fffffffffffffff    :gggggggggggggggg;// Prettier 3.1.1aaaaaaaaaaaaaaa?bbbbbbbbbbbbbbbbbb:ccccccccccccccc?ddddddddddddddd:eeeeeeeeeeeeeee?fffffffffffffff:gggggggggggggggg;
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)
// Inputconst{  foo,// bar// baz}:Foo=expr;// Prettier 3.1.0const{  foo1,}// bar// baz:Foo=expr;// Prettier 3.1.0 second outputconst{  foo1,// bar}// baz:Foo=expr;// Prettier 3.1.1const{  foo1,// bar// baz}:Foo=expr;
Support "Import Attributes" (#​15718 by@​fisker)

TypeScript 5.3 supports the latest updates to theimport attributes proposal.

importsomethingfrom"./something.json"with{type:"json"};
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--help text) continued to claim otherwise, falsely. The documentation is now fixed.

Keep curly braces andfrom keyword in emptyimport statements (#​15756 by@​fisker)
// Inputimport{}from'foo';import{/* comment */}from'bar';// Prettier 3.1.0import{}from"foo";import/* comment */"bar";// Prettier 3.1.1import{}from"foo";import{}from/* comment */"bar";
Keep empty import attributes and assertions (#​15757 by@​fisker)
// Inputimportfoofrom"foo"with{};importbarfrom"bar"assert{};// Prettier 3.1.0importfoofrom"foo";importbarfrom"bar";// Prettier 3.1.1importfoofrom"foo"with{};importbarfrom"bar"assert{};

v3.1.0

Compare Source

diff

🔗Release Notes


Configuration

📅Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦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.


  • If you want to rebase/retry this PR, check this box

This PR was generated byMend Renovate. View therepository job log.

@renovaterenovatebotforce-pushed therenovate/prettier-3.x-lockfile branch from847e6e8 to1251f40CompareAugust 7, 2024 00:48
@BoshenBoshen closed thisAug 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@Boshen

[8]ページ先頭

©2009-2025 Movatter.jp