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

@andrioid/react-native-version-setter

v2.2.0

Published

Update your app version with a single command.

Downloads

212

Readme

react-native-version-setter

licence NPM Version download PRs Welcome

The simplest way to update your app version.

Will auto update the following files:

android/app/build.gradle versionName
android/app/build.gradle versionCode
ios/{projectName}.xcodeproj/project.pbxproj MARKETING_VERSION
package.json "version"

🌐 Install

npm: npm i react-native-version-setter

yarn: yarn add react-native-version-setter

🚀 Usage

Simply call npm run setVersion or yarn run setVersion in your project root.

$: npm run setVersion 1.2.0
[RNVS] MyApp: 1.0.0: ==> 1.2.0 ✅ 

$: npm run setVersion 1.2.0
[RNVS] Version is already 1.2.0 🛑

👩‍💻 Freeform Versioning

RNVS does not impose restrictions on versioning style. Feel free set your version numbers in whatever format works for you. For example, Date-based versioning:

$: npm run setVersion 1.20200909.1
[RNVS] MyApp: 1.0.0: ==> 1.20200909.1 ✅ 

In most cases it makes sense to use conventional semantic versioning.

From version 2, RNVS has full support for extended semVer syntax, like 1.2.3-alpha. These symbols are not supported on iOS, so they are stripped out automatically. They will be inserted as normal into android files and package.json.

⛳ Flags

-d: Runs with debug logging.

-r: Prepares version strings, but logs to console instead of writing to file.

-android: Set version for android only

-ios: Set version for iOS only

⚙️ Config

In most cases you won't need any config at all, but creating a .rnvs.json file in your project root will expose some extra options. Below are all accepted properties with example values.

{
  // RNVS uses the project name 
  // in package.json by default,
  // But your ios project name might differ.
  "iosProjectName": "MyApp"
}

💻 Compatibility

  • Compatible with iOS projects using Xcode 11+

🗺️ Roadmap

  • getVersion command
  • setVersion per-platform ✅ v2.1.0

👋 Troubleshooting

Version setting not working on new project

Ensure you have opened the generated .xcodeproj file at least once. On the first opening, Xcode will create the MARKETING_VERSION field that holds your app version. Prioed to this, there is nowhere to store the iOS version.

Need Help?

If you're after a new feature that isn't listed on the roadmap, or you're having trouble with this package, please open an issue.