Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(package): use prop-types package #1576

Merged
merged 4 commits into from
Apr 16, 2017
Merged

Conversation

layershifter
Copy link
Member

Fixes #1564.

Prop types are a feature for runtime validation of props during development. We've extracted the built-in prop types to a separate package to reflect the fact that not everybody uses them.

Ref.

package.json Outdated
@@ -56,7 +56,8 @@
"babel-runtime": "^6.22.0",
"classnames": "^2.1.5",
"debug": "^2.6.3",
"lodash": "^4.17.2"
"lodash": "^4.17.2",
"prop-types": "^15.5.0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this, however, I'm followed recommendation there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, however, let's update to the latest:

Note: there are known issues in versions before 15.5.7 so we recommend using it as the minimal version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to 15.5.7 👍

@codecov-io
Copy link

codecov-io commented Apr 12, 2017

Codecov Report

Merging #1576 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1576   +/-   ##
=======================================
  Coverage   99.74%   99.74%           
=======================================
  Files         141      141           
  Lines        2384     2384           
=======================================
  Hits         2378     2378           
  Misses          6        6
Impacted Files Coverage Δ
src/modules/Modal/ModalDescription.js 100% <ø> (ø) ⬆️
src/elements/Button/ButtonGroup.js 100% <ø> (ø) ⬆️
src/collections/Grid/Grid.js 100% <ø> (ø) ⬆️
src/modules/Dropdown/DropdownHeader.js 100% <ø> (ø) ⬆️
src/modules/Search/SearchCategory.js 100% <ø> (ø) ⬆️
src/collections/Table/TableRow.js 100% <ø> (ø) ⬆️
src/views/Feed/FeedDate.js 100% <ø> (ø) ⬆️
src/views/Feed/FeedSummary.js 100% <ø> (ø) ⬆️
src/elements/Step/StepContent.js 100% <ø> (ø) ⬆️
src/views/Feed/FeedContent.js 100% <ø> (ø) ⬆️
... and 120 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a22183e...463ca87. Read the comment docs.

@layershifter layershifter force-pushed the chore/react-proptypes branch from 7501080 to 78928fd Compare April 14, 2017 08:00
@@ -13,6 +13,7 @@ const webpackUMDConfig = {
[pkg.name]: paths.src('umd.js'),
},
externals: {
'prop-types': 'PropTypes',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe per their instructions we should bundle propTypes with the code as a dependency. Otherwise, users will also have to make it globally available. I'll update this.

Just as a heads up, the Codepen is powered by the UMD build as well so any UMD changes also require updates there.

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, made one minor change. Will merge on pass.

@levithomason levithomason merged commit 3a09c0f into master Apr 16, 2017
@levithomason levithomason deleted the chore/react-proptypes branch April 16, 2017 17:55
@levithomason
Copy link
Member

Released in [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants