{"action":"created","issue":{"url":"https://api.github.com/repos/DamonOehlman/detect-browser/issues/65","repository_url":"https://api.github.com/repos/DamonOehlman/detect-browser","labels_url":"https://api.github.com/repos/DamonOehlman/detect-browser/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/DamonOehlman/detect-browser/issues/65/comments","events_url":"https://api.github.com/repos/DamonOehlman/detect-browser/issues/65/events","html_url":"https://github.com/DamonOehlman/detect-browser/pull/65","id":320507255,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg2MTU1NDU3","number":65,"title":"prioritize browser detection, remove os dependency","user":{"login":"DamonOehlman","id":609693,"node_id":"MDQ6VXNlcjYwOTY5Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/609693?v=4","gravatar_id":"","url":"https://api.github.com/users/DamonOehlman","html_url":"https://github.com/DamonOehlman","followers_url":"https://api.github.com/users/DamonOehlman/followers","following_url":"https://api.github.com/users/DamonOehlman/following{/other_user}","gists_url":"https://api.github.com/users/DamonOehlman/gists{/gist_id}","starred_url":"https://api.github.com/users/DamonOehlman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DamonOehlman/subscriptions","organizations_url":"https://api.github.com/users/DamonOehlman/orgs","repos_url":"https://api.github.com/users/DamonOehlman/repos","events_url":"https://api.github.com/users/DamonOehlman/events{/privacy}","received_events_url":"https://api.github.com/users/DamonOehlman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-05T12:55:51Z","updated_at":"2018-06-25T08:04:07Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/DamonOehlman/detect-browser/pulls/65","html_url":"https://github.com/DamonOehlman/detect-browser/pull/65","diff_url":"https://github.com/DamonOehlman/detect-browser/pull/65.diff","patch_url":"https://github.com/DamonOehlman/detect-browser/pull/65.patch"},"body":"So this is a reasonably simple change, but one that should have a pretty big impact for people who have been hit with the code path which is returning a false positive on node detection (see #54).\r\n\r\nIt changes two things:\r\n\r\n1. We do browser detection if at all possible (i.e. `navigator` is defined).  This then falls back to detecting the node environment if that isn't available.\r\n\r\n2. Removes the `require('os')` import for os detection and simply uses `process.platform` instead.  The information won't be as detailed and it's possible that a user of this module may still want to opt to do their own check using the `os` module.  Given that the majority use case is web browser detection though I think that makes sense.  Should stop `browserify` bringing in any shims for the `os` module also (which is a good thing).\r\n\r\nBecause of point 2 though, I believe we should do a major version bump to `3.0.0` to ensure that no-one that is using `detect-browser` in an isomorphic way is caught out unexpectedly.\r\n\r\n@5punk PTAL.\r\n\r\n/cc @shengshiqi @markgoho-EDT"},"comment":{"url":"https://api.github.com/repos/DamonOehlman/detect-browser/issues/comments/399867068","html_url":"https://github.com/DamonOehlman/detect-browser/pull/65#issuecomment-399867068","issue_url":"https://api.github.com/repos/DamonOehlman/detect-browser/issues/65","id":399867068,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTg2NzA2OA==","user":{"login":"vstets","id":4921230,"node_id":"MDQ6VXNlcjQ5MjEyMzA=","avatar_url":"https://avatars0.githubusercontent.com/u/4921230?v=4","gravatar_id":"","url":"https://api.github.com/users/vstets","html_url":"https://github.com/vstets","followers_url":"https://api.github.com/users/vstets/followers","following_url":"https://api.github.com/users/vstets/following{/other_user}","gists_url":"https://api.github.com/users/vstets/gists{/gist_id}","starred_url":"https://api.github.com/users/vstets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstets/subscriptions","organizations_url":"https://api.github.com/users/vstets/orgs","repos_url":"https://api.github.com/users/vstets/repos","events_url":"https://api.github.com/users/vstets/events{/privacy}","received_events_url":"https://api.github.com/users/vstets/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T08:04:07Z","updated_at":"2018-06-25T08:04:07Z","author_association":"NONE","body":"Hello guys,\r\n\r\nPlease complete this PR - we are waiting on them."}}
{"actor":{"display_login":"vstets"}}