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

Move react-jss types to dev dependencies #990

Merged
merged 1 commit into from
Jan 20, 2019

Conversation

HenriBeck
Copy link
Member

What would you like to add/fix?
Installing external types can have a problem when the end user also installs the same types package.

As we shouldn't force someone to install the @types/react package, I just moved to the dev dependencies. I think we can expect someone to have the appropriate package installed when using react-jss and using typescript

Corresponding issue (if exists): #976

@HenriBeck HenriBeck requested a review from kof January 19, 2019 17:45
"hoist-non-react-statics": "^3.2.0",
"jss": "^10.0.0-alpha.8",
"jss-preset-default": "^10.0.0-alpha.8",
"prop-types": "^15.6.0",
"theming": "^3.0.2"
},
"devDependencies": {
Copy link
Member

Choose a reason for hiding this comment

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

what about additionally having them in peerDependencies?

Copy link
Member Author

Choose a reason for hiding this comment

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

This would require everyone to install them 🤔
Or if they don't decide on installing them, they will constantly have a warning for a missing peer dependency which isn't nice either

Copy link
Member

Choose a reason for hiding this comment

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

yeah, how do we ensure that userr gets the right version of typings with a version of JSS?

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 don't think we can.

Copy link
Member Author

Choose a reason for hiding this comment

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

The things which we are using from react are also not to special/new so I don't think we will have a problem with that.

Copy link
Member Author

Choose a reason for hiding this comment

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

The definetly typed version also has no dependency on react types package

@HenriBeck HenriBeck merged commit a12dd0a into master Jan 20, 2019
@HenriBeck HenriBeck deleted the fix/react-jss/type-dependencies branch January 20, 2019 20:05
bhupinderbola pushed a commit to bhupinderbola/jss that referenced this pull request Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants