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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stripe/sdk-migrator

v1.0.0

Published

A TypeScript CLI tool for Stripe SDK migration

Readme

Stripe SDK Migrator

The sdk-migrator is a tool that can modify Java and Python codebases that use the Stripe SDK. It will take code using older integration styles and output the same code but in the newer style.

Eg. In Stripe Java SDK v29.5.0 we introduced new v1 namespace in StripeClient. Running the v1-namespace migration would convert all your StripeClient calls to support the newer code path.

class AcmeBusinessApp {
    public StripeCollection<Customer> fetchCustomerList(StripeClient client) {
-        return client.customers().list();
+        return client.v1().customers().list();
    }
}

[!WARNING] sdk-migrator makes its best effort to migrate your code (especially with dynamic languages). Make sure you have all your code checked in a version control system (e.g. Git) before using this tool. Always review and test your code before deploying.

Installation

sdk-migrator is a Node.js-based package and can be installed globally as a CLI:

npm i -g @stripe/sdk-migrator

or used directly with npx (which comes pre-installed with npm):

npx @stripe/sdk-migrator

If you need Node.js installed, you can follow these instructions for your platform.

Usage

[!WARNING] SDK Migrator can modify files in your codebase. Make sure you have all your code checked in a version control system (e.g. Git) before using this tool. Always review and test your code before deploying.

# Run V1 Namespace migration on a Java codebase in ~/stripe-integration
npx @stripe/sdk-migrator --language java -d ~/stripe-integration --migration v1-namespace

Command Line Options

  • -h, --help: Show help message
  • -v, --version: Show version information
  • -d, --directory: Code directory to process
  • -l, --language: Programming language (java, python)
  • -m, --migration: Migration name (e.g., v1-namespace)
  • -x, --execute: Execute mode will modify files in your codebase
  • -u, --untyped: Untyped mode for codebases that are not fully typed. Currently only available for Python (optional)

Examples

# Show help
npx @stripe/sdk-migrator --help

# Show version
npx @stripe/sdk-migrator --version

# Run V1 Namespace migration in dry run mode(default). Dry run mode shows all the files that it will modify but does not persist it to disk. 
npx @stripe/sdk-migrator --language python -d ~/stripe-integration --migration v1-namespace

# Execute flag(-x or --execute) will make the migration changes and persist the files to disk.  
# Run V1 Namespace migration on a typed Python codebase in ~/stripe-integration
npx @stripe/sdk-migrator --language python -d ~/stripe-integration --migration v1-namespace --execute

# Run V1 Namespace migration on a untyped/paritally typed Python codebase in ~/stripe-integration
npx @stripe/sdk-migrator --language python -d ~/stripe-integration --migration v1-namespace --untyped --execute

# Run V1 Namespace migration on a Java codebase in ~/stripe-integration
npx @stripe/sdk-migrator --language java -d ~/stripe-integration --migration v1-namespace --execute

Customization

If you extend/implement your own StripeClient in your codebase, you can change the regex in src/{lang}/{migration}/configure.ts to use the tool.

Development

Contribution guidelines for this project