frenic / csstype

Strict TypeScript and Flow types for style based on MDN data
MIT License
1.72k stars 72 forks source link

Test against third-party libraries #13

Open frenic opened 6 years ago

frenic commented 6 years ago

Even small changes may have impact on third-party libraries that uses CSSType (like JSS, Styletron and Glitz) and tests against these would provide safety when publishing new releases. Not sure about the best approach to keep it quite general for both TypeScript/Flow and when API/definitions/tests changes on these libraries? It shouldn't fail unless a change in CSSType is the cause of the failure.

pelotom commented 6 years ago

Add React to that list now!

frenic commented 6 years ago

Yeah, we don't want that to happen again 😅 I'll do it manually until I figure out a way to automate it.

frenic commented 6 years ago

Hm, it seems like it doesn't work just by linking csstype and run yarn test locally with DefinitelyTyped. It seems like dtslint makes clean installations of NPM dependencies before linting. yarn lint react works though but I would like to cover other packages that depends on React.CSSProperties as well.

estaub commented 6 years ago

Please consider adding Material-UI to the list.
I know it's indirect, via JSS, but still.

frenic commented 6 years ago

@estaub I know you had troubles when the JSS types was changed. But those were/are directly due to @types/jss and not csstype as I understand. Does material-ui have any types that relies on the properties and values from csstype? Could you point me into the right direction so I can get an understanding of which changes in csstype could possibly affect material-ui?

estaub commented 6 years ago

Well, there's the &$%&%$ type-widening issue, that needs some kind of usability bandaid, at a minimum. See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24952#issuecomment-380936904, where I try to offer some options.