Skip to content

feat: list global npm packages per Node.js version (#77)#80

Merged
mulhamna merged 4 commits into
mainfrom
feat/node-versions
Jun 21, 2026
Merged

feat: list global npm packages per Node.js version (#77)#80
mulhamna merged 4 commits into
mainfrom
feat/node-versions

Conversation

@mulhamna

Copy link
Copy Markdown
Owner

Summary

Changes

  • src/node-versions.js — detect installs from nvm, nvm-windows, fnm, volta, n, asdf, mise, nodenv (all keep globals under .../lib/node_modules, read with fs.readdirSync — no new deps). readGlobalPackages is a pure, dependency-injectable function (scope expansion + skip rules).
  • bin/pkgmap.jsnode-versions command with aliases nodes / nv and --json.
  • test/index.test.js — cover readGlobalPackages scope handling and skip rules.
  • README.md — document the command.

Test plan

  • node --test — 14 tests pass (2 new)
  • npm run lint + npm run format:check clean
  • Smoke: pkgmap node-versions, pkgmap nv --json, pkgmap nodes (empty-state message when no managed Node versions present)

@mulhamna mulhamna merged commit d0a4210 into main Jun 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Ability to list global packages across all installed Node.js versions

1 participant