From 56cfb908fc4596c74d5f7b68aeacfd8cd898b829 Mon Sep 17 00:00:00 2001
From: Luke D
Date: Fri, 9 Apr 2021 12:33:58 -0700
Subject: [PATCH] Add container component for feature: questions list.
---
api/app/graphql/mutations/create_question.rb | 2 +-
api/config/credentials.yml.enc | 2 +-
api/db/seeds.rb | 12 ++-
realworld.code-workspace | 5 +-
web/package.json | 1 +
.../containers/create-question-form/index.js | 80 +++++++++++++++++++
.../questions-connection-list/index.js | 23 ++++++
web/src/pages/_document.js | 43 ++++++++++
web/src/pages/questions.js | 28 +++++++
web/yarn.lock | 80 +++++++++++++++++--
10 files changed, 258 insertions(+), 18 deletions(-)
create mode 100644 web/src/containers/create-question-form/index.js
create mode 100644 web/src/containers/questions-connection-list/index.js
create mode 100644 web/src/pages/_document.js
create mode 100644 web/src/pages/questions.js
diff --git a/api/app/graphql/mutations/create_question.rb b/api/app/graphql/mutations/create_question.rb
index 91965b96..2d13b306 100644
--- a/api/app/graphql/mutations/create_question.rb
+++ b/api/app/graphql/mutations/create_question.rb
@@ -4,7 +4,7 @@ module Mutations
class CreateQuestion < Mutations::BaseMutation
class CreateQuestionInput < Types::BaseInputObject
argument :body, String, required: true
- argument :tag_ids, [ID], required: true
+ argument :tag_ids, [ID], required: false
def prepare
to_h
diff --git a/api/config/credentials.yml.enc b/api/config/credentials.yml.enc
index cbd20ba5..0dca3114 100644
--- a/api/config/credentials.yml.enc
+++ b/api/config/credentials.yml.enc
@@ -1 +1 @@
-TWWkF7e+LzqcrrttF7VdMWVoYMJfoe6hOYoi3Cr29Wto4gtgAmcYIUNFOkd4ERbnezlHCGfTzHOgGzmAKpuMAhYpmYUQmr6VwVjwElOlMQfkviR68ZnCvB8Qn627piM2elNF0Zh77XegD10G75WINfgV6J2QBkAGAC2n4j1z5oW+YiKvzY7X8YAYPTOvy6UsfeWgbfeZppSSTWZ96Bm3TenUsWrHWTmPSQy9Acc2ESkWn1jwVUtMow1pflMV8reXPQ9E7Ka9wR/Fb89/lEJnaU7NzpCok+QqD0kKzUyQet67ure9Qf0TUJWdcFdGyK+c/r6Wvubujnj+lZTDjoI/FCIoU6bfSiLwO/zwMiMK/TfrTWupxlrtVgbb+/V5KpZHJRECJsrO6TH0WIIXJUh+CgMbeG2NHzZSMNub--3xEx9GVjYV1rq1bS--Jsp02/gJHo5LhqmkQj1jrQ==
\ No newline at end of file
+wGpXtNQvWFLteuK79pX1cB5+UIyrZAaXjtFgNwM6qin8lCF1hGZncTKjW4z3nZJveekR8GwHzXIJloGXb3le02jiLSMdTZcw2fqx/Fc7O7HDcERbqOtiCg8sYF8fBW9MDmhsUL5VYTN7SRNIxGzAYpQS3YkUfOR5xMbEIFrhG8uHN/4+B8tmpcbXqmLqCPcCwdLjXM5RrYbYR41i7AA6mu2XP9A5vVv9sROtxK8+D+jO+zWqn1FVm8HsiW0UIJObgKN39iD9fR70CW7hO2ga26rIkgDCxRDrQASx2pljV/PHM9SyxDxirV9FwBGKDILjx3i7xatnDsLtOHbLV6j4KACLTH4Q8WQvWpLOjRYdRJQoAvwhqQBJ1cz7vg4WGpGrDjgvHHkn76ZdDZ/QIAj4x6Ct7JYaF04Khaj+--i5NqeGsOAvoOkm3g--GG70z+7MR5KXPqM8aQ1kFg==
\ No newline at end of file
diff --git a/api/db/seeds.rb b/api/db/seeds.rb
index 9a95b10e..50e892b9 100644
--- a/api/db/seeds.rb
+++ b/api/db/seeds.rb
@@ -32,16 +32,14 @@
user.build_profile
user.save!
20.times do
- user.articles.build(
+ user.questions.build(
body: Faker::Lorem.paragraph(sentence_count: 10),
- description: Faker::Lorem.sentence,
- title: Faker::Lorem.sentence
- ) do |article|
- article.save!
- article.tags << Tag.offset(rand(Tag.count)).first
+ ) do |question|
+ question.save!
+ question.tags << Tag.offset(rand(Tag.count)).first
5.times do
User.offset(rand(User.count)).first.comments.create(
- article: article,
+ question: question,
body: Faker::Lorem.sentence
)
end
diff --git a/realworld.code-workspace b/realworld.code-workspace
index 6bc1d322..5578dd66 100644
--- a/realworld.code-workspace
+++ b/realworld.code-workspace
@@ -7,5 +7,8 @@
"path": "./web"
}
],
- "settings": {}
+ "settings": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ }
}
diff --git a/web/package.json b/web/package.json
index 9ad9048d..6fc5a935 100644
--- a/web/package.json
+++ b/web/package.json
@@ -20,6 +20,7 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"react-markdown": "5.0.3",
+ "styled-components": "5.1.1",
"yup": "0.32.9"
},
"scripts": {
diff --git a/web/src/containers/create-question-form/index.js b/web/src/containers/create-question-form/index.js
new file mode 100644
index 00000000..1dc54e6e
--- /dev/null
+++ b/web/src/containers/create-question-form/index.js
@@ -0,0 +1,80 @@
+import React from 'react';
+import { useMutation, gql } from '@apollo/client';
+
+function formReducer(state, partial) {
+ return { ...state, ...partial };
+}
+
+const DEFAULT_FORM = { body: '', tagIds: [] };
+
+export function CreateQuestionForm() {
+ const [form, setForm] = React.useReducer(formReducer, DEFAULT_FORM);
+ const [createQuestion] = useMutation(
+ CreateQuestionFormCreateQuestionMutation,
+ {
+ update(cache, response) {
+ cache.modify({
+ fields: {
+ questionsConnection(questionsConnection) {
+ const newQuestionRef = cache.writeFragment({
+ data: response.data.createQuestion.question,
+ fragment: gql`
+ fragment CreateQuestionFormNewQuestion on Question {
+ id
+ body
+ }
+ `,
+ });
+
+ return {
+ ...questionsConnection,
+ edges: [newQuestionRef, ...questionsConnection.edges],
+ };
+ },
+ },
+ });
+ },
+ }
+ );
+
+ const handleChange = event => {
+ event.preventDefault();
+ event.stopPropagation();
+
+ const { name, value } = event.currentTarget;
+
+ setForm({ [name]: value });
+ };
+
+ const handleSubmit = event => {
+ event.preventDefault();
+ createQuestion({ variables: { input: form } }).then(() =>
+ setForm(DEFAULT_FORM)
+ );
+ };
+
+ return (
+
+ );
+}
+
+const CreateQuestionFormCreateQuestionMutation = gql`
+ mutation CreateQuestionFormCreateQuestionMutation(
+ $input: CreateQuestionInput!
+ ) {
+ createQuestion(input: $input) {
+ question {
+ id
+ body
+ }
+ }
+ }
+`;
diff --git a/web/src/containers/questions-connection-list/index.js b/web/src/containers/questions-connection-list/index.js
new file mode 100644
index 00000000..0f55eb53
--- /dev/null
+++ b/web/src/containers/questions-connection-list/index.js
@@ -0,0 +1,23 @@
+import { gql } from '@apollo/client';
+
+export function QuestionsConnectionList({ questionsConnection }) {
+ if (!questionsConnection || questionsConnection.edges.length === 0)
+ return null;
+
+ return (
+
+ {questionsConnection.edges.map(edge => (
+ - {edge.node.body}
+ ))}
+
+ );
+}
+
+QuestionsConnectionList.fragments = {
+ question: gql`
+ fragment QuestionsConnectionListQuestion on Question {
+ id
+ body
+ }
+ `,
+};
diff --git a/web/src/pages/_document.js b/web/src/pages/_document.js
new file mode 100644
index 00000000..f152b462
--- /dev/null
+++ b/web/src/pages/_document.js
@@ -0,0 +1,43 @@
+import * as React from 'react';
+import Document, { Html, Head, Main, NextScript } from 'next/document';
+import { ServerStyleSheet } from 'styled-components';
+
+class NextDocument extends Document {
+ static async getInitialProps(ctx) {
+ const sheet = new ServerStyleSheet();
+ const originalRenderPage = ctx.renderPage;
+
+ try {
+ ctx.renderPage = () =>
+ originalRenderPage({
+ enhanceApp: App => props => sheet.collectStyles(),
+ });
+
+ const initialProps = await Document.getInitialProps(ctx);
+ return {
+ ...initialProps,
+ styles: (
+ <>
+ {initialProps.styles}
+ {sheet.getStyleElement()}
+ >
+ ),
+ };
+ } finally {
+ sheet.seal();
+ }
+ }
+ render() {
+ return (
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default NextDocument;
diff --git a/web/src/pages/questions.js b/web/src/pages/questions.js
new file mode 100644
index 00000000..88aa429b
--- /dev/null
+++ b/web/src/pages/questions.js
@@ -0,0 +1,28 @@
+import * as React from 'react';
+import { useQuery, gql } from '@apollo/client';
+import { CreateQuestionForm } from '../containers/create-question-form';
+import { QuestionsConnectionList } from '../containers/questions-connection-list';
+
+const QuestionsPageQuery = gql`
+ query QuestionsPageQuery {
+ questionsConnection {
+ edges {
+ node {
+ ...QuestionsConnectionListQuestion
+ }
+ }
+ }
+ }
+ ${QuestionsConnectionList.fragments.question}
+`;
+
+export default function QuestionsPage() {
+ const query = useQuery(QuestionsPageQuery, { variables: { first: 10 } });
+
+ return (
+ <>
+
+
+ >
+ );
+}
diff --git a/web/yarn.lock b/web/yarn.lock
index baba34a3..a0d229e0 100644
--- a/web/yarn.lock
+++ b/web/yarn.lock
@@ -144,7 +144,7 @@
jsesc "^2.5.1"
source-map "^0.5.0"
-"@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.13":
+"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab"
integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==
@@ -403,6 +403,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df"
integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==
+"@babel/parser@^7.13.15":
+ version "7.13.15"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8"
+ integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==
+
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.13.12":
version "7.13.12"
resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.13.12.tgz#a3484d84d0b549f3fc916b99ee4783f26fabad2a"
@@ -1248,6 +1253,20 @@
debug "^4.1.0"
globals "^11.1.0"
+"@babel/traverse@^7.4.5":
+ version "7.13.15"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.15.tgz#c38bf7679334ddd4028e8e1f7b3aa5019f0dada7"
+ integrity sha512-/mpZMNvj6bce59Qzl09fHEs8Bt8NnpEDQYleHUPZQ3wXUMvXi+HJPLars68oAbmp839fGoOkv2pSL2z9ajCIaQ==
+ dependencies:
+ "@babel/code-frame" "^7.12.13"
+ "@babel/generator" "^7.13.9"
+ "@babel/helper-function-name" "^7.12.13"
+ "@babel/helper-split-export-declaration" "^7.12.13"
+ "@babel/parser" "^7.13.15"
+ "@babel/types" "^7.13.14"
+ debug "^4.1.0"
+ globals "^11.1.0"
+
"@babel/types@7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
@@ -1325,7 +1344,7 @@
resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413"
integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==
-"@emotion/is-prop-valid@0.8.8", "@emotion/is-prop-valid@^0.8.6":
+"@emotion/is-prop-valid@0.8.8", "@emotion/is-prop-valid@^0.8.6", "@emotion/is-prop-valid@^0.8.8":
version "0.8.8"
resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a"
integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==
@@ -1371,12 +1390,12 @@
"@emotion/styled-base" "^10.0.27"
babel-plugin-emotion "^10.0.27"
-"@emotion/stylis@0.8.5":
+"@emotion/stylis@0.8.5", "@emotion/stylis@^0.8.4":
version "0.8.5"
resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04"
integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==
-"@emotion/unitless@0.7.5":
+"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4":
version "0.7.5"
resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed"
integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==
@@ -3636,6 +3655,16 @@ babel-plugin-react-docgen@^4.2.1:
lodash "^4.17.15"
react-docgen "^5.0.0"
+"babel-plugin-styled-components@>= 1":
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz#1dec1676512177de6b827211e9eda5a30db4f9b9"
+ integrity sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.0.0"
+ "@babel/helper-module-imports" "^7.0.0"
+ babel-plugin-syntax-jsx "^6.18.0"
+ lodash "^4.17.11"
+
babel-plugin-syntax-jsx@6.18.0, babel-plugin-syntax-jsx@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
@@ -4073,6 +4102,11 @@ camelcase@^6.0.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
+camelize@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"
+ integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=
+
caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001173, caniuse-lite@^1.0.30001179, caniuse-lite@^1.0.30001181:
version "1.0.30001198"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001198.tgz#ed2d9b5f060322ba2efa42afdc56dee3255473f4"
@@ -4721,6 +4755,11 @@ crypto-browserify@3.12.0, crypto-browserify@^3.11.0:
randombytes "^2.0.0"
randomfill "^1.0.3"
+css-color-keywords@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05"
+ integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=
+
css-loader@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.6.0.tgz#2e4b2c7e6e2d27f8c8f28f61bffcd2e6c91ef645"
@@ -4750,6 +4789,15 @@ css-select@^2.0.2:
domutils "^1.7.0"
nth-check "^1.0.2"
+css-to-react-native@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756"
+ integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==
+ dependencies:
+ camelize "^1.0.0"
+ css-color-keywords "^1.0.0"
+ postcss-value-parser "^4.0.2"
+
css-what@^3.2.1:
version "3.4.2"
resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4"
@@ -6740,7 +6788,7 @@ hmac-drbg@^1.0.1:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.1"
-hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
+hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
@@ -8321,7 +8369,7 @@ lodash.sortby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
-lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21:
+lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -9772,7 +9820,7 @@ postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2:
uniq "^1.0.1"
util-deprecate "^1.0.2"
-postcss-value-parser@^4.1.0:
+postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb"
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
@@ -11475,6 +11523,22 @@ style-loader@^1.3.0:
loader-utils "^2.0.0"
schema-utils "^2.7.0"
+styled-components@5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.1.1.tgz#96dfb02a8025794960863b9e8e365e3b6be5518d"
+ integrity sha512-1ps8ZAYu2Husx+Vz8D+MvXwEwvMwFv+hqqUwhNlDN5ybg6A+3xyW1ECrAgywhvXapNfXiz79jJyU0x22z0FFTg==
+ dependencies:
+ "@babel/helper-module-imports" "^7.0.0"
+ "@babel/traverse" "^7.4.5"
+ "@emotion/is-prop-valid" "^0.8.8"
+ "@emotion/stylis" "^0.8.4"
+ "@emotion/unitless" "^0.7.4"
+ babel-plugin-styled-components ">= 1"
+ css-to-react-native "^3.0.0"
+ hoist-non-react-statics "^3.0.0"
+ shallowequal "^1.1.0"
+ supports-color "^5.5.0"
+
styled-jsx@3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.3.2.tgz#2474601a26670a6049fb4d3f94bd91695b3ce018"
@@ -11504,7 +11568,7 @@ supports-color@^2.0.0:
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
-supports-color@^5.3.0:
+supports-color@^5.3.0, supports-color@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==