Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Node.js Package MetricsNew to Visual Studio Code? Get it now.
Node.js Package Metrics

Node.js Package Metrics

Node Package Metrics

|
3,366 installs
| (0) | Free
Displays node package metrics
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-package-metrics

Visual Studio Code extension that collects and displays metrics, vulnerabilities and licenses found in a Node.js project.

Features

Explore dependencies

Explore the dependencies and sub-dependencies of the analyzed package in your sidebar.

dependency tree

Display metrics, used license and found vulnerabilities

See the collected scores, found vulnerabilities and the used license for a package in a single report view.

report view

See which dependency contains vulnerabilities

If an analyzed dependency contains a vulnerability, it will be visible in your Problems-Panel and the package.json.

editor vulnerability highlight

Usage

To run the extension, open a package.json file in your editor and click the 'Run Package Metrics' button in the 'Node Packages' section of the explorer side bar.

run metrics

To display the results view for a dependency, click on the entry in the 'Node Packages' explorer tree view.

Requirements

To analyze a project, it is required that its dependencies are installed. Hence, to use the extension functionality, run npm install or yarn first.

Extension Settings

This extension contributes the following settings:

  • packageMetrics.debug: enable/disable debug log output.
  • packageMetrics.depth: how deep the dependencies of a project are analyzed. If the extension takes too long to run, reduce the depth to limit the number of dependencies analyzed.
  • packageMetrics.packageManager: the extension can detect the package manager used. Use this setting to override it.

Known Issues

  • Only dependent packages hosted on npm can be analyzed.
  • High numbers of analyzed packages can lead to network timeouts. Reduce the depth of the analysis in the settings to mitigate this.

Release Notes

1.0.0

Initial release.

Development

Installation

Installation should be done through the project root.

Building and Testing

For all available commands and their variations, refer to the scripts section in package.json.

# Build the package
npm run build

# Run the build task in watch mode
npm run watch

# Tests (see remarks below)
npm run test

# Lint
npm run lint

# Clean compilation output
npm run clean

Important note for tests: Due to restrictions in stable VS Code builds, you cannot run tests from the command line while running a VS Code instance. Therefore, using the Extension Tests Tasks from VS Code is recommended. More information can be found in the VS Code documentation.

Running the Extension

To run the extension, execute the Launch Extension task.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft