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

Add .nvmrc support to auto #625

Closed
shadowspawn opened this issue Jun 24, 2020 · 7 comments
Closed

Add .nvmrc support to auto #625

shadowspawn opened this issue Jun 24, 2020 · 7 comments
Assignees

Comments

@shadowspawn
Copy link
Collaborator

There are occasional requests for .nvmrc support. With the addition of auto, and also looking at engines support (#618), there is now somewhere to put another target to look for.

@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Jun 25, 2020

https://github.com/nvm-sh/nvm#nvmrc

The contents of a .nvmrc file must be the <version> (as described by nvm --help) followed by a newline. No trailing spaces are allowed, and the trailing newline is required.

https://github.com/nvm-sh/nvm/blob/7b3af45cf73196c0a9e7ea418aee0fc8272811d0/nvm.sh#L2387

Note: <version> refers to any version-like string nvm understands. This includes:
        - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
        - default (built-in) aliases: node, stable, unstable, iojs, system
        - custom aliases you define with `nvm alias foo`

Additional info on built-in aliases and lts:

@jasonkarns
Copy link

FWIW: there is a (not heavily used) plugin for nodenv that adds support for respecting nvmrc files: https://github.com/ouchxp/nodenv-nvmrc

We've found plugins to be a favorable way for people to extend nodenv with functionality that we don't believe should be in core, but has heavy requests by small groups of users.

@shadowspawn
Copy link
Collaborator Author

Thanks for info @jasonkarns

@shadowspawn
Copy link
Collaborator Author

I have a first cut at implementation and reasonably happy with it so far.

@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Jul 4, 2020

I have released support in nvh first.

Give it a try if you are keen! Comments welcome here in this thread, or open an issue there.

e.g. nvh install auto

@shadowspawn
Copy link
Collaborator Author

FYI: @spences10 @adrianmcli @MarkLyck @ha404

@shadowspawn
Copy link
Collaborator Author

Released in v6.7.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

2 participants