-
Notifications
You must be signed in to change notification settings - Fork 403
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
Is it possible to have a version not depending on jest, @jest/globals ? #608
Comments
That's what I was planning to ask you as I read the first paragraph 😅 I guess we could try to make jest only a dev dependency, and remove the automatic setup entry points. That is, the "how to use instructions" will no longer include the ability to simply import a module from this library. The instructions will always be around this way of using the library, documented in our README:
There's the issue of the name, but I think that's secondary. It can always be named This would have to be a breaking change, but if it works, we can do it. |
What do you think of splitting this package into N packages with
This can scale if more test runners get supported in the future The breaking change will only be for Vitest users (going from |
Yes, that could work too. But it complicates things. It involves setting up a mono-repo. I can help with reviewing and releasing, but not with implementing it. Also, it's a change big enough (in terms of its implications) that it warrants asking the opinion of @testing-library/core-maintainers. |
I've been using |
Oh, just noticed the peerDeps. Yeah, I'd say just remove that and move on 🤷♂️ |
Though, they're all marked as optional so it's really not a big deal IMO. |
In my experience this is not true. For example, in the epic stack:
The only package in that project from
I'm pretty sure this is not an issue. |
Thanks for checking Kent, let me double check why I have these installed then. My David |
Ah @kentcdodds, the epic stack project uses the For the record: https://docs.npmjs.com/cli/v10/using-npm/config#legacy-peer-deps |
Oh yeah, this is because the new peer deps behavior is stupid. And I guess this is one more reason to disable it 🤷♂️ |
Anyway, not everyone's gonna want to disable it so I guess just remove the peerDeps and move on. Much better than complicating things with a ton of packages |
Great. Do you want me to open a PR for that? |
Done #610 |
This PR seems to have broken PNPM by default will not hoist packages to the top level
Having |
Describe the feature you'd like:
A version of this package that does not have jest / @jest/globals as peer dependencies. These dependencies are installed automatically by npm (in recent versions) and if you're using Vitest and not Jest, you still end up installing tons of jest-related dependencies.
Any advice on how this could get implemented? I'm willing to help btw :)
Suggested implementation:
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: