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

Support for older node versions #60

Merged
merged 3 commits into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ function getNodejsRemoteVersionsAsync(remoteName, remoteUri) {
function nodeReleaseInfoToVersion(remoteName, remoteUri, release) {
let semanticVersion = release.version;
if (!semanticVersion.startsWith('v') ||
(semanticVersion.startsWith('v0') && !/^v0.1[0-9]/.test(semanticVersion))) {
// Filter out very old versions (< v0.10) that are not supported by NVS.
(semanticVersion.startsWith('v0') && !/^v0.[7-9]|1[0-9]/.test(semanticVersion))) {
// Filter out very old versions (< v0.7) that are not supported by NVS.
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nvs",
"version": "1.3.0",
"version": "1.3.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

altho actually, this is semver-minor imo, not patch, and generally version numbers should never be bumped in PRs

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose in a project that is often cherry-picking changes across multiple major-version branches/releases, then you wouldn't want the changes to include version numbers. But this project isn't that complex, so it doesn't matter to me.

As for semver-minor vs patch, I think it could go either way. So, this is fine.

"description": "Node Version Switcher",
"main": "lib/main.js",
"scripts": {
Expand Down