@bundle-stats/utils 4.13.0-rc.0 → 4.13.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bundle-stats/utils",
3
- "version": "4.13.0-rc.0",
3
+ "version": "4.13.0-rc.2",
4
4
  "description": "BundleStats utils",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",
@@ -35,26 +35,26 @@
35
35
  },
36
36
  "homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/utils#readme",
37
37
  "dependencies": {
38
- "@bundle-stats/plugin-webpack-filter": "4.13.0-rc.0",
39
- "@bundle-stats/plugin-webpack-validate": "4.13.0-rc.0",
38
+ "@bundle-stats/plugin-webpack-filter": "4.13.0-rc.2",
39
+ "@bundle-stats/plugin-webpack-validate": "4.13.0-rc.2",
40
40
  "serialize-query-params": "2.0.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/jest": "29.5.12",
44
- "@types/lodash": "4.17.1",
45
- "core-js": "3.37.0",
44
+ "@types/lodash": "4.17.4",
45
+ "core-js": "3.37.1",
46
46
  "jest": "29.7.0",
47
47
  "jest-cli": "29.7.0",
48
48
  "jest-date-mock": "1.0.10",
49
49
  "lodash": "4.17.21",
50
50
  "regenerator-runtime": "0.14.1",
51
51
  "rimraf": "5.0.7",
52
- "ts-jest": "29.1.2",
52
+ "ts-jest": "29.1.3",
53
53
  "typescript": "5.1.6"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "core-js": "^3.0.0",
57
57
  "lodash": "^4.0.0"
58
58
  },
59
- "gitHead": "33533cf96035993ae844597104ae45d6c868bafb"
59
+ "gitHead": "c876de10fe8746abb2678d1c8c13a88abed32b7f"
60
60
  }
package/src/constants.ts CHANGED
@@ -107,6 +107,20 @@ export enum JobSectionId {
107
107
  rawData = 'rawData',
108
108
  }
109
109
 
110
+ export interface WebpackChunk {
111
+ id: string;
112
+ name: string;
113
+ }
114
+
115
+ export interface JobMeta {
116
+ [Source.webpack]: {
117
+ /**
118
+ * Webpack chunks data
119
+ */
120
+ chunks?: Array<WebpackChunk>;
121
+ };
122
+ }
123
+
110
124
  export interface JobSummaryItem {
111
125
  baseline: number;
112
126
  current: number;
@@ -153,7 +167,7 @@ export type JobMetricsSource = Record<string, MetricRun | Record<string, MetricR
153
167
  export type JobMetrics = JobSection<JobMetricsSource>;
154
168
 
155
169
  export interface JobData {
156
- [JobSectionId.meta]?: JobSection;
170
+ [JobSectionId.meta]?: JobMeta;
157
171
  [JobSectionId.insights]?: JobInsights;
158
172
  [JobSectionId.summary]?: JobSummary;
159
173
  [JobSectionId.metrics]?: JobMetrics;
@@ -67,6 +67,15 @@ export declare enum JobSectionId {
67
67
  metrics = "metrics",
68
68
  rawData = "rawData"
69
69
  }
70
+ export interface WebpackChunk {
71
+ id: string;
72
+ name: string;
73
+ }
74
+ export interface JobMeta {
75
+ [Source.webpack]: {
76
+ chunks?: Array<WebpackChunk>;
77
+ };
78
+ }
70
79
  export interface JobSummaryItem {
71
80
  baseline: number;
72
81
  current: number;
@@ -106,7 +115,7 @@ export interface JobInsightsInfo {
106
115
  export type JobMetricsSource = Record<string, MetricRun | Record<string, MetricRun>>;
107
116
  export type JobMetrics = JobSection<JobMetricsSource>;
108
117
  export interface JobData {
109
- [JobSectionId.meta]?: JobSection;
118
+ [JobSectionId.meta]?: JobMeta;
110
119
  [JobSectionId.insights]?: JobInsights;
111
120
  [JobSectionId.summary]?: JobSummary;
112
121
  [JobSectionId.metrics]?: JobMetrics;