{"action":"created","issue":{"url":"https://api.github.com/repos/feross/standard/issues/693","repository_url":"https://api.github.com/repos/feross/standard","labels_url":"https://api.github.com/repos/feross/standard/issues/693/labels{/name}","comments_url":"https://api.github.com/repos/feross/standard/issues/693/comments","events_url":"https://api.github.com/repos/feross/standard/issues/693/events","html_url":"https://github.com/feross/standard/issues/693","id":191077599,"number":693,"title":"Warning on Buffer(var) and new Buffer(var)","user":{"login":"mcollina","id":52195,"avatar_url":"https://avatars.githubusercontent.com/u/52195?v=3","gravatar_id":"","url":"https://api.github.com/users/mcollina","html_url":"https://github.com/mcollina","followers_url":"https://api.github.com/users/mcollina/followers","following_url":"https://api.github.com/users/mcollina/following{/other_user}","gists_url":"https://api.github.com/users/mcollina/gists{/gist_id}","starred_url":"https://api.github.com/users/mcollina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcollina/subscriptions","organizations_url":"https://api.github.com/users/mcollina/orgs","repos_url":"https://api.github.com/users/mcollina/repos","events_url":"https://api.github.com/users/mcollina/events{/privacy}","received_events_url":"https://api.github.com/users/mcollina/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-11-22T17:47:44Z","updated_at":"2016-11-23T18:01:05Z","closed_at":null,"body":"I think standard should emit a warning for `Buffer(myvar)` and `new Buffer(myvar)`.\r\n\r\nIMHO safe things are:\r\n\r\n- `Buffer(42)` and `new Buffer(42)`\r\n- `Buffer(myvar, 'utf8')` and `new Buffer(myvar, 'utf8')`\r\n- `Buffer('hello')` and `new Buffer('hello')`\r\n\r\nAll of those can run on any version of node, and provide an additional layer of security even if we do not zero fill, etc."},"comment":{"url":"https://api.github.com/repos/feross/standard/issues/comments/262588473","html_url":"https://github.com/feross/standard/issues/693#issuecomment-262588473","issue_url":"https://api.github.com/repos/feross/standard/issues/693","id":262588473,"user":{"login":"mcollina","id":52195,"avatar_url":"https://avatars.githubusercontent.com/u/52195?v=3","gravatar_id":"","url":"https://api.github.com/users/mcollina","html_url":"https://github.com/mcollina","followers_url":"https://api.github.com/users/mcollina/followers","following_url":"https://api.github.com/users/mcollina/following{/other_user}","gists_url":"https://api.github.com/users/mcollina/gists{/gist_id}","starred_url":"https://api.github.com/users/mcollina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcollina/subscriptions","organizations_url":"https://api.github.com/users/mcollina/orgs","repos_url":"https://api.github.com/users/mcollina/repos","events_url":"https://api.github.com/users/mcollina/events{/privacy}","received_events_url":"https://api.github.com/users/mcollina/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T18:01:04Z","updated_at":"2016-11-23T18:01:04Z","body":">> I'm in favor of not adding one more npm dep to support old nodes, but I am ok with suggesting that where new Buffer(myvar) is used.\r\n>Currently we don't do \"warnings\". Just \"errors\" to keep things simple. Users could decide to ignore warnings, and that creates permanent noise in CI if/when they're ignored. So it's all-or-nothing.\r\n\r\nMy bad, I am too wired in the _other_ discussion. I meant errors.\r\n\r\n> > I do not think 'disable all deprecated things' is good, I think we should just target each deprecation individually. Domains have no other equivalent, and there are good uses for them.\r\n> Yeah, this is reasonable. However, I'd argue that almost no one should use domains. If someone really needs domains, they can disable the rule with a comment: /* eslint-disable node/no-deprecated-api */ I think it's probably still a net win to discourage deprecated APIs, even if some advanced users bump into the restriction.\r\n\r\nAgreed. The point is: do we want to automatically discourage any use of things deprecated in core? IMHO those errors are all semver-major changes, and it's better to include them individually. But, let's error on domains."}}
{"actor":{"display_login":"mcollina"}}