-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
[all] Add tests for Typescript definition files #964
Comments
Yes. Adding compatibility tests are planned. Quick question: why has an official version of material-ui an alpha from jss? |
I'm not sure, I don't have an answer yet - I think olivier is probably celebrating new years. Probably unintended but I did find it in the monorepo root "resolutions". I think it was intended to be performance testing for another alpha mui package and...unintentionally...since it was in the root resolutions runtime types (which were scoped to 9.x and @types/jss) ended up getting updated to 10.alpha instead of staying on @types/jss. Actual details here: mui/material-ui#14040 (comment) Intentions yet to be determined. |
@HenriBeck it looks like alpha dependency was unintentional for |
Reiterating my comment in #889: Why is the The If JSS wants to maintain the types, I strongly suggest we base them on all the great work that's gone into the existing package. Replacing the community version with breaking changes and fewer features smells NIH. I don't know if that's the case or not, but it's the perception. |
Breaking changes are anyways required as we changed the name of I think we can update the current definitions to include such features. I was hesitant to just copy them over as the |
Expected behavior:
Any typescript definitions exported from this library should be tested, otherwise it can cause real pain and doubt for ts users.
Describe the bug:
#889 (comment) was integrated without tests. It did not start with @types/jss package and we have no guarantee compatibility.
Versions (please complete the following information):
Context
Changelog from 9->10 should address user's removal of @types/jss as a requirement otherwise conflicts will arise. As-is, I am seeing app errors downstream of material-ui 3.8.1 because of a mix of type use between 9.x and 10.x. It is not easy or apparent there, but is within our app. Investigating in material-ui, different packages require different versions of jss, but ultimately the root of the yarn workspace has 10.alpha.3 and @types/jss. It just so happens that the tests/usage there passes, but does not in the downstream app.
For samples of typescript testing, check out material-ui https://github.com/mui-org/material-ui and usage tests such as https://github.com/mui-org/material-ui/tree/master/packages/material-ui/test/typescript
/cc @appsforartists @HenriBeck
The text was updated successfully, but these errors were encountered: