diff --git a/packages/csv-parse/dist/cjs/index.cjs b/packages/csv-parse/dist/cjs/index.cjs index f2d584886..da09aeee8 100644 --- a/packages/csv-parse/dist/cjs/index.cjs +++ b/packages/csv-parse/dist/cjs/index.cjs @@ -4974,7 +4974,7 @@ class ResizeableBuffer{ constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4986,7 +4986,7 @@ class ResizeableBuffer{ } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5013,7 +5013,7 @@ class ResizeableBuffer{ resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/dist/cjs/sync.cjs b/packages/csv-parse/dist/cjs/sync.cjs index d3e3ff1c2..be5e1de90 100644 --- a/packages/csv-parse/dist/cjs/sync.cjs +++ b/packages/csv-parse/dist/cjs/sync.cjs @@ -4974,7 +4974,7 @@ class ResizeableBuffer{ constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4986,7 +4986,7 @@ class ResizeableBuffer{ } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5013,7 +5013,7 @@ class ResizeableBuffer{ resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/dist/esm/index.js b/packages/csv-parse/dist/esm/index.js index e7ad99045..4ae47e583 100644 --- a/packages/csv-parse/dist/esm/index.js +++ b/packages/csv-parse/dist/esm/index.js @@ -4970,7 +4970,7 @@ class ResizeableBuffer{ constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4982,7 +4982,7 @@ class ResizeableBuffer{ } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5009,7 +5009,7 @@ class ResizeableBuffer{ resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/dist/esm/sync.js b/packages/csv-parse/dist/esm/sync.js index 0e7fe4220..dff3f20b1 100644 --- a/packages/csv-parse/dist/esm/sync.js +++ b/packages/csv-parse/dist/esm/sync.js @@ -4970,7 +4970,7 @@ class ResizeableBuffer{ constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4982,7 +4982,7 @@ class ResizeableBuffer{ } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5009,7 +5009,7 @@ class ResizeableBuffer{ resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/dist/iife/index.js b/packages/csv-parse/dist/iife/index.js index 74c979c1f..ce9849bee 100644 --- a/packages/csv-parse/dist/iife/index.js +++ b/packages/csv-parse/dist/iife/index.js @@ -4973,7 +4973,7 @@ var csv_parse = (function (exports) { constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4985,7 +4985,7 @@ var csv_parse = (function (exports) { } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5012,7 +5012,7 @@ var csv_parse = (function (exports) { resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/dist/iife/sync.js b/packages/csv-parse/dist/iife/sync.js index 5f5de7299..ac98288b9 100644 --- a/packages/csv-parse/dist/iife/sync.js +++ b/packages/csv-parse/dist/iife/sync.js @@ -4973,7 +4973,7 @@ var csv_parse_sync = (function (exports) { constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4985,7 +4985,7 @@ var csv_parse_sync = (function (exports) { } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5012,7 +5012,7 @@ var csv_parse_sync = (function (exports) { resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/dist/umd/index.js b/packages/csv-parse/dist/umd/index.js index 6adbb90ae..9cfcf4440 100644 --- a/packages/csv-parse/dist/umd/index.js +++ b/packages/csv-parse/dist/umd/index.js @@ -4976,7 +4976,7 @@ constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4988,7 +4988,7 @@ } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5015,7 +5015,7 @@ resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/dist/umd/sync.js b/packages/csv-parse/dist/umd/sync.js index c4a57ff4f..612fd2870 100644 --- a/packages/csv-parse/dist/umd/sync.js +++ b/packages/csv-parse/dist/umd/sync.js @@ -4976,7 +4976,7 @@ constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(isBuffer(val)){ @@ -4988,7 +4988,7 @@ } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -5015,7 +5015,7 @@ resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; } diff --git a/packages/csv-parse/lib/ResizeableBuffer.js b/packages/csv-parse/lib/ResizeableBuffer.js index ef3e56232..c335229b3 100644 --- a/packages/csv-parse/lib/ResizeableBuffer.js +++ b/packages/csv-parse/lib/ResizeableBuffer.js @@ -4,7 +4,7 @@ class ResizeableBuffer{ constructor(size=100){ this.size = size; this.length = 0; - this.buf = Buffer.alloc(size); + this.buf = Buffer.allocUnsafe(size); } prepend(val){ if(Buffer.isBuffer(val)){ @@ -16,7 +16,7 @@ class ResizeableBuffer{ } } const buf = this.buf; - this.buf = Buffer.alloc(this.size); + this.buf = Buffer.allocUnsafe(this.size); val.copy(this.buf, 0); buf.copy(this.buf, val.length); this.length += val.length; @@ -43,7 +43,7 @@ class ResizeableBuffer{ resize(){ const length = this.length; this.size = this.size * 2; - const buf = Buffer.alloc(this.size); + const buf = Buffer.allocUnsafe(this.size); this.buf.copy(buf,0, 0, length); this.buf = buf; }