wkx icon indicating copy to clipboard operation
wkx copied to clipboard

Buffer() is Deprecated

Open kevjames3 opened this issue 4 years ago • 3 comments

On version: 0.5.0, node version 12.13.0.

Warning that shows up:

DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Replicated from calling wkx.Geometry.parseGeoJSON(data).toWkb().toString('base64')

No stack trace, but this usually because the code is using new Buffer(), simply swapping it over to Buffer.from() is more than enough

kevjames3 avatar Jan 13 '21 22:01 kevjames3

PR: https://github.com/cschwarz/wkx/pull/42

dehmer avatar Mar 25 '21 09:03 dehmer

Buffer also isn't polyfilled by webpack anymore, and the build seems broken in browser.

@cschwarz is this repo abandoned?

braco avatar Oct 06 '22 15:10 braco

@braco same issue, you need to import you own polyfill

https://github.com/feross/buffer

convers39 avatar Oct 21 '22 12:10 convers39