-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Make it easier to use alpha/beta versions #4542
Comments
|
You bring up some good points.
Absolutely. We don't document everything as we go. Sometimes we get some in there and it lands in master. We usually file an issue close to release to list out the things that still need to be documented. As for a place to discuss, I'm not quite sure if an issue is the right place. It might be, but I want to say that this would be excellent for https://discuss.reactjs.org/ (though @spicy might tell me I'm wrong).
Yea, this hasn't been awesome. We've mostly chosen not to ship the browser builds of alphas and betas, only doing RCs and finals. Especially for 0.14 where we aren't 100% sure on what we're doing with the package (now that we're trying to split react and react-dom). We do have an unadvertised fiddle that uses the latest builds from master which I have on my server (http://react.zpao.com/builds/master/latest/). We intended to get the builds to a more sanctioned location with https but haven't yet, so go wild: https://jsfiddle.net/reactjs/ghmpo42k/
I think the dependency problem is "solved" using the pattern @syranide mentioned, but it can still be annoying. I've used |
Might be of interest to note that npm3 will make the peer dependency problem less problematic by making it a warning instead of an error. |
thanks for all these infos. About https://discuss.reactjs.org/ just discovered it. It seems there are quite a bunch of spammers :) @zpao the JsFiddle you give, is it always the same address for the latest pre-release? @syranide so it seems your solution works but unfurtunatly it still force library authors to update the package.json (at least to add the first beta). Nice to know npm3 wiill be more permissive about it. @zpao it would be nice to have a recommendation on what library authors should put in their package.json when they want to be permissive so that lib users can test it against alpha/beta. After doing some tests I found out using something like this: Lib:
It seems at first to work great, and is able to select I don't exactly know how it works but it seems alpha/beta/rc are special names for semver prerelease tags. See also http://stackoverflow.com/questions/20276072/does-npm-honour-newer-prerelease-versions-in-semver |
@slorber But that's the entire point of semver and dependencies, a new version of a dependency needs to be tested before it should be used by the package. If you don't care about that then you can just specify
|
Yes @syranide you are absolutly right in theory. In practice library authors are not always testing/updating immediatly when a new version of React come out. My point is just that it should be simpler for lib users to test a lib against an alpha/beta, and maybe give feedback to the lib author afterward. So what I want is basically to set a semver range for supported stable versions, but still also allow any alpha/beta/rc be used by users without having too much pain dealing with shrinkwrap. |
Uggh, that's new… Let's crank the spam protection up to 11 @spicyj.
That is always the latest build from master, which will likely be ahead of the latest pre-release. But it is always the same address. We can update the original it if we move the location of the builds.
Unfortunately this isn't really a problem we can realistically solve. We can make a suggestion about what to put as a dependency as mentioned for prereleases but that's still something a library author has to do. The dependency management is all npm here. I mentioned the |
@zpao I did try to use
Moving the peerDependency of my libs to a normal dependency, it seems to work with a warning:
I'm not sure how to use the tags in NPM (2.11.2) but it seems NPM has not a very consistent behavior. It would expect it to be more flexible regarging peerDependency than normal dependencies |
Notice that using |
Adding to this: would you consider tagging alpha/beta releases? Looking at the diff between versions makes it a bit easier to figure out what changed, so you're more inclined to try out early releases. Otherwise you need to track down the specific commits, which is tedious. |
A little notice:
Better to use |
I didn't expect that but on rereading that part of the spec, it's right there.
And backed up with the semver module (tested with caret ranges since those are default):
|
I'm going to close this out because I don't think there's anything actionable here, and there's been no activity for over a year. For the React 16 release, the team has been maintaining a detailed, and up-to-date issue for the betas and RC. A JSFiddle could easily be included in this and future issues tracking releases, thanks to unpkg. I don't think there's any intention to break from the current versioning practices for prereleases. |
Hi,
I think it should be easier to try/use a beta version of React (like 0.14.0-beta2).
Lack of documentation
As the changes are not yet officially documented, it would be nice to have a github issue per beta where the community could discuss migration problems. Usually, the errors/warnings provided by React are quite explicit but a place to discuss this could also help, and give an insight of the amount of work needed to migrate before the attempt.
No JsFiddle
I think it would be nice to provide a base JsFiddle integration for beta versions. It would permit users to test the new React behavior in a sandbox, but also to report bugs of the beta versions more easily.
peerDependency problem
When using libs that declare React as a peerDependency, there is a problem with NPM because
-betaX
does not match any semver range (see npm/npm#7330 (comment))This forces the library author to use something like this, in order to be able to use a beta with the lib:
"react": ">=0.11.0 || 0.13.0-beta.1 || 0.13.0-rc1 || 0.13.0-rc2 || 0.14.0-beta1"
The problem is that on each beta published, the library authors all have to add the new beta here to support it. I mean as I'm using react-date-picker, I have to wait the lib author to allow explicitly beta2 before being able to test beta2 (or I have to use shrinkwrap or manually edit the package.json of the lib...)
I don't know if there's a good solution to this problem, just wanted the React team to be aware of this
The text was updated successfully, but these errors were encountered: