From 8588462f4bcbbaea137925d1dbf584ce440affb0 Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Tue, 20 Apr 2021 23:48:06 +0300 Subject: [PATCH] Edit changelog entries (@j-f1's suggestions) --- changelog_unreleased/cli/10058.md | 2 +- changelog_unreleased/graphql/10689.md | 4 +-- changelog_unreleased/javascript/10528.md | 2 +- changelog_unreleased/typescript/10341.md | 33 +++++++++--------------- 4 files changed, 16 insertions(+), 25 deletions(-) diff --git a/changelog_unreleased/cli/10058.md b/changelog_unreleased/cli/10058.md index 0f3d70c82..05dd3b6a1 100644 --- a/changelog_unreleased/cli/10058.md +++ b/changelog_unreleased/cli/10058.md @@ -1,6 +1,6 @@ #### Add CLI option to prevent errors on unmatched pattern (#10058 by @daronmcintosh) -The following command will not throw an error when it doesn't find a YAML file. +The Prettier CLI will no longer display an error when no files match the glob pattern passed as input. ```sh # Prettier stable diff --git a/changelog_unreleased/graphql/10689.md b/changelog_unreleased/graphql/10689.md index 491011d69..3e0d7f7e9 100644 --- a/changelog_unreleased/graphql/10689.md +++ b/changelog_unreleased/graphql/10689.md @@ -8,12 +8,12 @@ query ($unnamed: String) { } # Prettier stable -query ($unnamed: String) { +query($unnamed: String) { id } # Prettier main -query($unnamed: String) { +query ($unnamed: String) { id } ``` diff --git a/changelog_unreleased/javascript/10528.md b/changelog_unreleased/javascript/10528.md index d48170555..07cbccec3 100644 --- a/changelog_unreleased/javascript/10528.md +++ b/changelog_unreleased/javascript/10528.md @@ -1,6 +1,6 @@ #### Improve detection of AMD `define` (#10528 by @thorn0) -Prettier special-cases AMD `define` calls to avoid unexpected line breaks in them. `define` calls that weren't expression statements and had nothing to do with AMD were formatted this way too. This happens no longer. +Prettier special-cases AMD `define` calls to avoid unexpected line breaks in them. We now only format `define` calls if they are at the top level of a function or program and are passed arguments in the way AMD expects. ```jsx diff --git a/changelog_unreleased/typescript/10341.md b/changelog_unreleased/typescript/10341.md index 91028c186..77c838c55 100644 --- a/changelog_unreleased/typescript/10341.md +++ b/changelog_unreleased/typescript/10341.md @@ -3,29 +3,20 @@ ```ts // Input -const getAccountCount = async () => - (await - ((await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) as TreeItem - ).getChildren() - ).length +const accountCount = (findItemInSection(BOOKMARKED_PROJECTS_SECTION_NAME, + "My bookmarks") as TreeItem).getChildren().length; // Prettier stable -const getAccountCount = async () => - ( - await ((await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) as TreeItem).getChildren() - ).length; +const accountCount = (findItemInSection( + BOOKMARKED_PROJECTS_SECTION_NAME, + "My bookmarks" +) as TreeItem).getChildren().length; // Prettier main -const getAccountCount = async () => - ( - await ( - (await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) as TreeItem - ).getChildren() - ).length; +const accountCount = ( + findItemInSection( + BOOKMARKED_PROJECTS_SECTION_NAME, + "My bookmarks" + ) as TreeItem +).getChildren().length; ```