Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks fine to me. Let's just make sure that the nightly and the commitly jobs are effectively changing this to
0. I'd like to avoid to publish1000.0.0-20220928-2025-527cc3426on NPM just because the script it's appending the date/sha 👍Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be fine for nightlies, the flag sets the version to 0.0.0 here: https://github.com/facebook/react-native/blob/49b14cc6033db2d5561e2cd1094e220bf256bf0a/scripts/publish-npm.js#L152
and then releaseversion gets modified here: https://github.com/facebook/react-native/blob/49b14cc6033db2d5561e2cd1094e220bf256bf0a/scripts/publish-npm.js#L183
then according to this https://github.com/facebook/react-native/blob/49b14cc6033db2d5561e2cd1094e220bf256bf0a/scripts/publish-npm.js#L189
we can see this https://github.com/facebook/react-native/blob/8bb9717faa73d9211a5529c194d101e0efdc4942/.circleci/config.yml#L1277
and finally here we have
https://github.com/facebook/react-native/blob/main/scripts/prepare-package-for-release.js#L57
so we should be good to go, both are using the same set-rn-version so they'll touch the same files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but that said, for commitlies it's not setting it to 0.0.0 - uh.
We might need to change this https://github.com/facebook/react-native/blob/49b14cc6033db2d5561e2cd1094e220bf256bf0a/scripts/publish-npm.js#L157
to use
isCommitly? 🤔Why are commitlies not set to 0.0.0? can they be happening on stable branches?
cc @lunaleaps ?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm trying to page this all back in. Yes I believe commitlies can happen on stable branches -- I think the idea was that we could have PRs against the stable branch if people wanted to release a new patch -- and could use the commitly to verify but that may not actually be a workflow we need to support.
I think the 0.0.0 versioning is just that we could publish nightlies and it wouldn't affect npm version ordering but I think commitlies probably were grandfathered in to keep the
1000version (I don't know why this was chosen)-- I don't think it was an intentional thing. I think we could probably update everything to0.0.0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, I'm stupid - I should have read the comment at the start of the file: https://github.com/facebook/react-native/blob/49b14cc6033db2d5561e2cd1094e220bf256bf0a/scripts/publish-npm.js#L17
looks like currently we do have commitlies in the 1000.0.0 format - @cortinico I don't know if we want to move away from the pre-established approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally yes. I would refrain from packaging anythign on
1000.xversioning scheme.Commitlies are just nightlies from my point of view (with a different date/time and sha) + we don't
npm publishthem. Aside from this, versioning schema should be the same.As @lunaleaps, commitlies are avaialble on every commit, also release branches. In an ideal world, release managers should test the commitly before triggering the publish job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so just to make sure I'm understanding - I should change the logic here to tag/version commitlies to use 0.0.0, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't necessarily need to happen here. Can be a separate PR like "re-align commitlies versioning schema to follow the same as nightlies" or so 👍