Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

React.PropTypes deprecated, use prop-types package #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkelin
Copy link

@jkelin jkelin commented Jun 2, 2017

https://facebook.github.io/react/warnings/dont-call-proptypes.html
React.PropTypes is deprecated, this PR switches to prop-types package

@coveralls
Copy link

coveralls commented Jun 2, 2017

Coverage Status

Coverage increased (+0.03%) to 96.33% when pulling e931ddc on jkelin:master into 20a74a8 on FormidableLabs:master.

@jkelin
Copy link
Author

jkelin commented Jun 2, 2017

Your CI seems to be broken, builder run build works flawlessly for me. It looks like it does not do npm install

@Stanley-Jovel
Copy link

Any news on this?

@ryan-roemer
Copy link
Member

So the issue here is:

  1. The builder archetype builder-radium-component does a production-pruned build.
  2. React is a peerDependency and devDependency, and it's an external in webpack config, so the prod build works fine for a postinstall without React being installed. But prop-types is not a peerDependency nor (more importantly) a webpack external in the archetype.
  3. This project doesn't actually have a package.json:postinstall step that archetype was crafted to support (the complicated world of cleverly supporting both git and npm-based dependencies).

... so that's a lot going on. Here's the fastest, probably best path out:

  1. Open an upstream PR (that will need to be merged first) on https://github.com/FormidableLabs/builder-radium-component/blob/master/config/webpack/webpack.config.js#L31-L48 to add an external for prop-types just like react and radium.

  2. Move

        "builder": "^3.1.0",
        "builder-radium-component": "^2.1.2",
        "coveralls": "^2.11.14",
    

    to devDependencies.

  3. Add prop-types to peerDependencies just like React

  4. Edit this projects .travis.yml to remove the npm prune --production pruning at: https://github.com/FormidableLabs/radium-grid/blob/master/.travis.yml#L29 -- we don't have a postinstall in this project, so we don't need to make sure production deps build the project.

@rgerstenberger @alexlande @kenwheeler -- Does all of ^^^^ sound like the right way to go?

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

Successfully merging this pull request may close these issues.

4 participants