From 6ef1cd58cb96028f93f444bde0c02a4b17a8038f Mon Sep 17 00:00:00 2001 From: Lucas Bebber Date: Wed, 12 Feb 2020 14:37:32 -0300 Subject: [PATCH 1/3] Show item props to menu item category id error --- react/components/CategoryItem.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/react/components/CategoryItem.tsx b/react/components/CategoryItem.tsx index b2d2266d..afd4fb1e 100644 --- a/react/components/CategoryItem.tsx +++ b/react/components/CategoryItem.tsx @@ -27,7 +27,9 @@ class CategoryItem extends Component { {({ data, loading, error }: QueryResult) => { if (error) { throw new Error( - `GraphQL error while rendering Menu rendered Category id ${categoryId}` + `GraphQL error while rendering Menu rendered Category id ${categoryId}. +The error happened on the menu item with the following props: +${JSON.stringify(this.props, null, 2)}` ) } From 65519336e5e3dca2dfdb63ce0b57dd49f147dc8e Mon Sep 17 00:00:00 2001 From: Lucas Bebber Date: Wed, 12 Feb 2020 14:37:40 -0300 Subject: [PATCH 2/3] Update react-intl --- react/package.json | 2 +- react/yarn.lock | 122 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 122 insertions(+), 2 deletions(-) diff --git a/react/package.json b/react/package.json index 06b118c5..a82d3fa9 100644 --- a/react/package.json +++ b/react/package.json @@ -19,7 +19,7 @@ "react": "^16.3.1", "react-apollo": "^2.5.2", "react-dom": "^16.8.3", - "react-intl": "^2.7.2" + "react-intl": "3.9.1" }, "devDependencies": { "@types/classnames": "^2.2.7", diff --git a/react/yarn.lock b/react/yarn.lock index be3a59a1..e0f98181 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -764,6 +764,49 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@formatjs/intl-listformat@^1.3.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-1.4.1.tgz#a467cc6857808f2eec78e5bdd0ae03b224e89d0c" + integrity sha512-AX0o1y5xXyMY4ebZOO+UujMcDhniYDs50KpwGzjUPV+bBILwRYqH/6IprZZG/V8YSOtetZlalZiwzJ50dH6PuQ== + dependencies: + "@formatjs/intl-utils" "^2.2.0" + +"@formatjs/intl-relativetimeformat@^4.5.1": + version "4.5.9" + resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-4.5.9.tgz#d9b74724a7cbcb4edc9d751b2979195fab4d39cc" + integrity sha512-6rgPXQl5MrPPbCuNiHxolzO6xNCHphCVEWW6RWGy7t/Mek70gD7nq1erW8fbQJ0XL/UeAC0Cz/+ggh7vaSsKNA== + dependencies: + "@formatjs/intl-utils" "^2.2.0" + +"@formatjs/intl-unified-numberformat@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-2.2.0.tgz#ef82469962d7e66dbfce511409961d7013253ecd" + integrity sha512-A9ov4uO04pSHG5Iqcrc457hvsq3lz/oWQ3B0I03zbL1rnBC8ttrZEobw3X3k/tWYPXeNJbRtsSbXqzJo55NeBw== + dependencies: + "@formatjs/intl-utils" "^1.6.0" + +"@formatjs/intl-unified-numberformat@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-3.2.0.tgz#5197987e61ba0972889105e525f1cbe6d91cf46f" + integrity sha512-SZMTV/tR0h7nYhS2x69S7zhHXaBmE0ZTR2OIiakt8W7uYWVgcRhu/LgUeVtGzpwPI2ChcOjNMtX/k6y1M9aDNA== + dependencies: + "@formatjs/intl-utils" "^2.2.0" + +"@formatjs/intl-utils@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-1.6.0.tgz#43b094232b9ef98b57a270bcecee99168d329e9f" + integrity sha512-5D0C4tQgNFJNaJ17BYum0GfAcKNK3oa1VWzgkv/AN7i52fg4r69ZLcpEGpf6tZiX9Qld8CDwTQOeFt6fuOqgVw== + +"@formatjs/intl-utils@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-2.2.0.tgz#ba6e12fe64ff7fd160be392007c47d24b7ae5c75" + integrity sha512-+Az7tR1av1DHZu9668D8uh9atT6vp+FFmEF8BrEssv0OqzpVjpVBGVmcgPzQP8k2PQjVlm/h2w8cTt0knn132w== + +"@formatjs/macro@^0.2.6": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@formatjs/macro/-/macro-0.2.6.tgz#eb173658d803416a43210778b2f5c04c5a240bb6" + integrity sha512-DfdnLJf8+PwLHzJECZ1Xfa8+sI9akQnUuLN2UdkaExTQmlY0Vs36rMzEP0JoVDBMk+KdQbJNt72rPeZkBNcKWg== + "@jest/console@^24.7.1", "@jest/console@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" @@ -967,6 +1010,19 @@ dependencies: graphql "*" +"@types/hoist-non-react-statics@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" + integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + +"@types/invariant@^2.2.30": + version "2.2.31" + resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.31.tgz#4444c03004f215289dbca3856538434317dd28b2" + integrity sha512-jMlgg9pIURvy9jgBHCjQp/CyBjYHUwj91etVcDdXkFl2CwTFiQlB+8tcsMeXpXf2PFE5X2pjk4Gm43hQSMHAdA== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -1031,6 +1087,14 @@ resolved "https://registry.yarnpkg.com/@types/react-intl/-/react-intl-2.3.18.tgz#fd2d8b7f4d0a1dd05b5f1784ab0d7fe1786a690d" integrity sha512-DVNJs49zUxKRZng8VuILE886Yihdsf3yLr5vHk9zJrmF8SyRSK3sxNSvikAKxNkv9hX55XBTJShz6CkJnbNjgg== +"@types/react@*": + version "16.9.19" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.19.tgz#c842aa83ea490007d29938146ff2e4d9e4360c40" + integrity sha512-LJV97//H+zqKWMms0kvxaKYJDG05U2TtQB3chRLF8MPNs+MQh/H1aGlyDUxjaHvu08EAGerdX2z4LTBc7ns77A== + dependencies: + "@types/prop-types" "*" + csstype "^2.2.0" + "@types/react@^16.8.7", "@types/react@^16.8.8": version "16.9.11" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.11.tgz#70e0b7ad79058a7842f25ccf2999807076ada120" @@ -2613,6 +2677,13 @@ hoist-non-react-statics@^3.3.0: dependencies: react-is "^16.7.0" +hoist-non-react-statics@^3.3.1: + 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== + dependencies: + react-is "^16.7.0" + hosted-git-info@^2.1.4: version "2.8.5" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" @@ -2728,11 +2799,28 @@ intl-format-cache@^2.0.5: resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-2.2.9.tgz#fb560de20c549cda20b569cf1ffb6dc62b5b93b4" integrity sha512-Zv/u8wRpekckv0cLkwpVdABYST4hZNTDaX7reFetrYTJwxExR2VyTqQm+l0WmL0Qo8Mjb9Tf33qnfj0T7pjxdQ== +intl-format-cache@^4.2.13, intl-format-cache@^4.2.21: + version "4.2.21" + resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-4.2.21.tgz#d8e0bdfc357448f48dc1ab44670dc64a19b24f51" + integrity sha512-6pZlBdqTRUuuwRWywPItHY1JQwzQxWcpBHv6w4M8T6bGzAsiL/QmI+XsdOhsqJLaL4ZmTATn1kIkNlMk4VzSLQ== + +intl-locales-supported@^1.8.4: + version "1.8.4" + resolved "https://registry.yarnpkg.com/intl-locales-supported/-/intl-locales-supported-1.8.4.tgz#e1d19812afa50dc2e2a2b4741ceb4030522d45b1" + integrity sha512-wO0JhDqhshhkq8Pa9CLcstqd1aCXjfMgfMzjD6mDreS3mTSDbjGiMU+07O8BdJGxed7Q0Wf3TFVjGq0W3Y0n1w== + intl-messageformat-parser@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz#b43d45a97468cadbe44331d74bb1e8dea44fc075" integrity sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU= +intl-messageformat-parser@^3.5.0, intl-messageformat-parser@^3.6.4: + version "3.6.4" + resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-3.6.4.tgz#5199d106d816c3dda26ee0694362a9cf823978fb" + integrity sha512-RgPGwue0mJtoX2Ax8EmMzJzttxjnva7gx0Q7mKJ4oALrTZvtmCeAw5Msz2PcjW4dtCh/h7vN/8GJCxZO1uv+OA== + dependencies: + "@formatjs/intl-unified-numberformat" "^3.2.0" + intl-messageformat@^2.0.0, intl-messageformat@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-2.2.0.tgz#345bcd46de630b7683330c2e52177ff5eab484fc" @@ -2740,6 +2828,14 @@ intl-messageformat@^2.0.0, intl-messageformat@^2.1.0: dependencies: intl-messageformat-parser "1.4.0" +intl-messageformat@^7.7.0: + version "7.8.4" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-7.8.4.tgz#c29146a06b9cd26662978a4d95fff2b133e3642f" + integrity sha512-yS0cLESCKCYjseCOGXuV4pxJm/buTfyCJ1nzQjryHmSehlptbZbn9fnlk1I9peLopZGGbjj46yHHiTAEZ1qOTA== + dependencies: + intl-format-cache "^4.2.21" + intl-messageformat-parser "^3.6.4" + intl-relativeformat@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/intl-relativeformat/-/intl-relativeformat-2.2.0.tgz#6aca95d019ec8d30b6c5653b6629f9983ea5b6c5" @@ -4275,7 +4371,26 @@ react-dom@^16.8.3, react-dom@^16.8.4: prop-types "^15.6.2" scheduler "^0.17.0" -react-intl@^2.7.2, react-intl@^2.8.0: +react-intl@3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-3.9.1.tgz#6bbb3492ff1e789bd4bd97d1d9398a75844ac005" + integrity sha512-F9nc8FD1Fuc14f921LnW+tvFHzI4vU8yrd95Hm4d1iYopt8KEa/Y3+Tg1QDysrRNXXC9+APwwfF0u34bLWF6LA== + dependencies: + "@formatjs/intl-listformat" "^1.3.1" + "@formatjs/intl-relativetimeformat" "^4.5.1" + "@formatjs/intl-unified-numberformat" "^2.2.0" + "@formatjs/macro" "^0.2.6" + "@types/hoist-non-react-statics" "^3.3.1" + "@types/invariant" "^2.2.30" + hoist-non-react-statics "^3.3.1" + intl-format-cache "^4.2.13" + intl-locales-supported "^1.8.4" + intl-messageformat "^7.7.0" + intl-messageformat-parser "^3.5.0" + invariant "^2.1.1" + shallow-equal "^1.1.0" + +react-intl@^2.8.0: version "2.9.0" resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-2.9.0.tgz#c97c5d17d4718f1575fdbd5a769f96018a3b1843" integrity sha512-27jnDlb/d2A7mSJwrbOBnUgD+rPep+abmoJE511Tf8BnoONIAUehy/U1zZCHGO17mnOwMWxqN4qC0nW11cD6rA== @@ -4641,6 +4756,11 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +shallow-equal@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da" + integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" From c271d72b8e2144e7545804acc0cca3bfcf6ee7fe Mon Sep 17 00:00:00 2001 From: Lucas Bebber Date: Wed, 12 Feb 2020 14:38:47 -0300 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 892e0ade..e6c08fa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- More informative error messages for the CategoryItem component. ## [2.22.0] - 2020-01-17 ### Added