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

@codelaw/rules-deps

v0.4.3

Published

codelaw's dependency rules: vulnerable packages and the version to move to, latest versions, the snapshot they read (SR-RULE-PACKS)

Readme

@codelaw/rules-deps

codelaw's dependency rules — one of the first-party rule packs (SR-RULE-PACKS decision 15), on npm and PyPI (codelaw-rules-deps). It tells you, and your coding agent, which npm and Python dependencies are vulnerable and the exact version to move to, and which are behind their latest release.

codelaw init adds it when the repo has a package.json or pyproject.toml.

# codelaw.toml
extends = ["codelaw:deps/recommended"]
preview = true   # every rule is `preview` until a corpus run promotes it
npm i -D @codelaw/rules-deps      # or
pip install codelaw-rules-deps
codelaw deps refresh              # the one command that reads the network

Presets

| preset | rules | what it holds | |---|---|---| | deps/recommended | 4 | Vulnerable and outdated dependencies of package.json and pyproject.toml, from the committed snapshot codelaw deps refresh writes |

Rules

| rule | fix | what it reports | |---|---|---| | deps/vulnerable | suggest (manual with no clean version) | a version in use, direct or transitive, that an advisory affects, with the lowest known-clean version to move to | | deps/incomplete-scan | manual | an enabled advisory source the last refresh could not read | | deps/outdated | suggest | a dependency behind its latest version, or a deprecated or yanked one (was data/outdated-dependency) | | deps/stale-snapshot | manual | a snapshot older than [deps] max_snapshot_age, or one that cannot be read (was data/stale-deps-snapshot) |

How it works

The rules read .codelaw/deps-snapshot.json, which codelaw deps refresh writes and the project commits, and the lockfiles — never the network, so codelaw check gives the same answer offline and in CI.

  • Advisory sources are [deps] advisory_sources, each on or off: registry (the npm registry and Python index you already install from) first, then osv (https://api.osv.dev), or a mirror of either. Every enabled source is read and merged — the safer answer wins. A source that cannot be read is recorded, and deps/incomplete-scan says so.
  • The version to move to is the lowest version every advisory leaves clean and some source actually covered, inside the major in use first.
  • Agents ask check_dependency (MCP) or codelaw deps check before adding a package; [deps] agent sets, per severity, whether the hooks only inform or also block.

The pack holds no advisory data: the snapshot keeps ids, ranges, versions, a severity, a URL and the sources' names — never an advisory's text.