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

@zbwer/analysis-tool

v1.1.0

Published

Analyze the dependency relationships in package-lock.json

Readme

🎉 开始使用

  1. npm install @zbwer/analysis-tool

  2. npx zbwer-cli 查看所有命令.

  3. npx zbwer-cli analyze 分析依赖.

🎨 Demo 展示

📝 目录结构

  │   index.js                // 入口函数, 用于处理命令接收参数
  │   package.json            // 项目信息
  │
  ├───dist
  │   │   index.html          // 前端可视化基本文件
  │   │
  │   └───js
  │           axios.min.js
  │           echarts.min.js
  │           macarons.js     // Eaharts 主题
  │           renderEcharts.js// 前端渲染主文件
  │
  └───src
   │   analysis.js         // 分析依赖并生成json数据
   │   server.js           // 启动Express服务
   │
   └───data                // 零时存放生成的json数据

🎯 TODO

目前已实现:

  1. 分析依赖关系 / 版本冲突 / 已解决循环依赖的问题

  2. 使用 Echarts 对 【依赖关系】进行了可视化

更多功能:

  1. 后端
  • [ ] index.js :对于通过命令传入的 depth 和 jsonfile 参数并未做处理
  • [ ] 仅对 dependencies 进行了处理,未考虑开发环境中的依赖,这可能导致了孤立依赖的处理
  • [ ] analysis.js : fs 模块使用上存在一定的冗余
  • [ ] 【共享的依赖】的判定存在问题,例如a 和 b 都是项目的直接依赖,但是 a 又是 b的依赖,会导致 a整体变为共享依赖,在可视化效果上存在问题,可能需要与前端讨论一下.
  • [ ] server.js :采用的是express搭建服务,或许可以考虑使用原生 http 来优化包的大小

2.前端

  • [ ] 对于 【版本冲突】 的依赖未作可视化处理(不知道用什么结构)
  • [ ] 对于 【孤立依赖】可能需要结合后端方面讨论选择更好的展示方式?
  • [ ] 对于 【共享的依赖】渲染存在一定问题.
  • [ ] 其他用户体验方面的细节....