devtron
devtron copied to clipboard
lint-helpers fetchLatestVersion compares each semver and returns latest
As mentioned in #88 the fetchLatestVersion
should compare all releases based on their version
properties.
I would definitely prefer semver
module but wasn't sure if it's okay to add another dependency, will update the PR during the weekend ;)
@kevinsawicki changed the things you mentioned but looks like that https://atom.io/download/atom-shell/index.json
is preventing XHR requests now ?? do you guys changed the webserver config and disallow CORS
It looks like that atom.io URL redirects to an S3 URL which doesn't allow cross-origin requests either:
Fetch API cannot load https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/index.json. No 'Access-Control-Allow-Origin' header is present on the requested resource.
That might mean the CORS configuration would need to be updated for both?
@zeke I've tried both urls and none of them allows CORS
. The spec says if it's a permanent request, the first endpoint has to allow the OPTIONS
request and the second (which is the actual request) has to allow CORS
for the GET
request.
So it depends on how CORS
is configured on the first endpoint. If OPTIONS
requests were allowed, reconfiguring CORS
to allow GET
on the second should work.