New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pnpm-multi-versions

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pnpm-multi-versions

Find multiple versions of dependencies from pnpm lockfile.

latest
Source
npmnpm
Version
0.6.1
Version published
Maintainers
1
Created
Source

pnpm-multi-versions

npm version npm downloads Unit Test

Find multiple versions of dependencies from pnpm lockfile.

Install

npm i pnpm-multi-versions

Usage

CLI

pnpx pnpm-multi-versions

# Multiple versions packages:
#   pkg-types: 1.3.1, 2.3.0
#   quansync: 0.2.11, 1.0.0

# Show dependents for each version
pnpx pnpm-multi-versions --dependents

# Single package:
# pkg-types
# ├─ 1.3.1  mlly@1.8.0
# └─ 2.3.0  c12@3.3.3, local-pkg@1.1.2, nypm@0.6.2
#
# Multiple packages:
# ┌─ pkg-types
# │  ├─ 1.3.1  mlly@1.8.0
# │  └─ 2.3.0  c12@3.3.3, local-pkg@1.1.2, nypm@0.6.2
# └─ quansync
#    ├─ 0.2.11  local-pkg@1.1.2
#    └─ 1.0.0  @quansync/fs@1.0.0, unconfig-core@7.4.2

API

const lockfile = await readLockfile('pnpm-lock.yaml')
const { versionsMap, dependentsMap, multipleVersions } = pnpmMultiVersions(lockfile, {
  /** Ignore major version difference */
  ignoreMajor: false,
  /** Show dependents for each version */
  dependents: true,
})

console.log(versionsMap)
// Map(2) {
//   "pkg-types" => Set(2) { '1.3.1', '2.3.0' },
//   "quansync" => Set(2) { '0.2.11', '1.0.0' },
//   ...
// }

console.log(dependentsMap)
// Map(2) {
//   "pkg-types" => Map(2) {
//     "1.3.1" => Set(1) { 'mlly@1.8.0' },
//     "2.3.0" => Set(3) { 'c12@3.3.3', 'local-pkg@1.1.2', 'nypm@0.6.2' }
//   },
//   "quansync" => Map(2) {
//     "0.2.11" => Set(1) { 'local-pkg@1.1.2' },
//     "1.0.0" => Set(2) { '@quansync/fs@1.0.0', 'unconfig-core@7.4.2' }
//   }
// }

console.log(multipleVersions)
// Set(2) { 'pkg-types', 'quansync' }

Sponsors

License

MIT License © 2025 Kevin Deng

FAQs

Package last updated on 27 Feb 2026

Did you know?

Socket

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.

Install

Related posts