Viewing All Versions of an NPM Package (Including Pre-Release)

If you want to view all released versions of an npm package, there’s an easy way to do it:

npm show react-native@* version

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
react-native@0.0.0 '0.0.0'
react-native@0.0.5 '0.0.5'
react-native@0.0.6 '0.0.6'
react-native@0.1.0 '0.1.0'
react-native@0.2.0 '0.2.0'
react-native@0.2.1 '0.2.1'
react-native@0.3.0 '0.3.0'
react-native@0.3.1 '0.3.1'
react-native@0.3.2 '0.3.2'
react-native@0.3.3 '0.3.3'
react-native@0.3.4 '0.3.4'
react-native@0.3.5 '0.3.5'
react-native@0.3.6 '0.3.6'
react-native@0.3.7 '0.3.7'
react-native@0.3.8 '0.3.8'
react-native@0.3.9 '0.3.9'
react-native@0.3.10 '0.3.10'
react-native@0.3.11 '0.3.11'
react-native@0.4.0 '0.4.0'
react-native@0.4.1 '0.4.1'
react-native@0.4.2 '0.4.2'
react-native@0.4.3 '0.4.3'
react-native@0.4.4 '0.4.4'
react-native@0.5.0 '0.5.0'
react-native@0.6.0 '0.6.0'
react-native@0.7.1 '0.7.1'

However, this doesn’t show pre-release versions. If you want to see everything, there’s an equally easy (but undocumented) command:

npm show react-native versions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[ '0.0.0',
  '0.0.5',
  '0.0.6',
  '0.1.0',
  '0.2.0',
  '0.2.1',
  '0.3.0',
  '0.3.1',
  '0.3.2',
  '0.3.3',
  '0.3.4',
  '0.3.5',
  '0.3.6',
  '0.3.7',
  '0.3.8',
  '0.3.9',
  '0.3.10',
  '0.3.11',
  '0.4.0',
  '0.4.1',
  '0.4.2',
  '0.4.3',
  '0.4.4',
  '0.5.0-rc1',
  '0.5.0',
  '0.6.0-rc',
  '0.6.0',
  '0.7.0-rc',
  '0.7.0-rc.2',
  '0.7.1',
  '0.8.0-rc' ]

This is super useful for finding what beta/pre-release versions of a package are available.

You can also run npm show react-native versions --json for machine readable output.

I am now accepting new clients for part-time consulting and software development projects. Learn more

I haven't configured comments for this blog, but if you want to get in touch, you can find me on Twitter