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

echo-effect

v0.0.12

Published

`EchoEffect` is a powerful dependency impact analysis tool designed for the entire frontend ecosystem. It helps developers understand the ripple effects of code changes across their projects by mapping and analyzing dependency chains.

Readme

echo-effect

npm version npm downloads bundle JSDocs License

EchoEffect is a powerful dependency impact analysis tool designed for the entire frontend ecosystem. It helps developers understand the ripple effects of code changes across their projects by mapping and analyzing dependency chains.

Key Features

  • Git Staged File Analysis: Focuses specifically on the changes you're about to commit.
  • Comprehensive Dependency Mapping: Leverages dependency-cruiser to understand import/export relationships in:
    • JavaScript (.js, .jsx)
    • TypeScript (.ts, .tsx)
    • Vue.js Single File Components (.vue)
    • ES Modules (.mjs) and CommonJS (.cjs)
  • Advanced Vue.js & Nuxt.js Support:
    • Parses <template> sections in .vue files to identify component dependencies.
    • Intelligently resolves components from unplugin-vue-components.
    • Prompts to install necessary Vue parsing dependencies (@vue/compiler-sfc, @vue/compiler-dom) if missing.
  • Impact Level Reporting: Clearly visualizes the chain of impact:
    • Level 0: Your directly modified staged files.
    • Level 1+: Files that depend on Level 0 files, and so on, up to a configurable depth.
  • CLI Interface: Easy to integrate into your development workflow.

How It Works

  1. Identifies Staged Files: Runs git diff --name-only --cached --diff-filter=AM to get a list of added or modified files in your Git staging area.
  2. Builds Dependency Graph: Scans your project from a specified entry point using dependency-cruiser to map out all module dependencies. For Vue/Nuxt projects, it performs additional parsing for template components.
  3. Constructs Reverse Dependency Graph: Inverts the dependency map to understand "who depends on whom."
  4. Calculates Impact: Compares the staged files against the reverse dependency graph to trace and report all affected files.
  5. Prints Report: Outputs a clear, color-coded report to the console, detailing the modified and affected files.

Usage

Navigate to your project's root directory and run:

npx -y echo-effect <path-to-your-project-entry-folder>

For example:

# For a project with src/main.ts as an entry point
npx -y echo-effect src/main.ts

Why Echo Effect?

  • Proactive Risk Assessment: Understand the potential blast radius of your changes before you commit or push.
  • Focused Code Reviews: Helps reviewers concentrate on the most critical areas affected by a change.
  • Enhanced Codebase Understanding: Provides insights into the interconnectedness of your project's modules.
  • Safer Refactoring: Make larger changes with more confidence by seeing their downstream effects.

Testing

The project includes comprehensive test coverage for the core scanFile functionality:

Test Categories

  • Basic Functionality: Single file scanning, multiple file scanning, file extension handling
  • Edge Cases: Non-existent files, empty dependencies, node_modules filtering
  • Vue Component Parsing: SFC component resolution, duplicate component handling
  • Path Handling: TypeScript path alias resolution, relative path processing

Running Tests

npm test

Tests use Vitest with proper mocking of file system operations and external dependencies.

License

MIT License © huali