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(typescript): move typings to DefinitelyTyped #337

Merged
merged 2 commits into from Aug 15, 2019

Conversation

alexkrolick
Copy link
Collaborator

@alexkrolick alexkrolick commented Aug 11, 2019

See testing-library/react-testing-library#437, #335

Remove the TypeScript typedefs from this repo in favor of having the community maintain them at DefinitelyTyped.

Why

There are no core teammembers with the TS knowledge needed to maintain the types, and they are not well tested or integrated with the codebase.


See also reduxjs/redux#3500

BREAKING: remove TypeScript definitions from repo
@nickmccurdy
Copy link
Member

nickmccurdy commented Aug 12, 2019

It would be best to wait to merge until the types are published in DefinitelyTyped and then increment the major version number.

nickmccurdy
nickmccurdy previously approved these changes Aug 12, 2019
@afontcu
Copy link
Member

afontcu commented Aug 12, 2019

Are types gonna be published under "testing-library" namespace? We had this PR opened in Vue Testing Library to provide types locally (which relied on DTL types), so I believe we should follow other libraries' directions and publish types next to them.

@alexkrolick
Copy link
Collaborator Author

Yes, I think the way to do it is to mirror the package name directly in DefinitelyTyped

],
"dependencies": {
"@babel/runtime": "^7.5.5",
"@sheerun/mutationobserver-shim": "^0.3.2",
"@types/testing-library__dom": "^6.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

Ok, so I've added this as a dep. Here's what things look like before any of these changes (with the current 6.0.0):

Screen Shot 2019-08-15 at 1 01 14 PM

And here's what it looks like before I added this dependency (with 6.0.1-alpha.0):

Screen Shot 2019-08-15 at 1 00 12 PM

And here's what it looks like after I added this dependency (with 6.0.1-alpha.1):

Screen Shot 2019-08-15 at 1 00 32 PM

So as far as the consumer is concerned, there's absolutely no change. And if someone wants to have more control over the version of the typings, then they can install @types/testing-library__dom themselves and npm or yarn will de-dupe to whatever version they want.

This is getting a 👍 from me. Let's do it!

@kentcdodds kentcdodds changed the title chore(typescript): remove typings chore(typescript): move typings to DefinitelyTyped Aug 15, 2019
@kentcdodds kentcdodds merged commit 1682f5a into testing-library:master Aug 15, 2019
@kentcdodds
Copy link
Member

🎉 This PR is included in version 6.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

4 participants