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

@huckleberry-inc/check-npm-lockfile

v0.1.0

Published

Detect recently published npm packages in lockfiles for supply chain attack prevention

Readme

@huckleberry-inc/check-npm-lockfile

E2E Tests

lockfile 内の依存パッケージが最近公開されたものかを検出し、サプライチェーン攻撃を防止する CLI ツール

機能

  • lockfile (package-lock.json, yarn.lock) 内の全パッケージを npm registry に問い合わせ
  • 指定日数以内に公開されたパッケージを検出
  • 初版パッケージ (NEW) を識別
  • 検出時に exit code 1 で終了 (CI での利用を想定)
  • package-lock.json v1/v2+、yarn v1、yarn Berry に対応

使用方法

npx での実行

npx @huckleberry-inc/check-npm-lockfile

CI での使用例 (GitHub Actions)

- name: Check npm lockfile
  run: npx @huckleberry-inc/[email protected]

オプション指定

# 30日以内に公開されたパッケージを検出
npx @huckleberry-inc/check-npm-lockfile --minimum-release-age 30

# JSON 形式で出力
npx @huckleberry-inc/check-npm-lockfile --format json

# 特定の lockfile を指定
npx @huckleberry-inc/check-npm-lockfile path/to/yarn.lock

CLI オプション

| オプション | 型 | デフォルト | 説明 | |---|---|---|---| | [lockfile] | string | (自動検出) | lockfile のパス。未指定時は yarn.lock → package-lock.json の順で検出 | | --minimum-release-age <days> | number | 7 | 最小リリース経過日数。この日数以内に公開されたパッケージを検出 | | -f, --format <type> | string | console | 出力フォーマット: console または json | | -c, --concurrency <number> | number | 10 | npm registry API への最大同時リクエスト数 | | --no-exit-code | boolean | false | 最近のパッケージが見つかっても常に exit code 0 で終了 | | -v, --verbose | boolean | false | 詳細な進捗表示 |

開発

npm install
npm run build

テスト

npm run test:e2e

モック npm registry サーバーを使用した E2E テストが実行されます。npm の認証情報は不要です。

プロジェクト構成

src/
  index.ts              # Public API エクスポート
  cli.ts                # CLI エントリポイント
  analyzer/
    index.ts            # コア分析ロジック
  parsers/
    index.ts            # Parser エクスポート
    package-lock.ts     # package-lock.json パーサー (v1/v2+)
    yarn-lock.ts        # yarn.lock パーサー (v1/Berry)
  registry/
    index.ts            # Registry エクスポート
    npm-client.ts       # npm registry API クライアント
  output/
    index.ts            # Output ディスパッチャ
    console.ts          # プレーンテキスト出力
    json.ts             # JSON 出力
  types/
    index.ts            # TypeScript 型定義
tests/
  e2e.test.ts           # E2E テスト

ライセンス

MIT