New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@statoscope/webpack-model

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@statoscope/webpack-model - npm Package Compare versions

Comparing version 5.7.3 to 5.8.0-alpha.0

dist/denormalizeCompilation.d.ts

4

dist/normalize.d.ts

@@ -91,4 +91,4 @@ import { StatsDescriptor } from '@statoscope/stats';

__statoscope?: {
descriptor: StatsDescriptor;
extensions: Extension<unknown>[];
descriptor?: StatsDescriptor;
extensions?: Extension<unknown>[];
};

@@ -95,0 +95,0 @@ };

@@ -19,2 +19,3 @@ "use strict";

const module_1 = require("./module");
const denormalizeCompilation_1 = __importDefault(require("./denormalizeCompilation"));
exports.normalizedSymbol = Symbol('sttoscope.normalized');

@@ -50,2 +51,3 @@ // todo: make it injectable

function handleRawFile(rawStatsFileDescriptor) {
denormalizeCompilation_1.default(rawStatsFileDescriptor.data);
const file = {

@@ -118,3 +120,3 @@ name: rawStatsFileDescriptor.name,

function handleCompilation(compilation, file, parent) {
var _a, _b;
var _a, _b, _c;
const normalized = {

@@ -134,3 +136,3 @@ time: compilation.time,

};
const extensions = (_b = (_a = file.__statoscope) === null || _a === void 0 ? void 0 : _a.extensions.map((ext) => {
const extensions = (_c = (_b = (_a = file.__statoscope) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.map((ext) => {
const item = extensionContainer.resolve(ext.descriptor.name);

@@ -145,3 +147,3 @@ if (!item) {

};
})) !== null && _b !== void 0 ? _b : [];
})) !== null && _c !== void 0 ? _c : [];
const resolveModule = makeModuleResolver(normalized);

@@ -186,4 +188,5 @@ const resolveChunk = entity_resolver_1.default(normalized.chunks, ({ id }) => id);

else {
// @ts-ignore
chunk.modules[ix] = module;
const chunks = new Set([...resolved.chunks, ...chunk.modules[+ix].chunks]);
resolved.chunks = [...chunks];
chunk.modules[+ix] = resolved;
}

@@ -316,2 +319,6 @@ }

if (resolved) {
const chunks = new Set([...resolved.chunks, ...chunk.modules[+i].chunks]);
resolved.chunks = [...chunks].map((chunk) => typeof chunk === 'string' || typeof chunk === 'number'
? resolveChunk(chunk)
: chunk);
chunk.modules[+i] = resolved;

@@ -318,0 +325,0 @@ }

{
"name": "@statoscope/webpack-model",
"version": "5.7.3",
"version": "5.8.0-alpha.0",
"description": "This package contains helpers to process webpack stats",

@@ -35,3 +35,3 @@ "main": "./dist/index.js",

},
"gitHead": "369a5bb0c86ca3efe2373921ebac6ad71c3ac7ab"
"gitHead": "8b9b91ff4d9f79a05141bbe5002c22f3648e6857"
}

@@ -79,6 +79,31 @@ import { StatsDescriptor } from '@statoscope/stats';

__statoscope?: {
descriptor: StatsDescriptor;
extensions: Extension<unknown>[];
descriptor?: StatsDescriptor;
extensions?: Extension<unknown>[];
normalization?: NormalizationData;
};
};
}
export type ModuleData = {
nameToIdMap: Map<string, number>;
idToModuleMap: Map<number, Webpack.Module>;
lastId: number;
};
export type CompilationData = {
modules: ModuleData;
};
export type CompilationMap = Map<string, CompilationData>;
export type NormalizationData = {
links: { modules: ['chunks'] };
data: {
compilations: Array<{
id: string;
data: {
modules: Array<[number, Webpack.Module]>;
};
}>;
};
};
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