{"action":"created","issue":{"url":"https://api.github.com/repos/feross/buffer/issues/124","repository_url":"https://api.github.com/repos/feross/buffer","labels_url":"https://api.github.com/repos/feross/buffer/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/feross/buffer/issues/124/comments","events_url":"https://api.github.com/repos/feross/buffer/issues/124/events","html_url":"https://github.com/feross/buffer/issues/124","id":168778274,"number":124,"title":"Buffer.from not converting to string when built with webpack","user":{"login":"marr","id":44376,"avatar_url":"https://avatars.githubusercontent.com/u/44376?v=3","gravatar_id":"","url":"https://api.github.com/users/marr","html_url":"https://github.com/marr","followers_url":"https://api.github.com/users/marr/followers","following_url":"https://api.github.com/users/marr/following{/other_user}","gists_url":"https://api.github.com/users/marr/gists{/gist_id}","starred_url":"https://api.github.com/users/marr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marr/subscriptions","organizations_url":"https://api.github.com/users/marr/orgs","repos_url":"https://api.github.com/users/marr/repos","events_url":"https://api.github.com/users/marr/events{/privacy}","received_events_url":"https://api.github.com/users/marr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dcousens","id":413395,"avatar_url":"https://avatars.githubusercontent.com/u/413395?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousens","html_url":"https://github.com/dcousens","followers_url":"https://api.github.com/users/dcousens/followers","following_url":"https://api.github.com/users/dcousens/following{/other_user}","gists_url":"https://api.github.com/users/dcousens/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousens/subscriptions","organizations_url":"https://api.github.com/users/dcousens/orgs","repos_url":"https://api.github.com/users/dcousens/repos","events_url":"https://api.github.com/users/dcousens/events{/privacy}","received_events_url":"https://api.github.com/users/dcousens/received_events","type":"User","site_admin":false},"assignees":[{"login":"dcousens","id":413395,"avatar_url":"https://avatars.githubusercontent.com/u/413395?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousens","html_url":"https://github.com/dcousens","followers_url":"https://api.github.com/users/dcousens/followers","following_url":"https://api.github.com/users/dcousens/following{/other_user}","gists_url":"https://api.github.com/users/dcousens/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousens/subscriptions","organizations_url":"https://api.github.com/users/dcousens/orgs","repos_url":"https://api.github.com/users/dcousens/repos","events_url":"https://api.github.com/users/dcousens/events{/privacy}","received_events_url":"https://api.github.com/users/dcousens/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-08-02T01:15:49Z","updated_at":"2016-08-02T23:04:23Z","closed_at":null,"body":"Hi,\r\nThanks for this library, I am excited to use it for some base64 encoding. \r\n\r\nI illustrated an error I found here https://github.com/marr/buffer-shim\r\n\r\nBasically, running `npm test` fails due to something with Buffer not being shimmed properly with webpack.\r\n\r\nIn node, when I execute: `Buffer.from('foo').toString('base64')` the output is `Zm9v`.\r\nIn a webpack bundled version, that code returns `AAAA`. \r\n\r\nNote that I was using Chrome 51 to reproduce the breaking behavior. \r\nRun `npm build` and Open index.html to see the browser fail, or just run `npm test` to see it fail in a terminal.\r\n\r\nwebpack v1.13.1\r\nchrome osx Version 51.0.2704.106 (64-bit)\r\n"},"comment":{"url":"https://api.github.com/repos/feross/buffer/issues/comments/237076471","html_url":"https://github.com/feross/buffer/issues/124#issuecomment-237076471","issue_url":"https://api.github.com/repos/feross/buffer/issues/124","id":237076471,"user":{"login":"marr","id":44376,"avatar_url":"https://avatars.githubusercontent.com/u/44376?v=3","gravatar_id":"","url":"https://api.github.com/users/marr","html_url":"https://github.com/marr","followers_url":"https://api.github.com/users/marr/followers","following_url":"https://api.github.com/users/marr/following{/other_user}","gists_url":"https://api.github.com/users/marr/gists{/gist_id}","starred_url":"https://api.github.com/users/marr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marr/subscriptions","organizations_url":"https://api.github.com/users/marr/orgs","repos_url":"https://api.github.com/users/marr/repos","events_url":"https://api.github.com/users/marr/events{/privacy}","received_events_url":"https://api.github.com/users/marr/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T23:04:23Z","updated_at":"2016-08-02T23:04:23Z","body":"@dcousens My library is only three lines:\r\n\r\n```\r\nconst assert = require('assert')\r\n\r\nconst foo = Buffer.from('foo').toString('base64')\r\n\r\nassert.equal(foo, 'Zm9v', '\"foo\" is base64 encoded correctly')\r\n```\r\n\r\nWhen I use that in pure node, it passes. When I webpack that file, which imports the buffer lib, I see the output from `Buffer.from('foo').toString('base64')` equal to `AAAA`. "}}
{"actor":{"display_login":"marr"}}