Skip to content

Fix older versions of react native changelog URLs#389

Open
ItaloFalzoni wants to merge 2 commits into
react-native-community:masterfrom
ItaloFalzoni:fix/changelog-old-versions-urls
Open

Fix older versions of react native changelog URLs#389
ItaloFalzoni wants to merge 2 commits into
react-native-community:masterfrom
ItaloFalzoni:fix/changelog-old-versions-urls

Conversation

@ItaloFalzoni
Copy link
Copy Markdown

@ItaloFalzoni ItaloFalzoni commented Oct 1, 2024

Summary

The previous React Native changelog files have been changed to another file. For example, the version 0.68 of react native has been changed to this link: https://github.com/facebook/react-native/blob/main/CHANGELOG-pre-070.md#v0680, before we were use this link: https://github.com/facebook/react-native/blob/main/CHANGELOG.md#v068 and it was not working very well.

Basically I added an extra function that checks versions prior to 0.70 and invokes a new function that is responsible for assembling the changelog URLs.

Test Plan

yarn start

What are the steps to reproduce?

You can see it live and check the link on the "Useful content for upgrading" section

Checklist

  • I tested this thoroughly
  • I added the documentation in README.md (if needed)

@JVGS1111
Copy link
Copy Markdown

JVGS1111 commented Oct 7, 2024

Can you guys check this?

@kelset
Copy link
Copy Markdown
Member

kelset commented Oct 10, 2024

@ItaloFalzoni can you verify that TS checks green locally? on CI it errors with Cannot set property mark of #<Object> which has only a getter (plus there's also an eslint error)

@ItaloFalzoni
Copy link
Copy Markdown
Author

@kelset

Sorry. I coded on Github Codespace and I didn't see how the TS check works. As soon as possible I will look again to make the review easier. Thanks.

Copy link
Copy Markdown
Member

@kelset kelset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together — and sorry it took us such a long time to come back around to this one.

The underlying issue still makes sense, but I don’t think we can merge this PR as-is anymore because the React Native changelog layout has changed again since this was opened.

The changelog files we need to account for now are:

  • CHANGELOG-0.5x.md
  • CHANGELOG-0.6x.md
  • CHANGELOG-0.7x.md
  • and CHANGELOG.md for newer releases

So if you’re still interested in updating this PR, could you please:

  • update/rebase the branch on current master
  • update the changelog URL logic to use the current file layout above
  • ideally use semver-based comparisons rather than string comparisons for version routing
  • add/update tests around getChangelogURL() for representative versions

If you’re still up for refreshing it, I’m happy to take another look after that. And if not, no worries at all — we can close this one later and revisit with a fresh PR from current master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants