-
Notifications
You must be signed in to change notification settings - Fork 101
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
lint-helpers fetchLatestVersion compares each semver and returns latest #89
Conversation
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.
Thanks, let a few minor comments.
window.fetch('https://atom.io/download/atom-shell/index.json') | ||
.then((response) => { | ||
return response.json() | ||
}).then((versions) => { | ||
window.__devtron.latestElectronVersion = versions[0].version |
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.
Thanks for catching this issue, I think it might be a simpler approach to use the https://www.npmjs.com/package/semver module for something like this, it has methods to get the greater version when given two versions.
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "devtron", | |||
"version": "1.3.0", | |||
"version": "1.3.1", |
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.
Please revert this change, this will be bumped when it is published.
I would definitely prefer |
@kevinsawicki changed the things you mentioned but looks like that |
It looks like that atom.io URL redirects to an S3 URL which doesn't allow cross-origin requests either:
That might mean the CORS configuration would need to be updated for both? |
@zeke I've tried both urls and none of them allows So it depends on how |
As mentioned in #88 the
fetchLatestVersion
should compare all releases based on theirversion
properties.