Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@perfsee/bundle-analyzer

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perfsee/bundle-analyzer - npm Package Compare versions

Comparing version 1.1.0 to 1.3.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

# [1.3.0](https://github.com/perfsee/perfsee/compare/v1.2.0...v1.3.0) (2023-02-27)
### Bug Fixes
- **bundle-analyzer:** missing module path ([6324071](https://github.com/perfsee/perfsee/commit/6324071f03ca769d50839c933e876086e8c3181c))
# [1.2.0](https://github.com/perfsee/perfsee/compare/v1.1.1...v1.2.0) (2022-12-19)
### Bug Fixes
- **bundle-analyzer:** fix stream decode error ([71023a2](https://github.com/perfsee/perfsee/commit/71023a21903e8d2f78b2b25ec9a5cd7e2ae46cd7))
### Features
- **plugins, bundle-analyzer:** stream serialize ([3055b96](https://github.com/perfsee/perfsee/commit/3055b96efd2141ad461cb23f5ff4402162a0cfa3))
# [1.1.0](https://github.com/perfsee/perfsee/compare/v1.0.0...v1.1.0) (2022-11-04)

@@ -8,0 +24,0 @@

2

dist/bundle-extractor.d.ts

@@ -5,2 +5,2 @@ /// <reference types="node" />

export declare function extractBundleFromStream(stream: NodeJS.ReadableStream, path: string): Promise<string>;
export declare function readStatsFile(path: string): PerfseeReportStats;
export declare function readStatsFile(path: string): Promise<PerfseeReportStats>;

@@ -24,3 +24,3 @@ "use strict";

const zlib_1 = require("zlib");
const msgpack_1 = require("@msgpack/msgpack");
const msgpack_stream_1 = require("@eyhn/msgpack-stream");
const tar_1 = require("tar");

@@ -116,3 +116,3 @@ const utils_1 = require("./utils");

}
function readStatsFile(path) {
async function readStatsFile(path) {
if (path.endsWith('.json')) {

@@ -122,4 +122,10 @@ return (0, utils_1.readJSONFile)(path);

else if (path.endsWith('.mp')) {
const buf = (0, fs_1.readFileSync)(path);
return (0, msgpack_1.decode)(buf);
const stats = (0, fs_1.statSync)(path);
if (stats.size < 2 * 1024 * 1024 * 1024 /* 2GB */) {
const buf = (0, fs_1.readFileSync)(path);
return (0, msgpack_stream_1.decode)(buf);
}
else {
return (await (0, msgpack_stream_1.decodeStream)((0, fs_1.createReadStream)(path)));
}
}

@@ -126,0 +132,0 @@ else {

@@ -7,3 +7,3 @@ import { PerfseeReportStats } from '../stats';

private readonly logger;
static FromStatsFile(statsFilePath: string, logger?: Logger): StatsParser;
static FromStatsFile(statsFilePath: string, logger?: Logger): Promise<StatsParser>;
static FromStats(stats: PerfseeReportStats, assetsPath: string, logger?: Logger): StatsParser;

@@ -10,0 +10,0 @@ private assetsMap;

@@ -62,9 +62,9 @@ "use strict";

}
static FromStatsFile(statsFilePath, logger = defaultLogger) {
static async FromStatsFile(statsFilePath, logger = defaultLogger) {
let stats;
try {
stats = (0, bundle_extractor_1.readStatsFile)(statsFilePath);
stats = await (0, bundle_extractor_1.readStatsFile)(statsFilePath);
}
catch (e) {
throw new Error(`Failed to read and parse webpack stats.\nInternal Error: ${e.message}`);
throw new Error(`Failed to read and parse webpack stats.\nInternal Error: ${e.stack}`);
}

@@ -275,2 +275,5 @@ return new StatsParser(stats, (0, path_1.parse)(statsFilePath).dir, logger);

if (!meta) {
m.name = fnModule.name;
m.path = fnModule.name;
m.ignored = true;
return;

@@ -281,3 +284,3 @@ }

m.issuers = this.getIssuers(fnModule, meta);
m.ignored = fnModule.name.endsWith('(ignored)');
m.ignored = false;
m.version = this.packageVersionMap.get(m.path);

@@ -284,0 +287,0 @@ m.realPath = fnModule.name;

@@ -109,3 +109,3 @@ export declare type ID = number | string;

path: string;
kind: EsbuildImportKind;
kind: EsbuildImportKind | 'file-loader';
}[];

@@ -112,0 +112,0 @@ exports: string[];

{
"name": "@perfsee/bundle-analyzer",
"version": "1.1.0",
"version": "1.3.0",
"description": "Bundle analyzer by perfsee",

@@ -19,4 +19,4 @@ "sideEffect": false,

"dependencies": {
"@msgpack/msgpack": "^2.7.2",
"@perfsee/utils": "1.1.0",
"@eyhn/msgpack-stream": "^2.8.4",
"@perfsee/utils": "1.3.0",
"acorn": "^8.7.1",

@@ -30,3 +30,3 @@ "acorn-walk": "^8.2.0",

},
"gitHead": "4b292cbcac782e08c311539be876419870600c7d"
"gitHead": "10319d51ec9cdd2bdcfa4470ce770227fa26161f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc