@bundle-stats/utils 4.5.3-alpha.2 → 4.5.3-alpha.3
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/README.md +9 -9
- package/lib/report/merge-metrics-by-key.js +1 -1
- package/lib/report/merge-metrics-by-key.js.map +1 -1
- package/lib-esm/report/merge-metrics-by-key.js +1 -1
- package/lib-esm/report/merge-metrics-by-key.js.map +1 -1
- package/package.json +6 -6
- package/src/report/merge-metrics-by-key.ts +4 -3
package/README.md
CHANGED
|
@@ -65,17 +65,17 @@ Webpack plugin to generate bundle stats report.
|
|
|
65
65
|
|
|
66
66
|
### :cyclone: [relative-ci.com](https://relative-ci.com?utm_medium=bundle-stats-utils)
|
|
67
67
|
|
|
68
|
-
####
|
|
68
|
+
#### Optimize your web app's performance with automated bundle stats analysis and monitoring.
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
- :crystal_ball: In-depth bundle stats analysis for every build
|
|
71
|
+
- :chart_with_upwards_trend: Monitor bundle stats changes and identify opportunities for optimizations
|
|
72
|
+
- :bell: [Rule based automated review flow](https://relative-ci.com/documentation/setup/configure/integrations/github-commit-status-review?utm_medium=bundle-stats-utils), or get notified via [GitHub Pull Request comments](https://relative-ci.com/documentation/setup/configure/integrations/github-pull-request-comment?utm_medium=bundle-stats-utils), [GitHub check reports](https://relative-ci.com/documentation/setup/configure/integrations/github-check-report?utm_medium=bundle-stats-utils) and [Slack messages](https://relative-ci.com/documentation/setup/configure/integrations/slack-notification?utm_medium=bundle-stats-utils)
|
|
73
|
+
- :wrench: Support for **webpack** and beta support for **Vite**/**Rollup**
|
|
74
|
+
- :hammer: Support for all major CI services(CircleCI, GitHub Actions, Gitlab CI, Jenkins, Travis CI)
|
|
75
|
+
- :nut_and_bolt: Support for **npm**, **yarn** and **pnpm**; support for monorepos
|
|
76
|
+
- :two_hearts: **Always free** for **Open Source**
|
|
71
77
|
|
|
72
|
-
|
|
73
|
-
- :chart_with_upwards_trend: Monitor webpack bundle stats changes and identify tendencies over extended periods
|
|
74
|
-
- :bell: Get notified via GitHub Checks, GitHub Pull Request comments, and Slack notifications
|
|
75
|
-
- :hammer: Support for all major CI services (CircleCI, GitHub Actions, Gitlab CI, Jenkins, Travis CI)
|
|
76
|
-
- :two_hearts: Always free for Open Source
|
|
77
|
-
|
|
78
|
-
[Try for free](https://relative-ci.com?utm_medium=bundle-stats-utils)
|
|
78
|
+
[:rocket: Get started](https://relative-ci.com?utm_medium=bundle-stats-utils)
|
|
79
79
|
|
|
80
80
|
### :first_quarter_moon: [relative-ci/compare](https://compare.relative-ci.com)
|
|
81
81
|
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.mergeMetricsByKey = void 0;
|
|
7
7
|
const mergeWith_1 = __importDefault(require("lodash/mergeWith"));
|
|
8
8
|
const mergeWithRuns = (runIndex, runsCount) => (aggregated, currentRun) => {
|
|
9
|
-
const runs = aggregated || Array(runsCount).fill(
|
|
9
|
+
const runs = aggregated || Array(runsCount).fill({ value: 0 });
|
|
10
10
|
runs[runIndex] = currentRun;
|
|
11
11
|
return runs;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-metrics-by-key.js","sourceRoot":"","sources":["../../src/report/merge-metrics-by-key.ts"],"names":[],"mappings":";;;;;;AAAA,iEAAyC;AAMzC,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"merge-metrics-by-key.js","sourceRoot":"","sources":["../../src/report/merge-metrics-by-key.ts"],"names":[],"mappings":";;;;;;AAAA,iEAAyC;AAMzC,MAAM,aAAa,GACjB,CAAC,QAAgB,EAAE,SAAiB,EAAE,EAAE,CACxC,CAAC,UAAe,EAAE,UAAe,EAAmC,EAAE;IAEpE,MAAM,IAAI,GAAG,UAAU,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/D,IAAI,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC;IAE5B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEG,MAAM,iBAAiB,GAAG,CAC/B,IAAuB,EACvB,eAAkE,EAC1C,EAAE;IAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC;IAE9B,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAC7B,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAA,mBAAS,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,EACvF,EAAqD,CACtD,CAAC;IAEF,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtD,MAAM,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAEjC,IAAI,CAAC,eAAe,EAAE;YACpB,OAAO,GAAG,CAAC;SACZ;QAGD,OAAO,eAAe,CAAC,MAAM,CAC3B,CAAC,aAAa,EAAE,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,EAChE,GAAG,CACJ,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAxBW,QAAA,iBAAiB,qBAwB5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import mergeWith from 'lodash/mergeWith';
|
|
2
2
|
const mergeWithRuns = (runIndex, runsCount) => (aggregated, currentRun) => {
|
|
3
|
-
const runs = aggregated || Array(runsCount).fill(
|
|
3
|
+
const runs = aggregated || Array(runsCount).fill({ value: 0 });
|
|
4
4
|
runs[runIndex] = currentRun;
|
|
5
5
|
return runs;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-metrics-by-key.js","sourceRoot":"","sources":["../../src/report/merge-metr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,GAAG,CACJ,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/utils",
|
|
3
|
-
"version": "4.5.3-alpha.
|
|
3
|
+
"version": "4.5.3-alpha.3",
|
|
4
4
|
"description": "BundleStats utils",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
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.5.3-alpha.
|
|
39
|
-
"@bundle-stats/plugin-webpack-validate": "^4.5.3-alpha.
|
|
38
|
+
"@bundle-stats/plugin-webpack-filter": "^4.5.3-alpha.3",
|
|
39
|
+
"@bundle-stats/plugin-webpack-validate": "^4.5.3-alpha.3",
|
|
40
40
|
"query-string": "7.1.3",
|
|
41
41
|
"serialize-query-params": "2.0.2"
|
|
42
42
|
},
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@types/jest": "29.5.3",
|
|
45
45
|
"@types/lodash": "4.14.196",
|
|
46
46
|
"core-js": "3.31.1",
|
|
47
|
-
"jest": "29.6.
|
|
48
|
-
"jest-cli": "29.6.
|
|
47
|
+
"jest": "29.6.2",
|
|
48
|
+
"jest-cli": "29.6.2",
|
|
49
49
|
"jest-date-mock": "1.0.8",
|
|
50
50
|
"lodash": "4.17.21",
|
|
51
51
|
"regenerator-runtime": "0.13.11",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"core-js": "^3.0.0",
|
|
58
58
|
"lodash": "^4.0.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "e6c4133b85498ae82fcf2ec0b36e5475a2607c91"
|
|
61
61
|
}
|
|
@@ -4,10 +4,11 @@ import * as types from './types';
|
|
|
4
4
|
|
|
5
5
|
type RunMetrics = Record<string, types.MetricValue>;
|
|
6
6
|
|
|
7
|
-
const mergeWithRuns =
|
|
7
|
+
const mergeWithRuns =
|
|
8
|
+
(runIndex: number, runsCount: number) =>
|
|
8
9
|
(aggregated: any, currentRun: any): Array<types.MetricValue | null> => {
|
|
9
|
-
// if there are no runs, just create an array
|
|
10
|
-
const runs = aggregated || Array(runsCount).fill(
|
|
10
|
+
// if there are no runs, just create an array with empty values
|
|
11
|
+
const runs = aggregated || Array(runsCount).fill({ value: 0 });
|
|
11
12
|
runs[runIndex] = currentRun;
|
|
12
13
|
|
|
13
14
|
return runs;
|