
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
package-json-analyzer
Advanced tools
A tool for analyzing npm dependencies and generating a detailed report.
This project is a tool for analyzing dependencies from a package.json
file. It generates an HTML report that provides information about each dependency's repository. The report includes the star count, open issue count, last updated date, homepage (on both npm and GitHub), and the license type.
You can install this package via npm using the following command:
npm install package-json-analyzer
The main function getDependencyReport
requires three parameters:
packageJsonPath
: The path to the package.json
file to analyze.outputHtmlPath
: The path where the HTML report will be saved.githubToken
: Your GitHub personal access token. This is required to use GitHub's API to fetch repository information.Here's an example of how you could use this function:
import getDependencyReport from 'package-json-analyzer';
const packageJsonPath = './path/to/your/package.json';
const outputHtmlPath = './path/to/output/report.html';
const githubToken = 'your github token here';
getDependencyReport(packageJsonPath, outputHtmlPath, githubToken);
This will create an HTML report at the specified outputHtmlPath
. The report contains information about the dependency's GitHub and npm homepages, and the type of license.
A check is also performed on the type of license. Packages with licenses that may be considered risky for commercial development (like GPL, AGPL, SSPL) are highlighted. If such packages are found, their details will be displayed separately in the report.
Contributions are always welcome. Please make a pull request.
This project is licensed under the terms of the MIT license.
FAQs
A tool for analyzing npm dependencies and generating a detailed report.
The npm package package-json-analyzer receives a total of 3 weekly downloads. As such, package-json-analyzer popularity was classified as not popular.
We found that package-json-analyzer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.