kevva / to-ico

Convert PNG to ICO in memory
MIT License
137 stars 19 forks source link

Use `Buffer.from()` instead of `new Buffer()` #10

Closed kevva closed 7 years ago

kevva commented 7 years ago

When targeting Node.js >=6, use Buffer.from() since new Buffer() is deprecated.

vladgurovich commented 7 years ago

What is the targeting in question? This commit broke our application that uses https://github.com/jantimon/favicons-webpack-plugin which in turn is dependent on https://github.com/haydenbleasel/favicons which is in turn is dependent on to-ico. We use node v4.xx and Buffer.alloc was introduced in v5.10

SamVerschueren commented 7 years ago

It was backported to v4 as well, per the docs.

andreigabreanu commented 7 years ago

Just wanted to say that this broke our application also (and still is). For the moment we had to revert to version 1.1.2 to keep it working . Same source problem as @vladgurovich - favicons-webpack-plugin .