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 auto label to read version from .node-version #616

Merged
merged 4 commits into from
Apr 11, 2020
Merged

Conversation

shadowspawn
Copy link
Collaborator

Pull Request

Problem

People would like to be able to specify the target version in a file, and have it read by their preferred node version manager. The commonly used generic filename is .node-version.

Reference: nodejs/version-management#13

Solution

Read version number from .node-version and parse as if it had been given on command line. Be lenient with line endings, as I proposed in nodejs/version-management#13

Use the label auto, as used by nvs for this purpose.

@shadowspawn
Copy link
Collaborator Author

(Errata: I included the version bump and changelog entry in this PR, which should not normally be included.)

@shadowspawn shadowspawn merged commit 59adcab into develop Apr 11, 2020
@shadowspawn shadowspawn deleted the feature/auto branch April 11, 2020 02:10
@shadowspawn
Copy link
Collaborator Author

Released in n 6.5.0.

@shadowspawn
Copy link
Collaborator Author

Somewhat related issues: #150 #423 #547 #573

@shadowspawn shadowspawn mentioned this pull request Apr 11, 2020
@ljharb
Copy link

ljharb commented Apr 11, 2020

This was a very very bad idea to merge and publish prior to getting agreement between version managers. By doing this, you'd likely poisoned .node-version forever from ever getting consensus among version managers or the node version management working group.

@shadowspawn
Copy link
Collaborator Author

Well @ljharb , years have gone by since discussions started and there were already multiple other implementations using .node-version: nvs, avn, nodenev, direnv, and asdf-nodejs.

I wanted to try the ideas for real, and the current implementation is consistent with the lowest common denominator discussed in the working group. I thought it was a pretty safe bet.

If the working group decides on something else, then I can change to follow.

@ljharb
Copy link

ljharb commented Apr 11, 2020

There is never a safe bet, whether it takes weeks or decades, to "try out" a potential standard.

@shadowspawn
Copy link
Collaborator Author

Re-released using filename .n-node-version in n 6.5.1.

I look forward to seeing if there is any consensus on the potential standard.

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.

None yet

2 participants