# ls-remote-versions

> [![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)

Latest version **3.0.1** (published 2021-08-22) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ls-remote-versions
pnpm add ls-remote-versions
yarn add ls-remote-versions
bun add ls-remote-versions
```

Provides the command `ls-remote-versions`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2021-08-22 |
| First published | 2018-03-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=16.0.0 |
| Dependencies | 6 |
| Unpacked size | 604 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | glenn-hinks |
| Keywords | ls, versions, find, module |

## Links

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

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) >=4.17.21
- [semver](https://npm.io/package/semver.md) 7.3.5
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [registry-url](https://npm.io/package/registry-url.md) ^6.0.0
- [npm-package-arg](https://npm.io/package/npm-package-arg.md) ^8.0.0
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^3.0.0

## Recent versions

- 3.0.1 (latest) — 2021-08-22
- 3.0.0 — 2021-08-22
- 2.0.3 — 2021-07-05
- 1.4.35 — 2021-03-24
- 1.4.31 — 2021-01-05
- 1.4.29 — 2020-12-15
- 1.4.23 — 2020-10-20
- 1.4.21 — 2020-09-26
- 1.4.19 — 2020-08-12
- 1.4.17 — 2020-07-21
- 1.4.10 — 2020-04-02
- 1.4.7 — 2020-03-15
- 1.4.6 — 2020-03-05
- 1.4.5 — 2020-02-01
- 1.4.2 — 2020-01-01
- … 15 more at https://npm.io/package/ls-remote-versions/versions

## README

# ls-remote-versions

[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)

![ci](https://github.com/ghinks/ls-remote-versions/workflows/ci/badge.svg)

A tool to list the versions available on your registry by semver range. Great for all those **behind the firewall** as you may not have all
the versions that the public registry has.

## installation

npm install -g ls-remote-versions

## usage

```
ls-remote-versions <package-name>
```

example


```
ls-remote-versions express
```

will list all of the versions of express in your registry satisfying the semver range as implemented in [semver](https://www.npmjs.com/package/semver)


example
```
ls-remote-versions express 4
```

example
```
ls-remote-versions express '4.0.x'
```

example
```
ls-remote-versions express '4 - 5'
express
4.15.0
4.15.1
4.15.2
4.15.3
4.15.4
4.15.5
...
```

will list all of the versions of express in your registry that match the semver range 4

This may be used as part of a program

```
import ls from "ls-remote-versions/src/index.js";

ls('debug', '2').then(result => console.log(result));
```
Note the importing code type is specified as a module. 

### Advanced usage to diff registries

```
ls-remote-versions <package-name> -r otherRegistryUrl
```

example
```
ls-remote-versions node-sass -r http://localhost:4873
```

This will log out all the registry and diff versions in the alternate registry.
In this case a local registry hosted using [verdaccio](https://www.npmjs.com/package/verdaccio)


<p align="center">
	<img src="https://cdn.rawgit.com/ghinks/ls-remote-versions/feature/lsr-alt-reg-gif/lsr-alt-registry.gif">
</p>

## features

- tested on node 14 onwards
- alternative to npm view <package-name> versions which does not search
- great for corporate use behind the firewall
- takes semver range as a second arg to enable registry searches
- use the registry as defined in **npm config get registry**
- can be required in a program


## notes

This is a search based alternative to npm view <package-name> versions tool.

This tool is intended to aid the diagnosis of installation issues for users using a private registry. That may not have
all the versions of a package that are available on the public registries.

It will use the registry set in the npm configuration ( usually registry.npmjs.org, but which can be set to anything )

Please use npm config list or npm config get registry to see your current settings.

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