atom / apm

Atom Package Manager
https://atom.io/packages
MIT License
1.26k stars 295 forks source link

apm can't install a version that is more than [pagination limit] behind the latest #733

Open lee-dohm opened 7 years ago

lee-dohm commented 7 years ago

Prerequisites

Description

Running apm install autocomplete-python@1.8.11 results in an error even though the version is listed in the database.

Steps to Reproduce

  1. Open a terminal session
  2. Execute apm install autocomplete-python@1.8.11

Expected behavior: autocomplete-python v1.8.11 to be installed

Actual behavior: Package version: 1.8.11 not found error returned

Versions

Atom    : 1.20.0-dev-57e023e74
Electron: 1.6.9
Chrome  : 56.0.2924.87
Node    : 7.4.0
apm  1.18.3
npm  3.10.10
node 6.9.5 x64
python 2.7.13
git 2.13.3

Additional Information

I suspect this is because the results from the API aren't paginated.

50Wliu commented 6 years ago

The atom.io API doesn't have the ability to paginate, so this seems to be a problem with atom.io rather than apm. If it can paginate, then the documentation needs to be updated.

alangpierce commented 6 years ago

Rather than relying on pagination, it looks like it should be possible to fall back to the endpoint for that specific version, e.g. https://atom.io/api/packages/autocomplete-python/versions/1.8.11

I'm working on a PR to do that, and should be able to put something up shortly.