
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Fetch package metadata from the npm registry. Supports scopes and private registries. If you only need the metadata of a specific version, use packument-package.
const packument = require('packument')
packument('levelup', (err, result) => {
if (err) throw err
console.log(result.versions['2.0.2'].dependencies)
})
packument(name[, opts], callback)Callback receives an error if any, a packument and response headers. Options:
headers: custom headers (you can override any)keepAlive: shortcut for headers: { connection: 'keep-alive' }full: if true, fetch full metadata rather than an abbreviated document.packument = packument.factory(opts)Preconfigure the function. For example, to always fetch full metadata:
const packument = require('packument').factory({ full: true })
packument('levelup', (err, result) => {
if (err) throw err
console.log(result._rev)
})
Combine it with an in-memory cache:
const memoize = require('thunky-with-args')
const packument = memoize(require('packument').factory({ full: true }))
packument('levelup', (err, result) => {
// It will make only one request
})
packument('levelup', (err, result) => {
// Subsequent calls for the same package are cached
})
Reuse that cache in other modules:
const memoize = require('thunky-with-args')
const packument = memoize(require('packument'))
const getPackage = require('packument-package').factory(packument)
getPackage('levelup', '~2.0.0', function (err, pkg) {
if (err) throw err
console.log(pkg.version)
})
With npm do:
npm install packument
MIT © Vincent Weevers
FAQs
Fetch package metadata from the npm registry
The npm package packument receives a total of 3,544 weekly downloads. As such, packument popularity was classified as popular.
We found that packument 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.