@perfsee/bundle-analyzer
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -122,8 +122,15 @@ "use strict"; | ||
else if (path.endsWith('.jsonr')) { | ||
const data = []; | ||
const readStream = (0, fs_1.createReadStream)(path, { encoding: 'utf-8' }); | ||
for await (const chunk of readStream) { | ||
data.push(chunk); | ||
const stats = (0, fs_1.statSync)(path); | ||
if (stats.size < 2 * 1024 * 1024 * 1024 /* 2GB */) { | ||
const buf = (0, fs_1.readFileSync)(path, 'utf-8'); | ||
return jsonr_1.default.parse(buf); | ||
} | ||
return jsonr_1.default.parseStream(data); | ||
else { | ||
const data = []; | ||
const readStream = (0, fs_1.createReadStream)(path, { encoding: 'utf-8' }); | ||
for await (const chunk of readStream) { | ||
data.push(chunk); | ||
} | ||
return jsonr_1.default.parseStream(data); | ||
} | ||
} | ||
@@ -130,0 +137,0 @@ else if (path.endsWith('.mp')) { |
{ | ||
"name": "@perfsee/bundle-analyzer", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Bundle analyzer by perfsee", | ||
@@ -20,3 +20,3 @@ "sideEffect": false, | ||
"@eyhn/msgpack-stream": "^2.8.4", | ||
"@perfsee/jsonr": "1.6.0", | ||
"@perfsee/jsonr": "1.7.0", | ||
"@perfsee/utils": "1.3.0", | ||
@@ -31,3 +31,3 @@ "acorn": "^8.7.1", | ||
}, | ||
"gitHead": "25f311cef2d02f0621762f55195d52621ed98620" | ||
"gitHead": "5bc3ef49d30b88318f03f3238afbe2b7d28b01aa" | ||
} |
Sorry, the diff of this file is not supported yet
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
226044
3269
+ Added@perfsee/jsonr@1.7.0(transitive)
- Removed@perfsee/jsonr@1.6.0(transitive)
Updated@perfsee/jsonr@1.7.0