# npm-package-versions

> Get an array of all available versions of a given npm package

Latest version **2.0.3** (published 2025-06-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install npm-package-versions
pnpm add npm-package-versions
yarn add npm-package-versions
bun add npm-package-versions
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2025-06-13 |
| First published | 2016-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Thomas Watson Steen |
| Maintainers | watson |
| Keywords | npm, version, versions, api |

## Links

- npm: https://www.npmjs.com/package/npm-package-versions
- Repository: https://github.com/watson/npm-package-versions
- Homepage: https://github.com/watson/npm-package-versions#readme
- Issues: https://github.com/watson/npm-package-versions/issues
- npm.io page: https://npm.io/package/npm-package-versions

## Recent versions

- 2.0.3 (latest) — 2025-06-13
- 2.0.2 — 2025-06-13
- 2.0.1 — 2025-06-13
- 2.0.0 — 2025-06-13
- 1.0.1 — 2017-09-21
- 1.0.0 — 2016-06-17

## README

# npm-package-versions

Get an array of all available versions of a given npm package.

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

## Installation

```
npm install npm-package-versions --save
```

## Usage

```js
const pkgVersions = require('npm-package-versions')

pkgVersions('bonjour', function (err, versions) {
  if (err) throw err
  console.log('Bonjour package versions available:')
  versions.forEach(function (version) {
    console.log('- %s', version)
  })
})
```

Optionally supply a custom registry URL (will default to `https://registry.npmjs.org` if not provided):

```js
pkgVersions('bonjour', 'https://registry.example.com', function (err, versions) {
  // ...
})
```

## API

### `pgkVersions.uri`

Set this property to overwrite the default registry URI.

Defaults to `https://registry.npmjs.org/`

### `pkgVersions.params`

Set the property to overwrite the default
[npm-registry-client](https://www.npmjs.com/package/npm-registry-client)
params for
[`client.get`](https://www.npmjs.com/package/npm-registry-client#clientgeturi-params-cb).

Defaults to `{}`.

## License

MIT

---
_Source: https://npm.io/package/npm-package-versions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
