15

i want to use pre-release versions in my package.json to get some dependencies in the latest version (containing als pre-releases) but for some reasons it doesn't work in my case. The pre-releases are fully ignored. As an example lets use angular. If I ask "angular": ">=1.4.0-rc.0 <1.4.1" as an dependency, i would expect that i would get the version 1.4.0-rc.2 installed, but i get just the version 1.4.0.

The npm info angular shows, that there are some rc versions available like

...
'1.4.0-beta.4',
'1.4.0-beta.5',
'1.4.0-beta.6',
'1.4.0-rc.0',
'1.4.0-rc.1',
'1.4.0-rc.2',

My package.json looks as follows right now

"dependencies": {
   "angular": ">=1.4.0-rc.0 <1.4.1"
}

Any ideas why i dont get any rc versions? What do i have to do to get it working?

vucalur
  • 6,007
  • 3
  • 29
  • 46
Michael
  • 173
  • 1
  • 1
  • 7

1 Answers1

14

This seems logical, the order of versions is normally the following (for angular releases 1.4.x):

  1. 1.4.0-beta.0
  2. 1.4.0-beta.2
  3. 1.4.0-beta.3
  4. 1.4.0-beta.4
  5. 1.4.0-beta.5
  6. 1.4.0-beta.6
  7. 1.4.0-rc.0
  8. 1.4.0-rc.1
  9. 1.4.0-rc.2
  10. 1.4.0
  11. 1.4.1

If you request "angular": ">=1.4.0-rc.0 <1.4.1", The latest version that is less strictly 1.4.1 is 1.4.0

Anyway, if you demand "angular": ">=1.4.0-rc.0 <1.4.0", the latest version will be 1.4.0-rc.2

arogachev
  • 33,150
  • 7
  • 114
  • 117
forresst
  • 320
  • 3
  • 8
  • Yes you are right, i've realized the same several minutes ago ... at the beginning its somehow confusing, but when really thinking about it, it's obvious :-) – Michael Oct 06 '15 at 12:21