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

depretec

v0.2.3

Published

Find @deprecated JSDoc usages in your JS/TS project and map them to their replacements.

Readme

depretec

Find @deprecated JSDoc usages in your JS/TS project and map them to their replacements.

  • Scans your source and your node_modules types for @deprecated symbols.
  • Extracts the replacement hint from both {@link X} and free-text ("Use X instead", "Replaced by X", "Prefer X").
  • Outputs a pretty table, JSON (LLM-friendly), or Markdown (PR-friendly).
  • Zero config. Respects your .gitignore and tsconfig.json, skips @generated files.

Install / run

# no install
npx depretec
bunx depretec

# or pin it
bun add -D depretec

Example: zod v4

src/schema.ts:

import { z } from 'zod'
export const Schema = z.object({
  email: z.string().email(),
  site: z.string().url(),
})
$ npx depretec
┌───────────────────┬─────────────────┬───┬─────────────┐
│ Location          │ Deprecated      │ → │ Replacement │
├───────────────────┼─────────────────┼───┼─────────────┤
│ src/schema.ts:3:21│ ZodString.email │ → │ z.email()   │
├───────────────────┼─────────────────┼───┼─────────────┤
│ src/schema.ts:4:20│ ZodString.url   │ → │ z.url()     │
└───────────────────┴─────────────────┴───┴─────────────┘

Feed it to an LLM

npx depretec --format json | llm -s "Apply these replacements to the files."

Options

Usage: depretec [paths...] [options]

Options:
  -f, --format <fmt>   pretty | json | md            (default: pretty)
  -p, --project <p>    path to tsconfig.json         (default: auto-detect)
      --include <g>    extra glob (repeatable)
      --exclude <g>    exclude glob (repeatable)
      --no-deps        only scan user source, skip node_modules
      --fail-on-found  exit 1 if any occurrence      (for CI)
  -h, --help
  -v, --version

Positional paths pick the project root (first path wins). Defaults to cwd.

Programmatic API

import { scan } from 'depretec'

const report = await scan({ cwd: './my-project' })
for (const o of report.occurrences) {
  console.log(`${o.file}:${o.line} ${o.deprecation.qualifiedName} → ${o.deprecation.replacement ?? '?'}`)
}

How it works

Two passes over a TypeScript Program built via ts-morph:

  1. Collect every declaration (function, method, class, property, variable, type, interface, enum, accessors) that carries a @deprecated JSDoc tag — both in your source and in dep .d.ts.
  2. Match every identifier in your source against those declarations using the TypeScript type checker (follows re-exports, resolves property access through method chains like z.string().email()).

Replacement extraction tries, in order: {@link X} / {@linkcode X} / {@linkplain X}, then free-text heuristics (use \X`, replaced by `X`, prefer `X``, and bareword variants).

Non-goals (for now)

  • Auto-fix / write files (planned for --fix).
  • .vue / .svelte / .astro.
  • Runtime deprecation detection.

License

MIT