Coder Social home page Coder Social logo

Comments (13)

brandom avatar brandom commented on June 19, 2024 5

@Schniz Just dropping in to say thanks and great work! A new tab in Hyper went from ..... to . as soon as I installed fnm and switched off nvm.

My two cents on the above discussion is that it appears the WG hasn't met in two years and the initial proposal, IMHO, doesn't make a compelling argument for creating what amounts to yet-another-version-manager with an official stamp.

Adding support for a de facto standard cross-vm config like .node-version is "the right thing" to do, just as you currently support the config file for the de facto standard version manager.

I would love to show my gratitude with a PR but I am short on time at the moment, I will check back this weekend to see if this or another GFI is open.

from fnm.

ljharb avatar ljharb commented on June 19, 2024 1

I’d suggest not using it; it’s not actually a standard, and in fact it’s current use means that the Node Version Management Group will (when it only day creates a standard) be defining a different file name and format.

from fnm.

jantimon avatar jantimon commented on June 19, 2024 1

Cool :)

There are already 45.000 Github repositories using a .node-version file

The content is very simple but in the early days there were two formats:

  • v0.0.0
  • 0.0.0

Nowadays all version managers seem to skip the v in front of the version but I guess it would be nice not to bail if one exists.

nodenv has a nice description how it picks up the version and also notes how they handle .node-version

nvs just says that the .node-version file is looked up recursively in the file structure

nodist uses a similar description like nvs

avn also notes that the .node-version is using the semver format

from fnm.

Schniz avatar Schniz commented on June 19, 2024 1

This is exactly how I implemented the .nvmrc file (I add the v prefix when there isn't one). I'd accept PRs that implement that - it's a good first issue in my opinion 😸

This can be by changing the Nvmrc module to a module with a new name that checks for every known file we support (and that'll be two files for now 😄)

If someone needs any help with implementing it, reach me out with a DM or an Email or something. I'd love to help!

The only thing worth noting is that we'll need to have some kind of priority.

from fnm.

jantimon avatar jantimon commented on June 19, 2024

We already use .node-version filename for many projects because it is right now the best supported format which works on windows and mac.

Would be cool if these projects could work with fnm too.

Would it be a huge change to add support for it? I would like to understand the disadvantage of adding support for it

from fnm.

ljharb avatar ljharb commented on June 19, 2024

The disadvantage is yet another version manager implying that this file is a standard, when in fact it isn’t and can never be.

from fnm.

jantimon avatar jantimon commented on June 19, 2024

Well people don’t need to use it - it just adds compatibility to sth what’s already commonly used

It also supports nvmrc which is also no standard so I can’t see why that would be a big deal for node-version

from fnm.

ljharb avatar ljharb commented on June 19, 2024

Right - I’m saying that it’s better to be less compatible, so as to help make that format less commonly used, because it will one day be very harmful for the ecosystem to have that file as the commonly used one.

from fnm.

jantimon avatar jantimon commented on June 19, 2024

So if I understand you correctly we should also drop support for .nvmrc to help the future eco system?

from fnm.

ljharb avatar ljharb commented on June 19, 2024

If you like, but .nvmrc has "nvm" in the name, so it's clearly not a cross-ecosystem standard, nor will it ever be.

Whatever filename we go with will be something new that is not tied to any specific version manager.

from fnm.

jantimon avatar jantimon commented on June 19, 2024

4 of 6 node version managers (which work for mac, windows and linux) support .node-version so for me that’s already a little bit like a standard and I can’t see the risk you try to describe.

would love to know what @Schniz thinks about this

from fnm.

ljharb avatar ljharb commented on June 19, 2024

The instant the node version management working group declares a standard format, it won't be ¯\_(ツ)_/¯ (and we won't be declaring ".node-version")

from fnm.

Schniz avatar Schniz commented on June 19, 2024

I’m not familiar with .node-version as I have only used nvm. How popular is it? I’m pretty sure it’s not hard to implement, but every file type (or file name) will make it slower. Maybe it’s for the best though

from fnm.

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.