Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding old versions #383

Closed
gokaygurcan opened this issue Oct 15, 2016 · 7 comments
Closed

Hiding old versions #383

gokaygurcan opened this issue Oct 15, 2016 · 7 comments

Comments

@gokaygurcan
Copy link

Hello,

When I type n ls into my terminal window, I get this:

    0.0.1
    0.0.2
    0.0.3
    0.0.4
    0.0.5
    0.0.6
    0.1.0
    0.1.1
    0.1.2
    0.1.3
    0.1.4
    0.1.5
    0.1.6
    0.1.7
    0.1.8
    0.1.9
    0.1.10
    0.1.11
    0.1.12
    0.1.13
    0.1.14
    0.1.15
    0.1.16
    0.1.17
    0.1.18
    0.1.19
    0.1.20
    0.1.21
    0.1.22
    0.1.23
    0.1.24
    0.1.25
    0.1.26
    0.1.27
    0.1.28
    0.1.29
    0.1.30
    0.1.31
    0.1.32
    0.1.33
    0.1.90
    0.1.91
    0.1.92
    0.1.93
    0.1.94
    0.1.95
    0.1.96
    0.1.97
    0.1.98
    0.1.99
    0.1.100
    0.1.101
    0.1.102
    0.1.103
    0.1.104
    0.2.0
    0.2.1
    0.2.2
    0.2.3
    0.2.4
    0.2.5
    0.2.6
    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.4.0
    0.4.1
    0.4.2
    0.4.3
    0.4.4
    0.4.5
    0.4.6
    0.4.7
    0.4.8
    0.4.9
    0.4.10
    0.4.11
    0.4.12
    0.5.0
    0.5.1
    0.5.2
    0.5.3
    0.5.4
    0.5.5
    0.5.6
    0.5.7
    0.5.8
    0.5.9
    0.5.10
    0.6.0
    0.6.1
    0.6.2
    0.6.3
    0.6.4
    0.6.5
    0.6.6
    0.6.7
    0.6.8
    0.6.9
    0.6.10
    0.6.11
    0.6.12
    0.6.13
    0.6.14
    0.6.15
    0.6.16
    0.6.17
    0.6.18
    0.6.19
    0.6.20
    0.6.21
    0.7.0
    0.7.1
    0.7.2
    0.7.3
    0.7.4
    0.7.5
    0.7.6
    0.7.7
    0.7.8
    0.7.9
    0.7.10
    0.7.11
    0.7.12
    0.8.0
    0.8.1
    0.8.2
    0.8.3
    0.8.4
    0.8.5
    0.8.6
    0.8.7
    0.8.8
    0.8.9
    0.8.10
    0.8.11
    0.8.12
    0.8.13
    0.8.14
    0.8.15
    0.8.16
    0.8.17
    0.8.18
    0.8.19
    0.8.20
    0.8.21
    0.8.22
    0.8.23
    0.8.24
    0.8.25
    0.8.26
    0.8.27
    0.8.28
    0.9.0
    0.9.1
    0.9.2
    0.9.3
    0.9.4
    0.9.5
    0.9.6
    0.9.7
    0.9.8
    0.9.9
    0.9.10
    0.9.11
    0.9.12
    0.10.0
    0.10.1
    0.10.2
    0.10.3
    0.10.4
    0.10.5
    0.10.6
    0.10.7
    0.10.8
    0.10.9
    0.10.10
    0.10.11
    0.10.12
    0.10.13
    0.10.14
    0.10.15
    0.10.16
    0.10.17
    0.10.18
    0.10.19
    0.10.20
    0.10.21
    0.10.22
    0.10.23
    0.10.24
    0.10.25
    0.10.26
    0.10.27
    0.10.28
    0.10.29
    0.10.30
    0.10.31
    0.10.32
    0.10.33
    0.10.34
    0.10.35
    0.10.36
    0.10.37
    0.10.38
    0.10.39
    0.10.40
    0.10.41
    0.10.42
    0.10.43
    0.10.44
    0.10.45
    0.10.46
    0.10.47
    0.11.0
    0.11.1
    0.11.2
    0.11.3
    0.11.4
    0.11.5
    0.11.6
    0.11.7
    0.11.8
    0.11.9
    0.11.10
    0.11.11
    0.11.12
    0.11.13
    0.11.14
    0.11.15
    0.11.16
    0.12.0
    0.12.1
    0.12.2
    0.12.3
    0.12.4
    0.12.5
    0.12.6
    0.12.7
    0.12.8
    0.12.9
    0.12.10
    0.12.11
    0.12.12
    0.12.13
    0.12.14
    0.12.15
    0.12.16
    4.0.0
    4.1.0
    4.1.1
    4.1.2
    4.2.0
    4.2.1
    4.2.2
    4.2.3
    4.2.4
    4.2.5
    4.2.6
    4.3.0
    4.3.1
    4.3.2
    4.4.0
    4.4.1
    4.4.2
    4.4.3
    4.4.4
    4.4.5
    4.4.6
    4.4.7
    4.5.0
    4.6.0
    5.0.0
    5.1.0
    5.1.1
    5.2.0
    5.3.0
    5.4.0
    5.4.1
    5.5.0
    5.6.0
    5.7.0
    5.7.1
    5.8.0
    5.9.0
    5.9.1
    5.10.0
    5.10.1
    5.11.0
    5.11.1
    5.12.0
    6.0.0
    6.1.0
    6.2.0
    6.2.1
    6.2.2
    6.3.0
    6.3.1
    6.4.0
    6.5.0
    6.6.0
    6.7.0
    6.8.0
    6.8.1 

(sorry for long break)

There're 310 versions in that list. If you check out this page, you'll see a release schedule of Node.js. The first 254 versions in the list are from 0.x era, furthermore, only 48 of them are 0.10.x and 17 of them are 0.12.x. There's also 19 of 5.x versions are in the list, which are completely out of scope.

In 2016, I don't -want to- believe anyone starts a project with a 0.8.x version which is more than 3 years old, or 5.x version which is not supported anymore, or a middle version when there is a more up to date one. So, they're just useless items in the list. Also, 0.10.x is at the end of its maintenance phase now, and in less than 2 months 0.12.x will also be in the same place.


My suggestion is to add an argument like --all (and/or -a) to show the list above, and in a normal usage, to hide all the unnecessary/inactive versions. Only the latest couple of releases from each supported version is enough to choose from.

So, something like this now:

    0.10.45
    0.10.46
    0.10.47
    0.12.14
    0.12.15
    0.12.16
    4.4.7
    4.5.0
    4.6.0
    6.7.0
    6.8.0
    6.8.1 

and something like this in two months:

    4.4.7
    4.5.0
    4.6.0
    6.7.0
    6.8.0
    6.8.1 
    7.0.0

So, what do you think? Thanks in advance.

@EvanCarroll
Copy link

EvanCarroll commented Oct 28, 2016

Thinking out loud, if the version is supported by upstream we should hide it by default, and then we should have a flag to show the remaining unsupported versions. We would just have to update n with the end of life schedule whenever upstream does. That should be simple though.

@qw3rtman
Copy link
Collaborator

I think the fix that makes the last assumptions is showing the 5 (or so) latest installations with the n command and every installation with the n --all command. Thoughts on this?

@sotojuan
Copy link

sotojuan commented Feb 4, 2017

That sound great @qw3rtman.

@shadowspawn
Copy link
Collaborator

shadowspawn commented Jul 12, 2018

I came across this old discussion and liked the concept of limiting (much like head and tail). I am trying 20 since that fits comfortably into a terminal window, but using 5 as per suggestion to shorten example. I am worried about people not realising that it is a truncated list though. If it too much noise to have a tip each time? e.g.

$ n ls
Listing remote... Displaying last 5 matches (use --all to see all).
10.3.0
10.4.0
10.4.1
10.5.0
10.6.0

@shadowspawn
Copy link
Collaborator

It will be a while before this gets considered for n. I have implemented this in nvh if readers are interested in giving it a go now.

@shadowspawn
Copy link
Collaborator

This issue has not had any activity in over six months. It isn't likely to get acted on due to this report. Although I like the idea so might do it at some point anyway!

Feel free to open a new issue if it comes up again, with new information and renewed interest.

Thank you for your contributions.

@shadowspawn
Copy link
Collaborator

shadowspawn commented Aug 3, 2019

Prerelease available via npm i n@next for v6. Release notes: https://github.com/tj/n/releases/tag/6.0.0-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants