Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.11 KB

find-the-root-npm-package-to-update.mdx

File metadata and controls

33 lines (28 loc) · 1.11 KB
category cover created tags title
Tip
/assets/tips/find-root-package.png
2021-05-17
NPM
Find the root NPM package to update

If your repositories are stored on GitHub, you probably often receive notifications from GitHub asking to update a given npm package.

It's a great feature as GitHub keeps your repository up-to-date and provides the patches to fix possible security issues. However, it doesn't tell you the actual packages that need to be updated.

In order to see which the root package should be updated due to one of its dependencies updates, you can use the npm ls command.

$ npm ls acorn

├─┬ @11ty/[email protected]
│ └─┬ [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected] deduped
│   └── [email protected]
└─┬ @11ty/[email protected]
  └─┬ [email protected]
    ├─┬ [email protected]
    │ └─┬ [email protected]
    │   ├─┬ [email protected]
    │   │ └── [email protected]
    │   └── [email protected]
    └─┬ [email protected]
      └─┬ [email protected]
        └── [email protected]