auth0 / node-jwa

JSON Web Algorithms
http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html
MIT License
98 stars 42 forks source link

DeprecationWarning: Using Buffer without `new` will soon stop working #16

Closed jblancogl closed 7 years ago

jblancogl commented 7 years ago

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

p0vidl0 commented 7 years ago

Think its need to use Buffer.from(). https://nodejs.org/api/buffer.html#buffer_buffer_from_buffer_alloc_and_buffer_allocunsafe

jblancogl commented 7 years ago

Hi @p0vidl0, you are right, but i don't want to break the backward compatibility. Buffer.from() appears from v6.0.0 but the project supports from v.0.10.0

MarkHerhold commented 7 years ago

@jblancogl Well we could always do a major version with this PR, and branch into <0.12 and >4.0.0 and maintain both branches.

We've got to make the change sometime!

jblancogl commented 7 years ago

18 best solution