backflip / gulp-iconfont-css

Create an SCSS file mapping the SVG files piped to gulp-iconfont to their codepoints
MIT License
148 stars 81 forks source link

Use Buffer.from to to remove deprecation warning #49

Closed dovidweisz closed 7 years ago

dovidweisz commented 8 years ago

Using this plugin with node7 outputs this warning to the console

DeprecationWarning: Using Buffer without new will soon stop working. Use new Buffer(), or preferably Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() instead.

jefsnare commented 7 years ago

@dovidweisz Thanks! Is this backwards compatible with Node 6.x and 4.x?

What other changes you advice to stay on track with the new Buffer changes in Node 7?

dovidweisz commented 7 years ago

@jefsnare looks like Buffer.from wasn't added until v5.10.0. But I'll code around it if necessary.

jefsnare commented 7 years ago

@dovidweisz Would be great if you want to, since we don't want to break older Node.js environments for now. Agree that from Release 3 we should mention that we support 5.10 and above?

dovidweisz commented 7 years ago

... I am in no way an authority on Buffer (or Nodejs for that matter ). But this was the only depreciation warning that we were getting.

jefsnare commented 7 years ago

@dovidweisz okay great. Is it possible to apply the changes before Release 2.2.0?

dovidweisz commented 7 years ago

I think that on a new release you should only commit to supporting one full version back. So if the current stable version is 7.x, you should give support back to 6.x.

jefsnare commented 7 years ago

@dovidweisz sounds good to me, @backflip what are your thoughts?

dovidweisz commented 7 years ago

I plan on getting to it today or tomorrow.

dovidweisz commented 7 years ago

I'm doing some testing now and it seems like node 4.x is fine with Buffer.from("") and I only need to fall back to Buffer("") for versions 3.x and earlier.

dovidweisz commented 7 years ago

@jefsnare @backflip Done :)

jefsnare commented 7 years ago

@dovidweisz thanks!

dovidweisz commented 7 years ago

@jefsnare is there any way we can move this release? My team keeps bothering me about the github link in our package.json