@atlaspack/reporter-cli 2.14.3 → 2.14.4-canary.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/reporter-cli",
3
- "version": "2.14.3",
3
+ "version": "2.14.4-canary.1+9dc57fed2",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,19 +26,20 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@atlaspack/plugin": "2.14.3",
30
- "@atlaspack/types": "2.14.3",
31
- "@atlaspack/utils": "2.14.3",
29
+ "@atlaspack/plugin": "2.14.4-canary.1+9dc57fed2",
30
+ "@atlaspack/types": "2.14.4-canary.1+9dc57fed2",
31
+ "@atlaspack/utils": "2.14.4-canary.1+9dc57fed2",
32
32
  "chalk": "^4.1.0",
33
33
  "term-size": "^2.2.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@atlaspack/feature-flags": "2.14.2",
36
+ "@atlaspack/feature-flags": "2.14.1-canary.64+9dc57fed2",
37
37
  "filesize": "^6.1.0",
38
38
  "nullthrows": "^1.1.1",
39
39
  "ora": "^5.2.0",
40
40
  "string-width": "^4.2.0",
41
41
  "wrap-ansi": "^7.0.0"
42
42
  },
43
- "type": "commonjs"
43
+ "type": "commonjs",
44
+ "gitHead": "9dc57fed22b42e40b4b4a11c60d65f342fffe26c"
44
45
  }
@@ -39,6 +39,12 @@ let statusThrottle = throttle((message: string) => {
39
39
  updateSpinner(message);
40
40
  }, THROTTLE_DELAY);
41
41
 
42
+ const cacheWriteState: {|
43
+ startTime: number | null,
44
+ |} = {
45
+ startTime: null,
46
+ };
47
+
42
48
  // Exported only for test
43
49
  export async function _report(
44
50
  event: ReporterEvent,
@@ -158,13 +164,20 @@ export async function _report(
158
164
  switch (event.phase) {
159
165
  case 'start':
160
166
  updateSpinner('Writing cache to disk');
167
+ cacheWriteState.startTime = Date.now();
161
168
  break;
162
169
  case 'end':
163
170
  persistSpinner(
164
171
  'cache',
165
172
  'success',
166
- chalk.grey.bold(`Cache written to disk`),
173
+ chalk.grey.bold(
174
+ `Cache written to disk in ${prettifyTime(
175
+ Date.now() - (cacheWriteState.startTime ?? 0),
176
+ )}`,
177
+ ),
167
178
  );
179
+
180
+ cacheWriteState.startTime = null;
168
181
  break;
169
182
  }
170
183
  }