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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rds-analyzer

v0.5.6-alpha

Published

A memory-efficient dependency analyzer for JavaScript, TypeScript, and Vue projects

Readme

RDS — Rust Dependency Scanner

A compact, developer-focused dependency analyzer for JavaScript, TypeScript, and Vue projects.

MIT License

What it does

  • Detect circular dependencies (default output).
  • Show full dependency tree when explicitly requested with --tree.
  • Watch mode with smart caching (--watch).

Quick examples

  • Analyze a directory (circulars only):

    rds src/

  • Show dependency tree (opt-in):

    rds src/ --tree

  • Fast CI check (fail on first circular):

    rds src/ --take 1 --throw

  • Run watch mode but first perform a full scan to ensure there are no pre-existing circulars:

    rds src/ --watch --pre-scan

Core flags (condensed)

  • <FILES>... — files or directories to analyze (required)
  • --tree — show dependency tree (opt-in)
  • --circular — show circular dependencies only
  • --take <N> — stop after finding N circulars
  • --throw — exit with code 1 if circulars found
  • --watch / -W — watch files and re-run analysis
  • --debounce <ms> — when used with --watch, wait this number of milliseconds after the last file change before triggering analysis (default: 300)
  • --cache / --no-cache — control file caching (default: enabled for --watch)
  • --log — enable verbose logging
  • -o, --output <FILE> — write results to JSON
  • --resolve-concurrency <N> — limit concurrent module resolution tasks (defaults to automatic tuning). Use this to control IO/concurrency during large analyses.
  • --pre-scan — when used with --watch, run a full initial analysis (circulars/tree) before starting watch mode; useful to ensure no existing circular dependencies are present since watch only re-scans changed files.

Note: If you use --watch, the --throw option is ignored. Watch mode is long-running and intended to keep the process alive while monitoring changes, so the tool will not exit the process on circulars when running under --watch. If you need a failing CI-style run, use --take/--throw without --watch or use --pre-scan with --watch and run a separate short-lived check.

Developer notes

  • CLI implementation: src/cli/mod.rs (current flags & defaults)
  • Parser registry: src/parser/mod.rs (runtime uses get_parser_for_extension)
  • Tree builder and analyzer: src/analyzer/tree and src/analyzer
  • Output backends: src/output

Testing & development

  • Run tests: cargo test --lib
  • Build release: cargo build --release

Acknowledgments

Inspired by the dpdm project: https://github.com/acrazing/dpdm


Made with ❤️ and Rust 🦀

Installation

  • From npm (recommended):

    npm install -g rds-analyzer

  • Use without installing:

    npx rds-analyzer --help

  • From source:

    git clone https://github.com/Khallister/rds.git
    cd rds
    
    # Build the native binary
    cargo build --release
    
    # Optionally create the npm package tarball (from repo root) and install locally
    # `npm pack` will generate a file like `rds-analyzer-<version>.tgz` based on package.json
    npm pack
    
    # Install the package locally (global) for testing the CLI runner
    npm install -g ./rds-analyzer-*.tgz
    
    # Or install as a dev dependency in a project
    npm install --save-dev ./rds-analyzer-*.tgz
    
    # binary: ./target/release/rds (packaging will include the native binary in the npm bundle)

Watch mode & caching

  • --watch enables file monitoring and re-analysis on changes.
  • By default, caching is enabled when using --watch to make incremental runs fast. Use --no-cache to disable caching for debugging.

Packaging & publishing

  • The npm package bundles a small JS runner and the native binary in bin/.
  • Use the included build scripts to cross-compile for multiple platforms when preparing releases.

Contributing

  • Add focused unit tests under src/*/tests.rs when changing behavior.

License

  • MIT