history

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Dependency History

依赖项历史

Understand how and why dependencies changed over time.
了解依赖项随时间推移的变更方式及原因。

Commands

命令

Show change history for a package (or all packages):
bash
git-pkgs history lodash
git-pkgs history
List commits that modified dependencies:
bash
git-pkgs log
Show who added each dependency:
bash
git-pkgs blame
Show why a dependency was added (commit, author, message):
bash
git-pkgs why lodash
git-pkgs why pkg:npm/lodash
Binary search for a dependency-related change (like
git bisect
but only considers dependency commits):
bash
git-pkgs bisect start
git-pkgs bisect good v1.0.0
git-pkgs bisect bad HEAD
Show aggregate dependency statistics:
bash
git-pkgs stats
查看某个包(或所有包)的变更历史
bash
git-pkgs history lodash
git-pkgs history
列出修改过依赖项的提交
bash
git-pkgs log
查看每个依赖项的添加者
bash
git-pkgs blame
查看依赖项被添加的原因(提交记录、作者、提交信息):
bash
git-pkgs why lodash
git-pkgs why pkg:npm/lodash
二分查找与依赖项相关的变更(类似
git bisect
,但仅考虑修改依赖项的提交):
bash
git-pkgs bisect start
git-pkgs bisect good v1.0.0
git-pkgs bisect bad HEAD
查看汇总的依赖项统计数据
bash
git-pkgs stats

When to use

使用场景

  • When investigating when or why a dependency was added
  • When finding who to ask about a specific package
  • When tracking down when a dependency change caused a problem
  • When reviewing the overall dependency change velocity of a project
  • 调查依赖项何时或为何被添加时
  • 需要找到可咨询特定包相关问题的人员时
  • 追踪依赖项变更何时引发问题时
  • 审查项目整体依赖项变更速度时