Skip to content

Adding n latest_installed / n which latest_installed to get latest locally installed versions #585

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

Closed

Conversation

techiev2
Copy link

Pull Request

Adding n latest_installed / n which latest_installed to get latest locally installed versions

Problem

n latest resolves against remote and does not allow for local latest versions to
be used with a shortcut. 1

Solution

There are existing functions that give the latest installed local versions but is not exposed via the command line. This change adds a couple of helper functions that use the existing list version function footprints to get the latest installed NodeJS version/binary path.

ChangeLog

n latest resolves against remote and does not allow for local latest versions to
be used with a shortcut.

This change adds a couple of helper functions that use the existing list version
function footprints to get the latest installed NodeJS version/binary path.
@shadowspawn
Copy link
Collaborator

On a related note, there have been issues suggesting version selection with no internet: #377 #404

This PR is headed in that direction, but won't cope with possible situations. (Try installing rc/latest for example.)

For syntax, the idea for a more general solution that comes to mind is an option flag, perhaps "local" or "cached" or "offline". n ls has a local context so makes sense to list a major version number, but might be bit ambiguous for latest.

n ls latest
n --offline latest
n ls 8
n --offline 8

I suggest opening an issue if you want to discuss this further, or proposing a particular aspect (like adding new label for latest_installed) to see if there is interest from others.

Thank you for your contributions.

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

Successfully merging this pull request may close these issues.

2 participants