flakiness 0.305.0 → 0.307.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.
package/lib/cli/cli.js CHANGED
@@ -983,9 +983,51 @@ var TestOutcomes;
983
983
  TestOutcomes2.formatCounts = formatCounts;
984
984
  })(TestOutcomes || (TestOutcomes = {}));
985
985
 
986
+ // ../server/lib/common/timePeriod.js
987
+ var TimePeriod;
988
+ ((TimePeriod2) => {
989
+ TimePeriod2.PERIODS = ["3h", "day", "usweek", "monthweek", "month", "quarter"];
990
+ const LENGTHS = {
991
+ "3h": { hours: 3 },
992
+ day: { days: 1 },
993
+ usweek: { weeks: 1 },
994
+ month: { months: 1 },
995
+ quarter: { months: 3 }
996
+ };
997
+ function periodStart(period, time) {
998
+ if (period === "3h")
999
+ return time.round({ smallestUnit: "hour", roundingIncrement: 3, roundingMode: "floor" });
1000
+ const day = time.toPlainDate();
1001
+ if (period === "day")
1002
+ return day.toPlainDateTime();
1003
+ if (period === "usweek")
1004
+ return day.subtract({ days: day.dayOfWeek % 7 }).toPlainDateTime();
1005
+ if (period === "monthweek")
1006
+ return day.with({ day: Math.min(Math.floor((day.day - 1) / 7), 3) * 7 + 1 }).toPlainDateTime();
1007
+ if (period === "month")
1008
+ return day.with({ day: 1 }).toPlainDateTime();
1009
+ return day.with({ month: Math.floor((day.month - 1) / 3) * 3 + 1, day: 1 }).toPlainDateTime();
1010
+ }
1011
+ TimePeriod2.periodStart = periodStart;
1012
+ function periodEnd(period, time) {
1013
+ const start = periodStart(period, time);
1014
+ if (period === "monthweek")
1015
+ return start.day < 22 ? start.add({ days: 7 }) : periodEnd("month", start);
1016
+ return start.add(LENGTHS[period]);
1017
+ }
1018
+ TimePeriod2.periodEnd = periodEnd;
1019
+ function lastDay(until) {
1020
+ return until.subtract({ nanoseconds: 1 }).toPlainDate();
1021
+ }
1022
+ TimePeriod2.lastDay = lastDay;
1023
+ })(TimePeriod || (TimePeriod = {}));
1024
+
986
1025
  // ../server/lib/common/wireTypes.js
987
1026
  var WireTypes;
988
1027
  ((WireTypes2) => {
1028
+ WireTypes2.OUTCOME_CLASSIFICATIONS = ["eod", "worst"];
1029
+ WireTypes2.HISTORY_TYPES = ["commit", ...TimePeriod.PERIODS];
1030
+ WireTypes2.ANALYTICS_OUTCOMES = ["expected", "unexpected", "flaked", "skipped"];
989
1031
  WireTypes2.SORT_AXES = {
990
1032
  tests: [
991
1033
  "name",
@@ -1059,7 +1101,7 @@ import { Temporal as Temporal2 } from "temporal-polyfill";
1059
1101
  // ../package.json
1060
1102
  var package_default = {
1061
1103
  name: "@flakiness/monorepo",
1062
- version: "0.305.0",
1104
+ version: "0.307.0",
1063
1105
  type: "module",
1064
1106
  private: true,
1065
1107
  scripts: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flakiness",
3
- "version": "0.305.0",
3
+ "version": "0.307.0",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "flakiness": "./lib/cli/cli.js"
@@ -19,8 +19,8 @@
19
19
  "author": "Degu Labs, Inc",
20
20
  "license": "MIT",
21
21
  "devDependencies": {
22
- "@flakiness/server": "0.305.0",
23
- "@flakiness/shared": "0.305.0",
22
+ "@flakiness/server": "0.307.0",
23
+ "@flakiness/shared": "0.307.0",
24
24
  "@playwright/test": "^1.62.1",
25
25
  "@types/debug": "^4.1.13",
26
26
  "@types/express": "^4.17.25",