{"action":"created","issue":{"url":"https://api.github.com/repos/johnmuhl/electron-prebuilt-updater/issues/2","labels_url":"https://api.github.com/repos/johnmuhl/electron-prebuilt-updater/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/johnmuhl/electron-prebuilt-updater/issues/2/comments","events_url":"https://api.github.com/repos/johnmuhl/electron-prebuilt-updater/issues/2/events","html_url":"https://github.com/johnmuhl/electron-prebuilt-updater/issues/2","id":108169915,"number":2,"title":"support githubs flavor of semver","user":{"login":"maxogden","id":39759,"avatar_url":"https://avatars.githubusercontent.com/u/39759?v=3","gravatar_id":"","url":"https://api.github.com/users/maxogden","html_url":"https://github.com/maxogden","followers_url":"https://api.github.com/users/maxogden/followers","following_url":"https://api.github.com/users/maxogden/following{/other_user}","gists_url":"https://api.github.com/users/maxogden/gists{/gist_id}","starred_url":"https://api.github.com/users/maxogden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxogden/subscriptions","organizations_url":"https://api.github.com/users/maxogden/orgs","repos_url":"https://api.github.com/users/maxogden/repos","events_url":"https://api.github.com/users/maxogden/events{/privacy}","received_events_url":"https://api.github.com/users/maxogden/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-24T16:52:24Z","updated_at":"2015-09-24T21:30:13Z","closed_at":"2015-09-24T20:43:00Z","body":"today `npm install electron-prebuilt -g` ended up installing a version of electron that was 674 commits old because they pushed out a release `v0.30.7` that overwrote the previously newest release `v0.33.1`\r\n\r\nI think the version numbers they use for their releases have two major differences from semver:\r\n\r\n- they don't increment the minor when adding new features (e.g. https://github.com/atom/electron/releases/tag/v0.31.2 should have been 0.32.0 because of the new APIs)\r\n- they view each minor version (e.g. `0.31`, `0.32`) as a separate 'release channel', meaning if 0.33 is already out, they expect to be able to publish to 0.32 without affecting the latest version. this lets them do patch versions to fix tiny bugs in old electrons that atom is using so they can update quickly in atom without having to port atom to use the latest electron.\r\n\r\nsince these break the expectations of semver and npm, we need to do extra work here to make sure we publish electon versions in the right way:\r\n\r\n- when doing a release, check the last release on npm. if the new version is higher than the old version, we can just do a publish as normal. however, is the new version is lower than the old version, we have to do prevent npm from publishing the `latest` tag, which is npms default\r\n\r\nwe fixed the issue today manually by running `npm tag electron-prebuilt@0.33.1 latest` which set the previous release as latest\r\n\r\ncc @mafintosh @jlord "},"comment":{"url":"https://api.github.com/repos/johnmuhl/electron-prebuilt-updater/issues/comments/143056054","html_url":"https://github.com/johnmuhl/electron-prebuilt-updater/issues/2#issuecomment-143056054","issue_url":"https://api.github.com/repos/johnmuhl/electron-prebuilt-updater/issues/2","id":143056054,"user":{"login":"maxbrunsfeld","id":326587,"avatar_url":"https://avatars.githubusercontent.com/u/326587?v=3","gravatar_id":"","url":"https://api.github.com/users/maxbrunsfeld","html_url":"https://github.com/maxbrunsfeld","followers_url":"https://api.github.com/users/maxbrunsfeld/followers","following_url":"https://api.github.com/users/maxbrunsfeld/following{/other_user}","gists_url":"https://api.github.com/users/maxbrunsfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/maxbrunsfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxbrunsfeld/subscriptions","organizations_url":"https://api.github.com/users/maxbrunsfeld/orgs","repos_url":"https://api.github.com/users/maxbrunsfeld/repos","events_url":"https://api.github.com/users/maxbrunsfeld/events{/privacy}","received_events_url":"https://api.github.com/users/maxbrunsfeld/received_events","type":"User","site_admin":true},"created_at":"2015-09-24T21:30:13Z","updated_at":"2015-09-24T21:30:13Z","body":"> would be nice if electron switched to npm compatible semver at some point though just to prevent other potential weird situations and keep things nice and simple\r\n\r\nI don't think electron is doing anything incompatible with semver by publishing patches for older versions. Continuing to maintain older versions is good.\r\n\r\nThe problem is that npm's `latest` tag has nothing whatsoever to do with semver. It just marks the version that was most recently uploaded. Background:\r\n* https://github.com/npm/npm/issues/3397\r\n* https://github.com/npm/npm/issues/4709\r\n* https://github.com/npm/npm/issues/6778\r\n\r\nIt looks like the current workaround is to use `publishConfig` in the `package.json` to prevent `latest` being tagged."}}