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

impact-analysis

v2.0.8

Published

Analyze real impact of code changes using dependency graphs

Readme

Impact Analysis

npm version License: MIT TypeScript

Analyze the real impact of code changes in JavaScript, TypeScript, React, Vue, and Angular projects.

Keywords: impact-analysis · dependency-graph · code-analysis · static-analysis · react · vue · angular · typescript · ast · ast-parser · code-impact · dependency-tracker · git-diff · change-analysis


Features

  • Smart Dependency Analysis
  • Visual Reports - Beautiful HTML reports with interactive dependency graphs
  • Fast with Caching - Caches dependency graphs for quick re-analysis
  • AI Explanations - Get AI-powered insights using Google Gemini
  • React Support - Full support for .js, .jsx, .ts, .tsx files
  • Angular Support - Supports TypeScript components
  • Vue Support - Full support for Vue SFCs including
  • Risk Scoring - Automatic LOW/MEDIUM/HIGH risk classification

Installation

npm install -g impact-analysis

Or use locally in a project:

npm install --save-dev impact-analysis

For pnpm:

pnpm add -D impact-analysis

Usage

Basic Analysis

# Analyze changes compared to main branch
impact-analysis

# Compare against a different branch
impact-analysis develop

# Open HTML report in browser
impact-analysis --html

# Clear cache and rebuild dependency graph
impact-analysis --clear-cache

AI Explanations (If you really want to get an AI powered analysis)

To enable AI-powered impact explanations:

  1. Get a free API key from Google AI Studio
  2. Create a .env file in your project root:
    GEMINI_API_KEY=your-api-key-here
  3. Run with --ai flag:
    impact-analysis --ai

Note: AI features are completely optional. The tool works perfectly without an API key.

How It Works

  1. Scans your repository for all files
  2. Builds a dependency graph using AST parsing
  3. Detects changed files using Git diff
  4. Analyzes which files import the changed files
  5. Generates an HTML report with interactive visualization

Supported Import Formats

  • ES6 imports: import x from './module'
  • Dynamic imports: import('./module')
  • CommonJS: require('./module')
  • Export from: export { x } from './module'
  • Export all: export * from './module'
  • Path aliases: @/, ~/, #, tsconfig paths

Path Alias Support

The tool automatically resolves:

  • @/components/Headercomponents/Header
  • ~/utils/helperutils/helper
  • #components/Footercomponents/Footer
  • Custom tsconfig paths

Output

Console Output

Scanning repository...
Building dependency graph from 850 files...
Dependency graph built: 543 files with dependencies
Getting changed files against main...
Found 2 changed files. Analyzing impact...

--- Impact Analysis Results ---

1. Dashboard.vue
   Risk: HIGH
   Impacted files: 12
     - Header.vue
     - Layout.vue
     - NavBar.vue
     ... and 9 more

Generating HTML report...
Report saved: impact-analysis.html

HTML Report

Interactive visualization with:

  • Graph View: Visual dependency network
  • Table View: Detailed file-by-file breakdown
  • Clickable nodes and expandable lists

Requirements

  • Node.js 18+
  • Git (for change detection)
  • A Git repository

License

MITbash npm install -g impact-analysis