@code-pushup/core 0.9.0 → 0.10.0

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.
Files changed (2) hide show
  1. package/index.js +14 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -582,6 +582,18 @@ function formatDuration(duration) {
582
582
  }
583
583
  return `${(duration / 1e3).toFixed(2)} s`;
584
584
  }
585
+ function formatDate(date) {
586
+ const locale = "en-US";
587
+ return date.toLocaleString(locale, {
588
+ weekday: "short",
589
+ month: "short",
590
+ day: "numeric",
591
+ year: "numeric",
592
+ hour: "numeric",
593
+ minute: "2-digit",
594
+ timeZoneName: "short"
595
+ }).replace(/\u202F/g, " ");
596
+ }
585
597
 
586
598
  // packages/utils/src/lib/guards.ts
587
599
  function isPromiseFulfilledResult(result) {
@@ -1215,7 +1227,7 @@ function reportToDetailsSection(audit) {
1215
1227
  return details(detailsTitle, detailsTable);
1216
1228
  }
1217
1229
  function reportToAboutSection(report, commitData) {
1218
- const date = (/* @__PURE__ */ new Date()).toString();
1230
+ const date = formatDate(/* @__PURE__ */ new Date());
1219
1231
  const { duration, version: version2, plugins, categories } = report;
1220
1232
  const commitInfo = commitData ? `${commitData.message} (${commitData.hash.slice(0, 7)})` : "N/A";
1221
1233
  const reportMetaTable = [
@@ -1668,7 +1680,7 @@ function auditOutputsCorrelateWithPluginOutput(auditOutputs, pluginConfigAudits)
1668
1680
 
1669
1681
  // packages/core/package.json
1670
1682
  var name = "@code-pushup/core";
1671
- var version = "0.9.0";
1683
+ var version = "0.10.0";
1672
1684
 
1673
1685
  // packages/core/src/lib/implementation/collect.ts
1674
1686
  async function collect(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "dependencies": {
5
5
  "@code-pushup/models": "*",
6
6
  "@code-pushup/utils": "*",