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

@pumped-fn/codemod

v0.1.0

Published

Codemods for @pumped-fn packages

Readme

@pumped-fn/codemod

One-time migration tool from @pumped-fn/core-next to @pumped-fn/lite.

Transform Flow

graph TD
    A[Source Files] --> B[jscodeshift]
    B --> C{Transform Type}
    C --> D[provide → atom]
    C --> E[derive → atom with deps]
    C --> F[executor.lazy/reactive → controller]
    C --> G[Type Transforms]
    D --> H[Transformed Files]
    E --> H
    F --> H
    G --> H
    H --> I[migration-report.md]
    I --> J[Manual Review]

Usage

# Run on current directory
npx @pumped-fn/codemod

# Run on specific path
npx @pumped-fn/codemod ./src

# Dry run (preview changes)
npx @pumped-fn/codemod --dry

# Verbose output
npx @pumped-fn/codemod --verbose

What Gets Transformed

| Before | After | |--------|-------| | provide((ctl) => value) | atom({ factory: (ctx) => value }) | | derive([a, b], fn) | atom({ deps: { a, b }, factory: fn }) | | executor.lazy | controller(executor) | | executor.reactive | controller(executor) | | Core.Executor<T> | Lite.Atom<T> | | ctl.release() | ctx.invalidate() | | import { ... } from '@pumped-fn/core-next' | import { ... } from '@pumped-fn/lite' |

Migration Report

After running, check migration-report.md for:

  • Summary statistics (files processed, transforms applied)
  • Edge cases requiring manual review
  • AI-friendly JSON for assisted migration
  • Detailed breakdown of each transform type

After Running

# Review changes
git diff

# Update dependencies
npm uninstall @pumped-fn/core-next
npm install @pumped-fn/lite

# Fix remaining TypeScript errors
npm run typecheck

Edge Cases

Some patterns cannot be auto-transformed:

  • Core.Static<T> - no equivalent in lite
  • resolves([...]) - use Promise.all with scope.resolve()
  • Dynamic accessor references - requires manual refactoring
  • Spread in dependencies - convert to explicit object keys
  • Complex executor patterns - may need manual review

These cases are flagged in migration-report.md with file locations for manual review.

CLI Options

Options:
  --dry          Preview changes without writing files
  --verbose      Show detailed transform information
  --help         Show help message

Examples

Basic Migration

# Before
import { provide, derive } from '@pumped-fn/core-next';

const userAtom = provide((ctl) => ({ name: 'Alice' }));
const nameAtom = derive([userAtom], (user) => user.name);

// After
import { atom } from '@pumped-fn/lite';

const userAtom = atom({ factory: (ctx) => ({ name: 'Alice' }) });
const nameAtom = atom({ deps: { userAtom }, factory: ({ userAtom }) => userAtom.name });

Controller Migration

# Before
import { executor } from '@pumped-fn/core-next';

const fetchUser = executor.lazy(async (ctl, id: string) => {
  const response = await fetch(`/api/users/${id}`);
  return response.json();
});

// After
import { controller } from '@pumped-fn/lite';

const fetchUser = controller(async (ctx, id: string) => {
  const response = await fetch(`/api/users/${id}`);
  return response.json();
});

Troubleshooting

TypeScript errors after migration:

  • Check migration-report.md for edge cases
  • Review type transforms for Core.ExecutorLite.Atom
  • Ensure @pumped-fn/lite is installed

Transforms not applied:

  • Verify file patterns match (.ts, .tsx files)
  • Check for syntax errors in source files
  • Use --verbose to see transform details

Need to revert:

git checkout .