devtron icon indicating copy to clipboard operation
devtron copied to clipboard

lint-helpers fetchLatestVersion compares each semver and returns latest

Open ThorstenHans opened this issue 7 years ago • 4 comments

As mentioned in #88 the fetchLatestVersion should compare all releases based on their version properties.

ThorstenHans avatar Sep 30 '16 08:09 ThorstenHans

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 ;)

ThorstenHans avatar Oct 07 '16 19:10 ThorstenHans

@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

ThorstenHans avatar Oct 08 '16 10:10 ThorstenHans

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 avatar Oct 10 '16 23:10 zeke

@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.

ThorstenHans avatar Oct 11 '16 05:10 ThorstenHans