Skip to content

Commit

Permalink
[WNMGDS-405] Upgrade react-docgen (#654)
Browse files Browse the repository at this point in the history
* Upgrade react-docgen to 5.3.0

* Fix Github buttons on doc site and make renamed inverse prop backwards compatible

* Fix inverse button

Co-authored-by: Scott Weber <[email protected]>
  • Loading branch information
bernardwang and line47 authored Mar 17, 2020
1 parent c3c746d commit aa3d116
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"prettier": "1.18.2",
"prismjs": "1.16.0",
"react": "16.8.6",
"react-docgen": "4.1.1",
"react-docgen": "5.3.0",
"react-dom": "16.8.6",
"react-test-renderer": "16.8.6",
"selenium-webdriver": "4.0.0-alpha.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/components/Button/Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class Button extends React.PureComponent {
component,
inputRef,
inversed,
inverse,
onClick,
size,
variation,
Expand Down Expand Up @@ -87,7 +88,7 @@ export class Button extends React.PureComponent {
const disabledClass =
this.props.disabled && this.componentType() !== 'button' && 'ds-c-button--disabled';
const sizeClass = this.props.size && `ds-c-button--${this.props.size}`;
const inverseClass = this.props.inversed && 'ds-c-button--inverse';
const inverseClass = (this.props.inversed || this.props.inverse) && 'ds-c-button--inverse';

return classNames(
'ds-c-button',
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/scripts/components/GitHubLinks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const GitHubLinks = props => {
<div className={props.className}>
<Button
href={zipUrl}
inverse={props.inversed}
inversed={props.inversed}
variation="primary"
className={downloadBtnClassName}
>
Download code and design files
</Button>
<Button href={githubUrl()} inverse={props.inversed} className={githubBtnClassName}>
<Button href={githubUrl()} inversed={props.inversed} className={githubBtnClassName}>
View on GitHub
</Button>
</div>
Expand Down
59 changes: 31 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
invariant "^2.2.4"
semver "^5.5.0"

"@babel/core@>=7.2.2", "@babel/core@^7.0.0":
"@babel/core@>=7.2.2":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e"
integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==
Expand All @@ -39,7 +39,7 @@
semver "^5.4.1"
source-map "^0.5.0"

"@babel/core@^7.8.4":
"@babel/core@^7.7.5", "@babel/core@^7.8.4":
version "7.8.7"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b"
integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA==
Expand Down Expand Up @@ -797,14 +797,14 @@
core-js-pure "^3.0.0"
regenerator-runtime "^0.13.2"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.4.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.4":
"@babel/runtime@^7.4.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308"
integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==
dependencies:
regenerator-runtime "^0.13.2"

"@babel/runtime@^7.8.4":
"@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4":
version "7.8.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.7.tgz#8fefce9802db54881ba59f90bb28719b4996324d"
integrity sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==
Expand Down Expand Up @@ -1774,10 +1774,10 @@ [email protected], ast-types-flow@^0.0.7:
resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad"
integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0=

ast-types@0.12.4:
version "0.12.4"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.12.4.tgz#71ce6383800f24efc9a1a3308f3a6e420a0974d1"
integrity sha512-ky/YVYCbtVAS8TdMIaTiPFHwEpRB5z1hctepJplTr3UW5q8TDrpIMCILyk8pmLxGtn2KCtC/lSn7zOsaI7nzDw==
ast-types@^0.13.2:
version "0.13.2"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.2.tgz#df39b677a911a83f3a049644fb74fdded23cea48"
integrity sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA==

astral-regex@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -4998,7 +4998,7 @@ espree@^3.5.4:
acorn "^5.5.0"
acorn-jsx "^3.0.0"

esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0:
esprima@^4.0.0, esprima@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
Expand Down Expand Up @@ -9431,6 +9431,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1:
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==

min-indent@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256"
integrity sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY=

minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
Expand Down Expand Up @@ -9648,7 +9653,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==

neo-async@^2.5.0, neo-async@^2.6.0:
neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
Expand Down Expand Up @@ -11512,18 +11517,19 @@ react-displace@^2.3.0:
resolved "https://registry.yarnpkg.com/react-displace/-/react-displace-2.3.0.tgz#6915f8f2f279a29a7b58442405c26edc3d441429"
integrity sha512-T8g/lyn3IX8kxLO4k4vJ/oIO9G72pRTc9GYslqKsfPcN4gY5+FYR5OHxeTH1skPjVylJrveGE3OC2qCt3BuHeA==

react-docgen@4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-4.1.1.tgz#8fef0212dbf14733e09edecef1de6b224d87219e"
integrity sha512-o1wdswIxbgJRI4pckskE7qumiFyqkbvCO++TylEDOo2RbMiueIOg8YzKU4X9++r0DjrbXePw/LHnh81GRBTWRw==
react-docgen@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-5.3.0.tgz#9aabde5e69f1993c8ba839fd9a86696504654589"
integrity sha512-hUrv69k6nxazOuOmdGeOpC/ldiKy7Qj/UFpxaQi0eDMrUFUTIPGtY5HJu7BggSmiyAMfREaESbtBL9UzdQ+hyg==
dependencies:
"@babel/core" "^7.0.0"
"@babel/runtime" "^7.0.0"
async "^2.1.4"
"@babel/core" "^7.7.5"
"@babel/runtime" "^7.7.6"
ast-types "^0.13.2"
commander "^2.19.0"
doctrine "^3.0.0"
neo-async "^2.6.1"
node-dir "^0.1.10"
recast "^0.17.3"
strip-indent "^3.0.0"

[email protected]:
version "16.8.6"
Expand Down Expand Up @@ -11699,16 +11705,6 @@ realpath-native@^1.0.0:
dependencies:
util.promisify "^1.0.0"

recast@^0.17.3:
version "0.17.6"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.17.6.tgz#64ae98d0d2dfb10ff92ff5fb9ffb7371823b69fa"
integrity sha512-yoQRMRrK1lszNtbkGyM4kN45AwylV5hMiuEveUBlxytUViWevjvX6w+tzJt1LH4cfUhWt4NZvy3ThIhu6+m5wQ==
dependencies:
ast-types "0.12.4"
esprima "~4.0.0"
private "^0.1.8"
source-map "~0.6.1"

rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
Expand Down Expand Up @@ -13174,6 +13170,13 @@ strip-indent@^2.0.0:
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=

strip-indent@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001"
integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==
dependencies:
min-indent "^1.0.0"

strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
Expand Down

0 comments on commit aa3d116

Please sign in to comment.