@bundle-stats/cli-utils 4.2.3-beta.0 → 4.2.3-beta.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,kDAAkD,CAAC;AAC5F,MAAM,CAAC,MAAM,4BAA4B,GAAG,gDAAgD,CAAC;AAE7F,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,sCAAsC,CAAC"}
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,wDAAwD,CAAC;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAE3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,sCAAsC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bundle-stats/cli-utils",
3
- "version": "4.2.3-beta.0",
3
+ "version": "4.2.3-beta.1",
4
4
  "description": "BundleStats CLI utilities",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",
@@ -12,17 +12,20 @@
12
12
  "node": ">= 14.0"
13
13
  },
14
14
  "scripts": {
15
- "build": "npm run build-lib && npm run build-esm",
16
- "build-lib": "rm -fr ./lib && ../../node_modules/.bin/tsc --rootDir ./src --project tsconfig.lib.json --outDir ./lib",
17
- "build-esm": "rm -fr ./lib-esm && rm -fr ./types && ../../node_modules/.bin/tsc --rootDir ./src --project tsconfig.esm.json --outDir ./lib-esm",
18
- "lint": "../../node_modules/.bin/eslint . --ext .js",
19
- "test": "jest --passWithNoTests src "
15
+ "build": "npm run clean && npm run build-lib && npm run build-esm",
16
+ "build-lib": "npm run clean-lib && tsc --rootDir ./src --project tsconfig.lib.json --outDir ./lib",
17
+ "build-esm": "npm run clean-esm && tsc --rootDir ./src --project tsconfig.esm.json --outDir ./lib-esm",
18
+ "clean": "npm run clean-lib && npm run clean-esm",
19
+ "clean-lib": "rimraf lib",
20
+ "clean-esm": "rimraf lib-esm types",
21
+ "lint": "eslint",
22
+ "test": "jest --passWithNoTests src"
20
23
  },
21
24
  "keywords": [],
22
25
  "author": {
23
26
  "name": "Viorel Cojocaru",
24
- "email": "vio@beanon.com",
25
- "url": "https://beanon.com"
27
+ "email": "vio@relative-ci.com",
28
+ "url": "https://relative-ci.com"
26
29
  },
27
30
  "license": "MIT",
28
31
  "repository": {
@@ -34,18 +37,25 @@
34
37
  },
35
38
  "homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/cli-utils#readme",
36
39
  "dependencies": {
37
- "@bundle-stats/html-templates": "^4.2.3-beta.0",
38
- "@bundle-stats/plugin-webpack-filter": "^4.2.3-beta.0",
39
- "@bundle-stats/plugin-webpack-validate": "^4.2.3-beta.0",
40
- "@bundle-stats/utils": "^4.2.3-beta.0",
41
- "core-js": "^3.21.0",
40
+ "@bundle-stats/html-templates": "4.2.3-beta.1",
41
+ "@bundle-stats/plugin-webpack-filter": "4.2.3-beta.1",
42
+ "@bundle-stats/utils": "4.2.3-beta.1",
42
43
  "find-cache-dir": "^3.1.0",
43
- "fs-extra": "^11.0.0"
44
+ "lodash": "^4.17.21",
45
+ "stream-chain": "^3.0.1",
46
+ "stream-json": "^1.8.0"
44
47
  },
45
48
  "devDependencies": {
46
49
  "@types/find-cache-dir": "^3.2.1",
47
- "jest": "29.4.3",
48
- "typescript": "4.9.5"
49
- },
50
- "gitHead": "a4664a4c6318b73774aae3666f5ae6c778025ea1"
50
+ "@types/lodash": "4.17.18",
51
+ "@types/stream-chain": "^2.0.1",
52
+ "@types/stream-json": "^1.7.3",
53
+ "jest": "29.7.0",
54
+ "jest-cli": "29.7.0",
55
+ "memfs": "4.17.2",
56
+ "rimraf": "6.0.1",
57
+ "ts-jest": "29.4.0",
58
+ "typescript": "5.8.3"
59
+ },
60
+ "gitHead": "18734a4f1ce353ca150d7e0a40212f44a90c621e"
51
61
  }
@@ -1,3 +1,6 @@
1
- export declare function getBaselineStatsFilepath(from?: string): string;
2
- export declare function readBaseline(from?: string): Promise<object>;
3
- export declare function writeBaseline(data: JSON): Promise<void>;
1
+ export declare const BASELINE_STATS_DIR: string;
2
+ export declare const BASELINE_STATS_BASE = "baseline.json";
3
+ export declare const getBaselinePath: (outputPath?: string, outputDir?: string, filepath?: string) => string;
4
+ export declare const getBaselineRelativePath: (outputPath?: string, outputDir?: string, filepath?: string) => string;
5
+ export declare function readBaseline(baselineFilepath: string): Promise<object>;
6
+ export declare function writeBaseline(data: JSON, baselineFilepath: string): Promise<void>;
package/types/fs.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const readJSONStream: <T = unknown>(filepath: string) => Promise<T>;
package/types/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as T from './text';
2
+ export * from './fs';
2
3
  export * from './baseline';
3
4
  export * from './create-artifacts';
4
5
  export * from './constants';
@@ -1,17 +1,24 @@
1
- export declare function getReportInfo(report: any): any;
1
+ import type { JobInsightAssetsSizeTotalData } from '@bundle-stats/utils';
2
+ export declare function getReportInfo(report: any): JobInsightAssetsSizeTotalData;
2
3
  export interface ReportOptions {
3
4
  compare?: boolean;
4
5
  baseline?: boolean;
6
+ baselineFilepath?: string;
5
7
  html?: boolean;
6
8
  json?: boolean;
7
- outDir?: String;
9
+ outDir?: string;
8
10
  silent?: boolean;
9
11
  }
10
12
  interface ReportPluginOptions {
11
13
  outputPath?: string;
12
14
  logger?: Console;
13
- invalidOptionsUrl?: string;
14
15
  }
15
- type ReportAssets = Record<string, string>;
16
+ interface ReportAssets {
17
+ [filepath: string]: {
18
+ type: 'report' | 'baseline';
19
+ source: string;
20
+ filepath: string;
21
+ };
22
+ }
16
23
  export declare const generateReports: (source: object, options: ReportOptions, pluginOptions?: ReportPluginOptions) => Promise<ReportAssets>;
17
24
  export {};
package/types/text.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export declare const CLI_BASELINE_MISSING_WARN = "Missing baseline stats, see \"--baseline\" option.";
2
- export declare const PLUGIN_BASELINE_MISSING_WARN = "Missing baseline stats, see \"baseline\" option.";
1
+ export declare const BASELINE_MISSING = "Baseline stats file is missing, see \"baseline\" option.";
2
+ export declare const BASELINE_READING = "Reading baseline data from";
3
+ export declare const BASELINE_WRITING = "Writing baseline data to";
3
4
  export declare const CLI_NO_COMPARE_MODE = "Not in compare mode (see --compare).";
4
5
  export declare const CLI_MULTIPLE_STATS = "Multiple stat files already set.";
5
6
  export declare const CLI_NO_BASELINE = "Not a baseline job (see --baseline).";
package/CHANGELOG.md DELETED
@@ -1,249 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [3.2.8](https://github.com/relative-ci/bundle-stats/compare/v3.2.7...v3.2.8) (2022-03-10)
7
-
8
- **Note:** Version bump only for package @bundle-stats/cli-utils
9
-
10
-
11
-
12
-
13
-
14
- ## [3.2.7](https://github.com/relative-ci/bundle-stats/compare/v3.2.6...v3.2.7) (2022-03-10)
15
-
16
- **Note:** Version bump only for package @bundle-stats/cli-utils
17
-
18
-
19
-
20
-
21
-
22
- ## [3.2.6](https://github.com/relative-ci/bundle-stats/compare/v3.2.5...v3.2.6) (2022-03-04)
23
-
24
- **Note:** Version bump only for package @bundle-stats/cli-utils
25
-
26
-
27
-
28
-
29
-
30
- ## [3.2.5](https://github.com/relative-ci/bundle-stats/compare/v3.2.4...v3.2.5) (2022-02-15)
31
-
32
- **Note:** Version bump only for package @bundle-stats/cli-utils
33
-
34
-
35
-
36
-
37
-
38
- ## [3.2.4](https://github.com/relative-ci/bundle-stats/compare/v3.2.3...v3.2.4) (2022-01-17)
39
-
40
- **Note:** Version bump only for package @bundle-stats/cli-utils
41
-
42
-
43
-
44
-
45
-
46
- ## [3.2.3](https://github.com/relative-ci/bundle-stats/compare/v3.2.2...v3.2.3) (2022-01-10)
47
-
48
- **Note:** Version bump only for package @bundle-stats/cli-utils
49
-
50
-
51
-
52
-
53
-
54
- ## [3.2.2](https://github.com/relative-ci/bundle-stats/compare/v3.2.1...v3.2.2) (2021-12-08)
55
-
56
- **Note:** Version bump only for package @bundle-stats/cli-utils
57
-
58
-
59
-
60
-
61
-
62
- ## [3.2.1](https://github.com/relative-ci/bundle-stats/compare/v3.2.0...v3.2.1) (2021-11-23)
63
-
64
- **Note:** Version bump only for package @bundle-stats/cli-utils
65
-
66
-
67
-
68
-
69
-
70
- # [3.2.0](https://github.com/relative-ci/bundle-stats/compare/v3.1.3...v3.2.0) (2021-10-13)
71
-
72
-
73
- ### Bug Fixes
74
-
75
- * Consistent dependency versions across packages ([cceebb7](https://github.com/relative-ci/bundle-stats/commit/cceebb7724670a7c40c156c395449fc65d183690))
76
-
77
-
78
-
79
-
80
-
81
- ## [3.1.2](https://github.com/relative-ci/bundle-stats/compare/v3.1.1...v3.1.2) (2021-08-10)
82
-
83
- **Note:** Version bump only for package @bundle-stats/cli-utils
84
-
85
-
86
-
87
-
88
-
89
- ## [3.1.1](https://github.com/relative-ci/bundle-stats/compare/v3.1.0...v3.1.1) (2021-07-28)
90
-
91
- **Note:** Version bump only for package @bundle-stats/cli-utils
92
-
93
-
94
-
95
-
96
-
97
- # [3.1.0](https://github.com/relative-ci/bundle-stats/compare/v3.0.1...v3.1.0) (2021-07-28)
98
-
99
- **Note:** Version bump only for package @bundle-stats/cli-utils
100
-
101
-
102
-
103
-
104
-
105
- ## [3.0.1](https://github.com/relative-ci/bundle-stats/compare/v3.0.0...v3.0.1) (2021-06-06)
106
-
107
- **Note:** Version bump only for package @bundle-stats/cli-utils
108
-
109
-
110
-
111
-
112
-
113
- # [3.0.0](https://github.com/relative-ci/bundle-stats/compare/v2.8.2...v3.0.0) (2021-05-18)
114
-
115
-
116
- ### Bug Fixes
117
-
118
- * babelrc - use node current config ([b8a364b](https://github.com/relative-ci/bundle-stats/commit/b8a364b5da1f2f9ccd744b13f583fa58df2ebcea))
119
-
120
-
121
-
122
-
123
-
124
- ## [2.8.2](https://github.com/relative-ci/bundle-stats/compare/v2.8.1...v2.8.2) (2021-05-07)
125
-
126
-
127
- ### Bug Fixes
128
-
129
- * Depend on core-js ([475cffb](https://github.com/relative-ci/bundle-stats/commit/475cffbbb9924a4dbfffa923b81ccb19fe9cd7fb))
130
-
131
-
132
-
133
-
134
-
135
- ## [2.8.1](https://github.com/relative-ci/bundle-stats/compare/v2.8.0...v2.8.1) (2021-05-07)
136
-
137
- **Note:** Version bump only for package @bundle-stats/cli-utils
138
-
139
-
140
-
141
-
142
-
143
- # [2.8.0](https://github.com/relative-ci/bundle-stats/compare/v2.7.2...v2.8.0) (2021-03-27)
144
-
145
- **Note:** Version bump only for package @bundle-stats/cli-utils
146
-
147
-
148
-
149
-
150
-
151
- ## [2.7.2](https://github.com/relative-ci/bundle-stats/compare/v2.7.1...v2.7.2) (2021-03-13)
152
-
153
- **Note:** Version bump only for package @bundle-stats/cli-utils
154
-
155
-
156
-
157
-
158
-
159
- ## [2.7.1](https://github.com/relative-ci/bundle-stats/compare/v2.7.0...v2.7.1) (2021-03-10)
160
-
161
- **Note:** Version bump only for package @bundle-stats/cli-utils
162
-
163
-
164
-
165
-
166
-
167
- # [2.7.0](https://github.com/relative-ci/bundle-stats/compare/v2.6.0...v2.7.0) (2021-03-05)
168
-
169
- **Note:** Version bump only for package @bundle-stats/cli-utils
170
-
171
-
172
-
173
-
174
-
175
- # [2.6.0](https://github.com/relative-ci/bundle-stats/compare/v2.5.0...v2.6.0) (2021-02-06)
176
-
177
- **Note:** Version bump only for package @bundle-stats/cli-utils
178
-
179
-
180
-
181
-
182
-
183
- # [2.5.0](https://github.com/relative-ci/bundle-stats/compare/v2.4.0...v2.5.0) (2021-01-08)
184
-
185
- **Note:** Version bump only for package @bundle-stats/cli-utils
186
-
187
-
188
-
189
-
190
-
191
- # [2.4.0](https://github.com/relative-ci/bundle-stats/compare/v2.3.0...v2.4.0) (2020-12-21)
192
-
193
- **Note:** Version bump only for package @bundle-stats/cli-utils
194
-
195
-
196
-
197
-
198
-
199
- # [2.3.0](https://github.com/relative-ci/bundle-stats/compare/v2.2.0...v2.3.0) (2020-10-12)
200
-
201
-
202
- ### Bug Fixes
203
-
204
- * Regenerate package-lock.json ([0aa419e](https://github.com/relative-ci/bundle-stats/commit/0aa419e29b93f9ebebf1b8b79838d9e52044c9ef))
205
- * **deps:** update dependency fs-extra to v9 ([9be5705](https://github.com/relative-ci/bundle-stats/commit/9be5705d2ad1e9a7e4e4196265eebc932bda0811))
206
- * **deps:** update dependency lodash to v4.17.19 ([437d715](https://github.com/relative-ci/bundle-stats/commit/437d715bcdce3da849bffc07de9b6aafc07f5d0e))
207
-
208
-
209
-
210
-
211
-
212
- # [2.2.0](https://github.com/relative-ci/bundle-stats/compare/v2.1.1...v2.2.0) (2020-04-13)
213
-
214
- **Note:** Version bump only for package @bundle-stats/cli-utils
215
-
216
-
217
-
218
-
219
-
220
- ## [2.1.1](https://github.com/relative-ci/bundle-stats/compare/v2.1.0...v2.1.1) (2020-03-29)
221
-
222
- **Note:** Version bump only for package @bundle-stats/cli-utils
223
-
224
-
225
-
226
-
227
-
228
- # [2.1.0](https://github.com/relative-ci/bundle-stats/compare/v2.0.1...v2.1.0) (2020-03-29)
229
-
230
- **Note:** Version bump only for package @bundle-stats/cli-utils
231
-
232
-
233
-
234
-
235
-
236
- ## [2.0.1](https://github.com/relative-ci/bundle-stats/compare/v2.0.0...v2.0.1) (2020-03-04)
237
-
238
- **Note:** Version bump only for package @bundle-stats/cli-utils
239
-
240
-
241
-
242
-
243
-
244
- # [2.0.0](https://github.com/relative-ci/bundle-stats/compare/v2.0.0-rc.1...v2.0.0) (2020-02-29)
245
-
246
-
247
- ### Bug Fixes
248
-
249
- * Update lock files ([b946889](https://github.com/relative-ci/bundle-stats/commit/b946889f8fdd9eecfce008db6a69ee5d1336faa3))