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 🙏

© 2025 – Pkg Stats / Ryan Hefner

expo-version

v1.0.2

Published

Version management tool for Expo React Native apps, similar to npm version but for expo apps

Readme

expo-version

Version management tool for Expo React Native apps, similar to npm version but designed specifically for Expo projects.

expo-version CLI in action

Use Case

Problem: When using EAS Build, you need to manually update the version in app.json before triggering a build. This manual process is error-prone and breaks your development flow.

Solution: expo-version integrates seamlessly into your build workflow by prompting for version updates before builds, ensuring your app version is always up-to-date.

Typical Workflow Integration

{
  "scripts": {
    "build:ios": "expo-version && eas build --platform ios",
    "build:android": "expo-version && eas build --platform android",
    "build:all": "expo-version && eas build --platform all"
  }
}

Now when you run npm run build:ios, it will:

  1. 🔍 Show your current version from app.json
  2. 🎯 Prompt you to select the new version (keep current/patch/minor/major/custom)
  3. 📝 Update both app.json and package.json (if version changed)
  4. 📦 Commit and tag the version change (if version changed)
  5. 🚀 Trigger the EAS build with the correct version

Result: No more forgetting to update versions, no more builds with wrong version numbers, and a clean git history of your releases.

Features

  • 📱 Expo-specific: Reads and updates versions in both app.json and package.json
  • 🎯 Interactive: Prompts for version increments (patch, minor, major) or custom versions
  • 🔧 Git integration: Automatically creates commits and tags
  • 🚀 EAS compatible: Works seamlessly with EAS Build lifecycle hooks
  • 🛡️ TypeScript: Fully typed with TypeScript support
  • 📦 Semver compliant: Uses semantic versioning standards

Installation

npm install -g expo-version

Or use it directly with npx:

npx expo-version

Usage

Interactive mode

Simply run the command and select your preferred version increment:

expo-version

This will:

  1. Show the current version from app.json
  2. Prompt you to select from these options:
    • keep current - Keep the existing version (useful for rebuilds)
    • patch - Increment patch version (e.g., 1.2.3 → 1.2.4)
    • minor - Increment minor version (e.g., 1.2.3 → 1.3.0)
    • major - Increment major version (e.g., 1.2.3 → 2.0.0)
    • custom - Enter a custom version
  3. Update both app.json and package.json (if version changed)
  4. Create a git commit and tag (if in a git repository and version changed)

Direct version specification

Specify the exact version you want:

expo-version 1.2.3

Skip git tagging

Use the --no-git-tag-version flag to prevent git tag creation:

expo-version 1.2.3 --no-git-tag-version

Options

| Option | Description | | ---------------------- | ------------------------------------------------- | | --no-git-tag-version | Prevent git tag creation (similar to npm version) | | --help, -h | Show help message |

Requirements

  • Node.js 16 or higher
  • An Expo project with app.json containing expo.version field
  • package.json file

EAS Build Integration

This tool is designed to work with EAS Build lifecycle hooks. You can use it in your package.json scripts:

{
  "scripts": {
    "eas-build-pre-install": "expo-version --no-git-tag-version",
    "version": "expo-version"
  }
}

Git Workflow

When run in a git repository, expo-version will:

  1. Check for uncommitted changes (prompts for confirmation if found)
  2. Update app.json and package.json with the new version
  3. Add both files to git staging area
  4. Create a commit with message v{version} (e.g., v1.2.3)
  5. Create a git tag v{version} (unless --no-git-tag-version is used)

Programmatic Usage

You can also use expo-version programmatically in your Node.js scripts:

import { ExpoVersion } from "expo-version";

const expoVersion = new ExpoVersion("/path/to/project", {
  noGitTagVersion: true,
});

await expoVersion.run("1.2.3");

Examples

Basic usage

# Interactive version selection:
# ❯ keep current (1.2.3)
#   patch (1.2.4)
#   minor (1.3.0)
#   major (2.0.0)
#   custom
expo-version

# Set specific version
expo-version 2.1.0

# Update version without creating git tag
expo-version 2.1.0 --no-git-tag-version

EAS Build integration

{
  "name": "my-expo-app",
  "scripts": {
    "build:ios": "expo-version && eas build --platform ios",
    "build:android": "expo-version && eas build --platform android",
    "build:all": "expo-version && eas build --platform all",
    "eas-build-pre-install": "expo-version --no-git-tag-version"
  }
}

Error Handling

expo-version will exit with appropriate error messages if:

  • app.json is not found or doesn't contain expo.version
  • package.json is not found
  • Invalid semver format is provided
  • Git operations fail

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.