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
fix: support automatic types in pnpm installs #540
Conversation
I can't say anything to this particular change without an example repo. It seems weird that pnpm requires this. It basically means that every package maintainer (which might have nothing to do with types/) need to add an index.d.ts now. This adds a lot of friction. Honestly I'd rather remove the types dependency with the next breaking change so that we handle them just like any other package: If you want types and the package does not bundle them then you have to install them. |
Hmm yeah why is the types package a dependency? Would removing the dependency even be a breaking change? I don't think anything references them currently inside this package. |
It's used so that when installing But after thinking a bit more about this it's still not obvious why this change is necessary. I'm a bit worried this causes type conflicts. @aleclarson A complete repro would help a lot here. |
When installed with pnpm, the @types/testing-library__react package cannot be used by packages that don't directly depend on it, so we need to re-export them.
You might be confused. This pnpm incompatibility is caused by |
I guess you mean transitive. Thanks for the repro. So basically simply adding the Tested with module hoisting as well as ts 3.6 and it seemed to work. Friendly ping to @johnnyreilly since he had a great blog post that explained the strategy. I think the pnpm caveat should be mentioned. Aside: I'll check out the kcd-scripts related failure. |
Since we don't have a lockfile CI stays red until kentcdodds/kcd-scripts#107 is resolved. |
I think I've fixed the issue in kcd-scripts. We we'll just need to upgrade that and we should be good to go. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b4888a8:
|
@kentcdodds The after_success script is always failing for fork PRs which means there will be no codecov report. However, this is a required check which means PRs can only be merged by admins not just members. Same issue for dom-testing-library. |
Thanks for tuning me into that @eps1lon! I've been wondering for months why the codecov bot wasn't showing up on PRs. Now I've finally figured it out. This should fix that: kentcdodds/kcd-scripts@ab38c66 Is this ready to be merged? |
🎉 This PR is included in version 9.3.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
When installed with pnpm, the
@types/testing-library__react
package cannot be used by packages that don't directly depend on it, so we need to re-export them.