sonic-boom
Advanced tools
Comparing version 2.4.1 to 2.4.2
10
index.js
@@ -229,6 +229,8 @@ 'use strict' | ||
} | ||
if (!this._writing && len > MAX_WRITE) { | ||
bufs.push(data) | ||
} else if (bufs.length === 0) { | ||
bufs[0] = '' + data | ||
if ( | ||
bufs.length === 0 || | ||
bufs[bufs.length - 1].length + data.length > MAX_WRITE | ||
) { | ||
bufs.push('' + data) | ||
} else { | ||
@@ -235,0 +237,0 @@ bufs[bufs.length - 1] += data |
{ | ||
"name": "sonic-boom", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Extremely fast utf8 only stream implementation", | ||
@@ -34,3 +34,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@types/node": "^16.11.10", | ||
"@types/node": "^17.0.0", | ||
"fastbench": "^1.0.1", | ||
@@ -37,0 +37,0 @@ "husky": "^7.0.1", |
@@ -1333,3 +1333,3 @@ 'use strict' | ||
test('write enormously large buffers async atomicly', (t) => { | ||
t.plan(4) | ||
t.plan(66) | ||
const fakeFs = Object.create(fs) | ||
@@ -1336,0 +1336,0 @@ const SonicBoom = proxyquire('.', { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52892
1673