From ed572a6443d8312b936595f6558c3da06c0c690e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2020 14:51:31 -0500 Subject: [PATCH] Bump prettier from 2.0.5 to 2.1.1 (#2235) * Bump prettier from 2.0.5 to 2.1.1 Bumps [prettier](https://github.com/prettier/prettier) from 2.0.5 to 2.1.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.0.5...2.1.1) Signed-off-by: dependabot[bot] * Prettier: preserve quotes in object props In the latest release of Prettier, number keys are "unquoted" by default. This is all fine and well, but Flow reacts poorly to number literals as keys. The most diplomatic solution seems to be setting "quoteProps" to "preserve": https://prettier.io/docs/en/options.html#quote-props However, this precipitated an interesting error in jest, where it was unhappy about the reaction and review state props being unquoted, both in the flow type notation and the object literal itself. I recommend reading the PR that implemented this change for more discussion: https://github.com/prettier/prettier/pull/8508 test plan: `yarn unit`, `yarn flow`, `yarn check-pretty` Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin Siegler <17910833+topocount@users.noreply.github.com> --- .prettierrc.json | 3 +- src/plugins/github/graphqlTypes.js | 52 +++++++++++++++--------------- yarn.lock | 6 ++-- 3 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index 67d60505b..0c9f3cc21 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,6 @@ { "trailingComma": "es5", "bracketSpacing": false, - "arrowParens": "always" + "arrowParens": "always", + "quoteProps": "preserve" } diff --git a/src/plugins/github/graphqlTypes.js b/src/plugins/github/graphqlTypes.js index 3bc73abeb..38ecd1dc9 100644 --- a/src/plugins/github/graphqlTypes.js +++ b/src/plugins/github/graphqlTypes.js @@ -120,17 +120,17 @@ export type PullRequestReviewState = | "PENDING"; export const PullRequestReviewState$Values: {| - +APPROVED: "APPROVED", - +CHANGES_REQUESTED: "CHANGES_REQUESTED", - +COMMENTED: "COMMENTED", - +DISMISSED: "DISMISSED", - +PENDING: "PENDING", + +"APPROVED": "APPROVED", + +"CHANGES_REQUESTED": "CHANGES_REQUESTED", + +"COMMENTED": "COMMENTED", + +"DISMISSED": "DISMISSED", + +"PENDING": "PENDING", |} = deepFreeze({ - APPROVED: "APPROVED", - CHANGES_REQUESTED: "CHANGES_REQUESTED", - COMMENTED: "COMMENTED", - DISMISSED: "DISMISSED", - PENDING: "PENDING", + "APPROVED": "APPROVED", + "CHANGES_REQUESTED": "CHANGES_REQUESTED", + "COMMENTED": "COMMENTED", + "DISMISSED": "DISMISSED", + "PENDING": "PENDING", }); export type Reaction = {| @@ -152,23 +152,23 @@ export type ReactionContent = | "THUMBS_UP"; export const ReactionContent$Values: {| - +CONFUSED: "CONFUSED", - +EYES: "EYES", - +HEART: "HEART", - +HOORAY: "HOORAY", - +LAUGH: "LAUGH", - +ROCKET: "ROCKET", - +THUMBS_DOWN: "THUMBS_DOWN", - +THUMBS_UP: "THUMBS_UP", + +"CONFUSED": "CONFUSED", + +"EYES": "EYES", + +"HEART": "HEART", + +"HOORAY": "HOORAY", + +"LAUGH": "LAUGH", + +"ROCKET": "ROCKET", + +"THUMBS_DOWN": "THUMBS_DOWN", + +"THUMBS_UP": "THUMBS_UP", |} = deepFreeze({ - CONFUSED: "CONFUSED", - EYES: "EYES", - HEART: "HEART", - HOORAY: "HOORAY", - LAUGH: "LAUGH", - ROCKET: "ROCKET", - THUMBS_DOWN: "THUMBS_DOWN", - THUMBS_UP: "THUMBS_UP", + "CONFUSED": "CONFUSED", + "EYES": "EYES", + "HEART": "HEART", + "HOORAY": "HOORAY", + "LAUGH": "LAUGH", + "ROCKET": "ROCKET", + "THUMBS_DOWN": "THUMBS_DOWN", + "THUMBS_UP": "THUMBS_UP", }); export type Ref = {| diff --git a/yarn.lock b/yarn.lock index 1c2fc8c3a..949f31aa6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8250,9 +8250,9 @@ prelude-ls@~1.1.2: integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prettier@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" - integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6" + integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw== pretty-format@^24.8.0: version "24.9.0"