npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rnx-kit/rn-changelog-generator

v0.5.0

Published

EXPERIMENTAL - USE WITH CAUTION - Generate a markdown-formatted list of changes between two version of react-native

Downloads

58,166

Readme

@rnx-kit/rn-changelog-generator

Build npm version

🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧

This tool is EXPERIMENTAL - USE WITH CAUTION

🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧

This script used to live in react-native-community/releases, and has moved here as part of deprecating that repo.

Motivation

This script generates a markdown-formatted list of changes between two given git references (e.g. tags).

The script is a little more complex than one might expect for the following reasons:

  • Attributing changes to the author’s github handle requires fetching the commit metadata from the github API, rather than relying on a local clone of the react-native repo.

  • Due to how react-native’s release process works, we want to be able to exclude previously cherry-picked commits from the changelog entry of the next version.

    However, with git, cherry-picked commits will have different commit hashes than their original counterparts – as they exist in the main branch. Because of this, the next version’s stable branch will include the same changes, except using their original commit hash. This makes it impossible to exclude these commits without further work.

    For this reason, the script will parse the ‘referential revision’ – which is added to each commit message by Facebook’s infrastructure – and use it to resolve to the original commit in the main branch. This resolved commit’s hash is then used in the changelog entry, so the script can find and exclude it from the next version’s entry.

    This cannot be done via the github API and thus relies on a local clone of the react-native repo.

You can read more of the old documentation about it here.

Setup

If you don’t already have a checkout of the react-native repo in a nearby folder:

git clone https://github.com/facebook/react-native.git

Ensure the repo is up-to-date:

pushd react-native
git checkout main
git pull
popd

Usage

Generate a changelog for react-native commits between versions 0.65.0 and 0.66.0:

npx @rnx-kit/rn-changelog-generator --base v0.65.0 --compare v0.66.0 --repo ../../../react-native --changelog ../../../react-native/CHANGELOG.md

As explained above, you will need to have a local clone of react-native, which is referenced by the --repo parameter.

[Optional] Get a Github 'personal acccess token'

This script uses the Github API to fetch commit metadata. This data is accessable without authentication as its public.

You can optionally provide a GitHub personal access token for the --token parameter which may be necessary in case Github API rate-limits your requests.

Instructions to create a GitHub ‘personal access token’:

  1. Visit the token settings page.
  2. Generate a new token and only give it the public_repo scope.
  3. Store this token somewhere secure for future usage.