Coder Social home page Coder Social logo

Comments (4)

elstgav avatar elstgav commented on July 28, 2024 1

nodenv-nvmrc supports this functionality for .nvmrc. See #116 (comment) for why this isn’t supported natively.

from nodenv.

lancesnider avatar lancesnider commented on July 28, 2024

Yeah, that makes sense. Thanks @elstgav. I think we can call this closed.

from nodenv.

jasonkarns avatar jasonkarns commented on July 28, 2024

Related thread attempting to get nvm to support a standard .node-version file: nvm-sh/nvm#794

I believe asdf supports .node-version file via options and/or configuration (or perhaps via plugin): https://asdf-vm.com/manage/configuration.html#legacy-version-file

.ruby-version has become a defacto standard in the ruby world, across multiple version managers. So too, .node-version is somewhat broadly supported.

While I obviously can't influence other projects' features, I would say that I think it's in the community's best interest to have as many tools as possible support a single standard file. (who wants to force everyone on the team to use the same tool? conversely, who wants their repo to have half a dozen different files all for ostensibly the same purpose?) @shadowspawn has also done a fantastic job documenting support across tools: https://github.com/shadowspawn/node-version-usage

But also, lastly, I'll plug the https://github.com/nodenv/nodenv-package-json-engine plugin. Considering our repos already have package.json, which already contains an engines.node property for declaring supported runtimes, there's an argument for not even using .node-version at all πŸ˜„ . Of course, there's more nuance than that. Libraries that are intended to be installed as dependencies should generally not have a "version locking" file in their repo because as deps, they'll be run across a broad spectrum of runtime versions. By contrast, apps that have a single target deployment runtime should.

from nodenv.

jasonkarns avatar jasonkarns commented on July 28, 2024

All that to say, I definitely think it would be great to have a plugin that does read .tool-versions ;) if someone wants to whip that up.

The following plugins all do variations of the same thing and would be a great template to start from.

https://github.com/nodenv/nodenv-package-json-engine
https://github.com/ouchxp/nodenv-nvmrc
https://github.com/aripollak/rbenv-bundler-ruby-version

from nodenv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.