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

use-everywhere-codemod

v0.2.0

Published

Codemod for the use-everywhere 1.0 renames: rewrites the 0.x names to their 1.0 spellings

Readme

use-everywhere-codemod

The codemod for the use-everywhere 1.0 renames. Five exports and three types changed name between 0.x and 1.0 (RFC 0001); this rewrites a codebase from the old spellings to the new ones, and changes nothing else.

npx use-everywhere-codemod rename-1.0 src/

| 0.x | 1.0 | | -------------------- | ------------------------- | | useMessage | useOnMessage | | useOpenedWindow | useWindowResult | | defineStore | createStoreHooks | | useSharedStore | useSharedSelector | | StoreHooks.get() | StoreHooks.store() | | UseMessageOptions | UseOnMessageOptions | | DefineStoreOptions | CreateStoreHooksOptions | | UseOpenedWindow | UseWindowResult |

The hook defineChannel hands back is renamed with the standalone one: shop.useMessage(...) becomes shop.useOnMessage(...).

What it does

Pass files or directories. Directories are walked for .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts and .cts; node_modules and dot-directories are skipped. --dry-run lists what would change and writes nothing, and --version prints the installed version.

The transform edits identifiers in place over the TypeScript syntax tree, so formatting, comments and every other byte come back exactly as they were — the diff is the renames and only the renames. It covers:

  • import { useMessage } from 'use-everywhere' and every reference to the binding. An aliased import (useMessage as onMessage) changes only the imported name; the alias keeps working.
  • import * as ue and require('use-everywhere'), in both destructured and whole-module form.
  • export { useMessage } from 'use-everywhere' in a barrel, rewritten as export { useOnMessage as useMessage } so the barrel's own surface is untouched.
  • StoreHooks.get(), ChannelHooks.useMessage() and the ReactNamespace members, wherever the receiver was built from the factory in the same file (or is the factory call itself). .defineStore and .useSharedStore are distinctive enough to rename on any receiver that is not a namespace import of another module.

What it leaves for you

A .useMessage(...) call on a receiver the transform cannot attribute — a channel imported from another file — is reported, not rewritten: message.useMessage() is antd, and .get() is every Map, so neither can be renamed on shape alone. The command prints each one with its file and line.

Values are not typed, so a hook stored under a different name (const listen = useMessage) is renamed at the assignment and nowhere else, which is correct: listen is still listen.

Programmatic use

import { transform } from "use-everywhere-codemod";

const { source, changed, warnings } = transform(code, "Cart.tsx");

run({ paths, dryRun, cwd }) is the same walk the command line performs.

Docs

License

MIT