Huge News!Announcing our $40M Series B led by Abstract Ventures.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.12.1 to 5.13.0

dist/stats-extension-webpack-adapter.d.ts

1

dist/index.d.ts

@@ -6,2 +6,3 @@ import { Options } from '@statoscope/helpers/dist/jora';

export * as module from './module';
export { StatsExtensionWebpackAdapter } from './stats-extension-webpack-adapter';
export { joraHelpers, normalize };

@@ -8,0 +9,0 @@ export declare type Prepared = {

7

dist/jora-helpers.d.ts

@@ -53,3 +53,4 @@ import type { Size } from '@statoscope/stats-extension-compressed/dist/generator';

resolveCompilation(id: string): NormalizedCompilation | null;
resolveExtension(id: string, hash: string): NormalizedExtension<unknown, unknown> | null;
resolveExtension(id: string, fileName: string): NormalizedExtension<unknown, unknown> | null;
resolveExtensionByCompilation(id: string, hash: string): NormalizedExtension<unknown, unknown> | null;
getModuleSize(module: NormalizedModule, hash?: string | undefined, compressed?: boolean | undefined): Size;

@@ -67,8 +68,8 @@ getAssetSize(asset: NormalizedAsset, hash?: string | undefined, compressed?: boolean | undefined): Size;

modulesToFoamTree(modules: NormalizedModule[], hash?: string | undefined, compressed?: boolean | undefined): FoamTreeNode;
validation_getItems(hash?: string | undefined, relatedType?: "module" | "entry" | "package" | "package-instance" | "resource" | "compilation" | "chunk" | null | undefined, relatedId?: string | number | undefined): Item[];
validation_getItems(hash?: string | undefined, relatedType?: "module" | "package" | "package-instance" | "resource" | "entry" | "compilation" | "chunk" | null | undefined, relatedId?: string | number | undefined): Item[];
validation_getItem(id?: number | undefined, hash?: string | undefined): Item | null;
validation_resolveRelatedItem(item?: RelationItem | undefined, hash?: string | undefined): ResolvedRelatedItem;
validation_resolveRule(name?: string | undefined, hash?: string | undefined): RuleDescriptor | null;
customReports_getItems(file: string, hash?: string | null | undefined, relatedType?: "module" | "entry" | "package" | "package-instance" | "resource" | "compilation" | "chunk" | null | undefined, relatedId?: string | number | undefined): Report<unknown, unknown>[];
customReports_getItems(file: string, hash?: string | null | undefined, relatedType?: "module" | "package" | "package-instance" | "resource" | "entry" | "compilation" | "chunk" | null | undefined, relatedId?: string | number | undefined): Report<unknown, unknown>[];
customReports_getItem(id: string, file: string): Report<unknown, unknown> | null;
};

@@ -14,4 +14,8 @@ "use strict";

const resolveFile = (0, entity_resolver_1.default)(compilations.map((c) => c.file), (item) => item.name);
const resolveExtension = (hash, id) => {
var _a, _b, _c;
const resolveExtension = (fileName, id) => {
var _a, _b;
return (_b = (_a = normalizeResult.fileResolvers.get(fileName)) === null || _a === void 0 ? void 0 : _a.resolveExtension(id)) !== null && _b !== void 0 ? _b : null;
};
const resolveExtensionByCompilation = (hash, id) => {
var _a;
const fileName = (_a = resolveCompilation(hash)) === null || _a === void 0 ? void 0 : _a.file.name;

@@ -21,3 +25,3 @@ if (!fileName) {

}
return (_c = (_b = normalizeResult.fileResolvers.get(fileName)) === null || _b === void 0 ? void 0 : _b.resolveExtension(id)) !== null && _c !== void 0 ? _c : null;
return resolveExtension(fileName, id);
};

@@ -42,3 +46,3 @@ return {

}
const ext = resolveExtension(hash, '@statoscope/stats-extension-compressed');
const ext = resolveExtensionByCompilation(hash, '@statoscope/stats-extension-compressed');
const resolverSize = ext === null || ext === void 0 ? void 0 : ext.api;

@@ -86,5 +90,8 @@ return files

},
resolveExtension(id, hash) {
return resolveExtension(hash, id);
resolveExtension(id, fileName) {
return resolveExtension(fileName, id);
},
resolveExtensionByCompilation(id, hash) {
return resolveExtensionByCompilation(hash, id);
},
getModuleSize(module, hash, compressed) {

@@ -98,3 +105,3 @@ var _a;

}
const ext = resolveExtension(hash, '@statoscope/stats-extension-compressed');
const ext = resolveExtensionByCompilation(hash, '@statoscope/stats-extension-compressed');
const resolverSize = ext === null || ext === void 0 ? void 0 : ext.api;

@@ -113,3 +120,3 @@ return ((_a = resolverSize === null || resolverSize === void 0 ? void 0 : resolverSize(hash, module.identifier)) !== null && _a !== void 0 ? _a : {

}
const ext = resolveExtension(hash, '@statoscope/stats-extension-compressed');
const ext = resolveExtensionByCompilation(hash, '@statoscope/stats-extension-compressed');
const resolverSize = ext === null || ext === void 0 ? void 0 : ext.api;

@@ -125,3 +132,3 @@ return ((_a = resolverSize === null || resolverSize === void 0 ? void 0 : resolverSize(hash, asset.name)) !== null && _a !== void 0 ? _a : {

}
const ext = resolveExtension(hash, '@statoscope/stats-extension-package-info');
const ext = resolveExtensionByCompilation(hash, '@statoscope/stats-extension-package-info');
const api = ext === null || ext === void 0 ? void 0 : ext.api;

@@ -211,3 +218,3 @@ return (_a = api === null || api === void 0 ? void 0 : api.getInstance(hash, packageName, instancePath)) !== null && _a !== void 0 ? _a : null;

}
const ext = resolveExtension(hash, '@statoscope/stats-extension-stats-validation-result');
const ext = resolveExtensionByCompilation(hash, '@statoscope/stats-extension-stats-validation-result');
const api = ext === null || ext === void 0 ? void 0 : ext.api;

@@ -227,3 +234,3 @@ return [

}
const ext = resolveExtension(hash, '@statoscope/stats-extension-stats-validation-result');
const ext = resolveExtensionByCompilation(hash, '@statoscope/stats-extension-stats-validation-result');
const api = ext === null || ext === void 0 ? void 0 : ext.api;

@@ -287,3 +294,3 @@ return (_a = api === null || api === void 0 ? void 0 : api.getItemById(id)) !== null && _a !== void 0 ? _a : null;

}
const ext = resolveExtension(hash, '@statoscope/stats-extension-stats-validation-result');
const ext = resolveExtensionByCompilation(hash, '@statoscope/stats-extension-stats-validation-result');
const api = ext === null || ext === void 0 ? void 0 : ext.api;

@@ -290,0 +297,0 @@ return (_a = api === null || api === void 0 ? void 0 : api.getRule(name)) !== null && _a !== void 0 ? _a : null;

@@ -97,3 +97,3 @@ import { StatsDescriptor } from '@statoscope/stats';

data: Extension<TPayload>;
api: TAPI;
api: TAPI | null;
};

@@ -100,0 +100,0 @@ export declare type HandledStats = {

@@ -67,4 +67,6 @@ "use strict";

if (!item) {
console.warn(`Unknown extension ${ext.descriptor.name}:`, ext);
return null;
return {
data: ext,
api: null,
};
}

@@ -75,3 +77,3 @@ return {

};
}).filter(Boolean)) !== null && _c !== void 0 ? _c : [];
})) !== null && _c !== void 0 ? _c : [];
const resolveExtension = (0, entity_resolver_1.default)(extensions, (ext) => ext.data.descriptor.name);

@@ -78,0 +80,0 @@ const resolvers = {

{
"name": "@statoscope/webpack-model",
"version": "5.12.1",
"version": "5.13.0",
"description": "This package contains helpers to process webpack stats",

@@ -29,2 +29,4 @@ "main": "./dist/index.js",

"@statoscope/types": "5.12.1",
"@types/md5": "^2.3.0",
"@types/webpack": "^5.0.0",
"ajv": "^8.6.3",

@@ -34,6 +36,5 @@ "md5": "^2.3.0"

"devDependencies": {
"@types/md5": "^2.3.0",
"flatted": "^3.1.1"
},
"gitHead": "a8da51f4717066e9d9973a175797267b25e1cc33"
"gitHead": "01e3953dc17249874436217248cde6a3ed53be80"
}
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