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

@ionic/migrate

v1.0.0

Published

Migration tool to automate and report on breaking changes across Ionic Framework major versions.

Readme

@ionic/migrate

Automates and reports the breaking changes between major versions of Ionic Framework. It scans your app, applies the changes it can make safely, and prints a checklist of the ones you need to do by hand, each with a file and line and a link to the docs.

It handles Angular, React, and Vue (and vanilla) from one command. New breaking changes and future majors are added as data, not new tooling.

Usage

Run it from the root of your app:

npx @ionic/migrate

Commit first. The tool edits files in place and won't write to a dirty working tree, so git is your undo. Then review the diff and the checklist it prints.

Options

--dry-run        Report what would change without writing anything
--check          Report only. Exit non-zero if any migration applies (for CI)
--experimental   Include experimental migrations
--force          Write even if the working tree is dirty or not a git repo
--no-format      Skip running the project's Prettier over changed files
--no-install     Skip reinstalling dependencies after the version bump
--from <major>   Override the detected source major version
--to <major>     Override the target major version
-h, --help       Show this help

What it does

Every breaking change is one of three kinds:

  • Auto-fix: a deterministic edit that preserves behavior, applied for you.
  • Report-only: a change that needs judgement (semantic rework, a dialect choice). The tool finds it and explains it, but won't rewrite it.
  • Experimental: an edit that is correct but whose consequence is a judgement call, so it only runs with --experimental. A report-only migration covers the same change by default.

Coverage

Each major upgrade has its own page, listing every change the tool covers, whether it is auto-fixed, report-only, or experimental, and the changes left for you to make by hand:

How it works

  1. Detect the installed framework and major version from package.json.
  2. Select the migrations whose version range applies. A project already on the target major selects nothing, so a finished migration doesn't run again.
  3. Apply the auto-fixes and collect the report-only findings.
  4. Print a grouped summary of what was fixed and what's left for you.
  5. Format the changed files with the project's own Prettier, so the AST-based edits match the surrounding style. Pass --no-format to skip it.
  6. Reinstall dependencies (using the lockfile's package manager) so node_modules matches the bumped package.json. Pass --no-install to skip it, then reinstall yourself before starting the app.

Transforms use ts-morph to locate nodes for TypeScript and TSX, and a small quote-aware scanner for HTML and Vue templates, so it doesn't touch string literals, comments, or unrelated code.

Limitations

These hold for every major. What a given upgrade can't reach is on its own page under docs/.

  • Single-shot. A project migrator isn't idempotent, and an import rewrite in particular will corrupt already-migrated code if you re-run it. The version gate prevents that once the @ionic/* bump has landed.
  • Only .ts and .tsx are loaded into ts-morph, so .js/.jsx files and Angular inline templates (a template: string in a decorator) get the text-scan migrations but not the AST-based ones.
  • No tsconfig.json is read. The type checker gets a fixed configuration, so a paths alias doesn't resolve, and a migration reading types treats what it can't reach as unknown rather than as nothing to report.
  • The template scanner is best-effort, not a full HTML parser.
  • Stylesheet scanning covers .css and .scss files. Styles inlined in a component decorator's styles array aren't read.

Extending

Add a migration by dropping a file under src/migrations/v<major>/ that exports a Migration (see src/types.ts) and registering it in src/migrations/index.ts. Give it a detect() and, when the change is safe to automate, a fix(), plus fromMajor/toMajor for version scoping and a fixture-backed test. The engine handles selection, ordering, git safety, formatting, and reporting.

Then add a row to that major's page under docs/, creating docs/v<major>.md if it's the first migration for a new one. That page is what tells someone whether an upgrade is covered, so it's part of the migration, not an afterthought.

Development

npm test          # Vitest
npm run lint      # tsc --noEmit
npm run build     # emit dist/