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
Proposal: @react-native-community/template versioning scheme #2345
Comments
@blakef you have an unfinished sentence here.
IMHO this should be the preferred approach. I would not put the map inside the The logic could be something like:
|
Do we really need the mapping? Unless there are breaking changes disguised as minor released, it shouldn't be problematic for any |
Thanks @cortinico and @thymikee. @thymikee sure, I guess we can guarantee that template Upgrade HelperOne thing to consider is that rn-diff-purge assumes that the template and react-native have a 1:1 relationship. This would change that. We can probably tweak rn-diff-purge to match these using https://registry.npmjs.org/react-native and the npmjs registry data:
Gives us this:
Which we can correlate with template releases and update the TL;DR / OutcomeWe don't need a version table (that would have to be maintained). For projects that may require this, then can match the specified version of |
Support RFC-0759 decoupling of template from react-native. This makes use of the new @react-native-community/template project. We're careful to validate against what npm and github show for the state of the react-native project. New Template: This will enable the new @react-native-community/template only if it published on npm and the react-native/template doesn't exist for the specific version of react-native selected. There's more discussion about how template version and react-native version should be related to each other in react-native-community#2345.
Support RFC-0759 decoupling of template from react-native. This makes use of the new @react-native-community/template project. We're careful to validate against what npm and github show for the state of the react-native project. New Template: This will enable the new @react-native-community/template only if it published on npm and the react-native/template doesn't exist for the specific version of react-native selected. There's more discussion about how template version and react-native version should be related to each other in react-native-community#2345.
Sorry it took me a while to get around to comment here - I have been having mixed feelings about the versioning scheme having to be a 1:1 relationship with the npm Blake, as you mentioned already, upgrade-helper has that as an expectation to work properly, and in a way we also want people to have this template and DX flow to behave exactly as before in order to minimise confusion. So with that in mind I think that even if it might just be a super small change (ex. the version in the package.json) this template should keep the 1:1. |
Support RFC-0759 decoupling of template from react-native. This makes use of the new @react-native-community/template project. We're careful to validate against what npm and github show for the state of the react-native project. New Template: This will enable the new @react-native-community/template only if it published on npm and the react-native/template doesn't exist for the specific version of react-native selected. There's more discussion about how template version and react-native version should be related to each other in react-native-community#2345.
Support RFC-0759 decoupling of template from react-native. This makes use of the new @react-native-community/template project. We're careful to validate against what npm and github show for the state of the react-native project. New Template: This will enable the new @react-native-community/template only if it published on npm and the react-native/template doesn't exist for the specific version of react-native selected. There's more discussion about how template version and react-native version should be related to each other in react-native-community#2345.
Support RFC-0759 decoupling of template from react-native. This makes use of the new @react-native-community/template project. We're careful to validate against what npm and github show for the state of the react-native project. New Template: This will enable the new @react-native-community/template only if it published on npm and the react-native/template doesn't exist for the specific version of react-native selected. There's more discussion about how template version and react-native version should be related to each other in react-native-community#2345.
Realistically, to make sure we have the parity between RN releases and upgrade helper, we should set up some automation that's triggered from RN release webhook and match accordingly. We should also have the freedom to amend those versions for critical bug fixes. Like:
|
Background
As part of the move to support changes in the RFC-0759 React Native Frameworks, we're going to have to come up with a semver based versioning scheme to use with the @react-native-community/template package.
Proposal
init
command:--template @react-native-community/template@version
Example
As with the existing template, the version of React Native should be exactly pinned so users can manage upgrading from their template version manually. The downside of this approach is that we have to maintain this compatibility list as part of the release process, which no-longer is done for "free" as part of the
react-native
release process.Problems
React Native version pinning
Currently we pin the version of React Native to each template release. Since the template was bound to the react-native npm package this wasn't an issue. We'd automatically get a release with each release of
react-native
. We no longer get this.The first approach that comes to mind is:
{ [react-native-version]: template-version }
within thepackage.json
thatinit
can lookup usinghttps://registry.npmjs.org/react-native/latest
which is guaranteed to have all reverse lookups.It's entirely possible that we can do some basic work to compress that a little (see the sequence of
0.74.0-5
with matching template version of0.74.0
), but for now it might be good just keep it simple.The text was updated successfully, but these errors were encountered: