推移的依存関係 - CI/CD 用語集の定義
推移的依存関係 とは、あなたが直接必要としてはいないものの、直接の依存関係の一つが引き込むパッケージです。A をインストールし、A が B を必要とする場合、B は推移的です。
なぜ厄介なのか
node_modules ツリーの大部分は推移的です。graph の深い場所にある脆弱性や破壊的変更は、あなたがそのパッケージを一度も指定していなくても build を壊すことがあり、だからこそ lockfile はすべての推移的なバージョンを記録します。
調査する
npm ls <pkg> または pip show を実行すると、なぜあるパッケージが存在するのか、どの親がそれを要求したのかがわかります。
関連ガイド
Dependency Graph - CI/CD Glossary DefinitionDependency Graph: A dependency graph is the directed graph of which packages depend on which others, used by…
Peer Dependency - CI/CD Glossary DefinitionPeer Dependency: A peer dependency is a package your library expects the host project to provide rather than…
Dependency Pinning - CI/CD Glossary DefinitionDependency Pinning: Dependency pinning is locking a dependency to one exact version (for example `lodash@4.17…