-
Notifications
You must be signed in to change notification settings - Fork 358
Allow react-is ^17 as dependency #354
Comments
The problem there is that might break React 16 users - there's no way to allow v17 without auto-installing it, except by converting it to a peer dep, which would be a breaking change. |
|
In every case it will install 17, except when 16 is already present. Using react 16 with react-is 17 is the worst possible outcome. |
It seems to me that there is one solution for now that correctly specifies the dependencies for this. By bumping up the major version and specifying ... As a matter of fact, we don't know if this is really something that npm or yarn can solve correctly. Also, even if it is resolved correctly, this will confuse people who casually try to My conclusion is that it is preferable to use PeerDependencies, because the versions of react and react-is should be the same when resolving dependencies, and there should be one of each in the whole dependency tree. |
This would be a hell of a dependency. |
...Why isn't one of react and react-is in the other's peerdependencies in the first place? |
They should have been (in react-is). But since they’re not, it’s too late, there’s not much to be done here. Optional peer deps would be a breaking change, because older npm versions don’t understand them. |
Based on your answer I assume no new major version can be created. What's the reason for that? |
... History tells us that many cases similar to this have been solved by the passage of time and fashion. |
Well or? What if the old npm support is about to expire and the OptionalPeerDependencies become reliable? |
@alippai new major versions of any package should be avoided unless there's a very good reason for a breaking change. |
@alippai I agree with you that a major version release of react should be reason enough to release a major version of this package, which is downstream from react... |
I don't see any issues with the reasoning above, I was just curious ¯_(ツ)_/¯ |
However... as a matter of practice, it is extremely unpleasant to have mixed versions of react-is, so I have been investigating it. If it is confirmed that the implementation of this package's dependency on react-is has not changed destructively since the current dependency v16.13.1, then assuming React is released as defined by SemVer, this package's dependency on Regarding the results of the survey.... NO, not completely, ... However, it is stable except for the experimental APIs. facebook/react@9102719#diff-f0b61e170bdf20fa2c4810fb5f1bd6ddc849132d8051f1105a6a97e29cd0633e My argument is that if prop-types makes a major release relying on |
...However, since I checked it visually, there may be something I overlooked that I didn't notice... It would be a very unreliable basis for judgment... |
Oh... While I was talking about it, I was reviewing it and found that I really missed something... All three of these are experimental APIs, so I'm not going to change my assertion that the major release of prop-types will not affect many users operationally. |
I forgot to tell you guys the answer, which I received when I threw an issue on react, because the answer was so shocking. |
@ljharb does almost 5 years passing by since the release of react v16 and the recent release of react v18 warrant a new major version of prop-types? Maybe the EoL of Node.js 12.x is an interesting event in April as well. |
@alippai i'm not sure why either would have an impact. node going EOL in no way means a package must, or even should, drop support for it. I maintain hundreds of packages that support down to node 0.6, for example, and have no intention of ever dropping that support. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
Any progress here? There is |
Now it depends on react-is ^16 which may introduce extra library for react 17 projects.
https://github.com/facebook/prop-types/blob/master/package.json#L31
The text was updated successfully, but these errors were encountered: