-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow generate-readmes script to work with components using forwardref (
#2219) * fix(generate readmes): patch package to allow forwardref components * fix(readme generator): update path check method * fix(readme generatot): update component prop type to allow docs generator properly transform document
- Loading branch information
Showing
12 changed files
with
38 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
patches/typescript-react-function-component-props-handler+1.1.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/node_modules/typescript-react-function-component-props-handler/index.js b/node_modules/typescript-react-function-component-props-handler/index.js | ||
index 5c636b9..2f3cb68 100644 | ||
--- a/node_modules/typescript-react-function-component-props-handler/index.js | ||
+++ b/node_modules/typescript-react-function-component-props-handler/index.js | ||
@@ -47,9 +47,9 @@ function checkForProptypes(path, paramTypeName) { | ||
} | ||
|
||
function setParamsTypeDefinitionFromFunctionType(documentation, path) { | ||
- if (path.parentPath.node.init && path.parentPath.node.init.params.length === 0) { | ||
+ if (path.parentPath.node.init && Array.isArray(path.parentPath.node.init.params) && path.parentPath.node.init.params.length === 0) { | ||
return; | ||
- } | ||
+ } | ||
|
||
if ( | ||
path.node.type === 'ArrowFunctionExpression' && |
e43688c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui-kit – ./
ui-kit-git-main-commercetools.vercel.app
ui-kit-commercetools.vercel.app
uikit.commercetools.com
ui-kit-five-rho.vercel.app