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
Use peer dependencies #136
Comments
Yes, that sounds very sensible to me. Let's do that. |
Per #129 - also include |
Fixed with 9c23e89. I don't think |
If Should |
If we don't enforce |
Possibly related: #152 |
@kachkaev Yes it's related. I just really don't like the idea of having to put |
I guess that removing |
Removed polyfill with 4bf9d37. And no, |
If |
@capellini Ah, sorry - missed that. Fixed with f35cc48. |
No worries. Thanks! |
I might be wrong, but it seems that moving
to
This library has |
I believe I understand the purpose of Using |
@kachkaev From @capellini:
Please discuss if you feel you have another solution. |
@capellini do you mean Either way, classifying |
I mean
It felt that way initially to me, as well, but now I'm not so sure. The real question is -- do we expect users to need to install Another way to think about it is -- do we consider ourselves a replacement for any package? Or, in other words, would using our package obviate the need to use another? I think that @isaachinman's point is that we consider ourselves a replacement for yarn add react-i18next i18next they do this instead: yarn add next-i18next i18next As far as they are concerned, If we consider ourselves a 1:1 replacement for However, for advanced use cases, I believe that users may still need to use Yes, we would still need to worry about compatibility with |
@kachkaev Yes, I think I agree with you. The only true peer deps here are @capellini To answer your question, I want
What cases? If there are situations where users need to install and import |
Added |
Again, perhaps I'm revealing the extent of my ignorance of Either way, the defaults work for me, so I have no objections to |
I guess the fact that this question is asked means we're doing a good job here. Take a look at the example implementation from the |
Understood. It makes much more sense now that I see the example implementation. Thanks. |
The discussion of peer dependencies in #129 got me thinking - what do you think about moving
react-i18next
,i18next
(and perhaps other associatedi18next
packages), andreact
to dev dependencies and also including them as peer dependencies (much like thenext-i18next
package does withi18next
andreact
)? It would help communicate minimum compatible versions of each package and would help us avoid yarn warnings like this one:'warning "next-i18next > react-i18next@9.0.9" has incorrect peer dependency "i18next@>= 14.0.1".
In this case, our package.json specifies
i18next@^13.1.3
, but thenext-i18next
package.json
specifiesreact-i18next@^9.0.4
(currently v9.0.9) which has a peer dependency ofi18next@^14.0.1
. I think that we're going to constantly run into these incorrect peer dependency warnings unless we just specifynext-i18next
as a peer dependency (with the lowest compatible version number). Then users could install our package alongside the other peer dependencies when they want to usenext-i18next
.We would still have to keep the dev dependencies up to date, but the warnings would not show up for our users and I think it communicates more effectively that these packages are to be installed with our package and we only need to install them in our package if we're doing some sort of development (e.g. our e2e tests).
The text was updated successfully, but these errors were encountered: