-
Notifications
You must be signed in to change notification settings - Fork 213
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
fix(npm): fetching npm versions not working #270
Conversation
Doesn’t the semver package handle version breakdowns? The regular expression could be redundant to that. |
As described in the comment the npm/cli repository also has many releases of other libraries which are not npm, so the version regex is used to filter out these libraries -> https://github.com/npm/cli/releases The problem with the former fix was that it is no object but just the version names returned by the previous function. The unfiltered cli array looks like that:
|
assert.ifError(error); | ||
debug('listVersions: ' + result); | ||
assert.ok(Array.isArray(result)); | ||
result.forEach((version) => assert.match(version, versionRegex)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to have a test for this :)
Sadly a change that I was unaware of broke the installation of npm versions, fixed that and prepared a new version.