@fuzdev/fuz_gitops 0.78.0 → 0.79.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 (196) hide show
  1. package/README.md +91 -17
  2. package/dist/ModulesDetail.svelte +22 -27
  3. package/dist/ModulesDetail.svelte.d.ts.map +1 -1
  4. package/dist/ModulesNav.svelte +8 -5
  5. package/dist/ModulesNav.svelte.d.ts.map +1 -1
  6. package/dist/ModulesPage.svelte +3 -5
  7. package/dist/ModulesPage.svelte.d.ts.map +1 -1
  8. package/dist/PageFooter.svelte +2 -2
  9. package/dist/PageHeader.svelte +6 -6
  10. package/dist/PageHeader.svelte.d.ts +0 -3
  11. package/dist/PageHeader.svelte.d.ts.map +1 -1
  12. package/dist/PullRequestsDetail.svelte +29 -20
  13. package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
  14. package/dist/PullRequestsPage.svelte +4 -6
  15. package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
  16. package/dist/ReposTable.svelte +43 -55
  17. package/dist/ReposTable.svelte.d.ts.map +1 -1
  18. package/dist/ReposTree.svelte +9 -21
  19. package/dist/ReposTree.svelte.d.ts.map +1 -1
  20. package/dist/ReposTreeNav.svelte +9 -12
  21. package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
  22. package/dist/TablePage.svelte +3 -5
  23. package/dist/TablePage.svelte.d.ts.map +1 -1
  24. package/dist/TreeItemPage.svelte +3 -5
  25. package/dist/TreeItemPage.svelte.d.ts.map +1 -1
  26. package/dist/TreePage.svelte +3 -5
  27. package/dist/TreePage.svelte.d.ts.map +1 -1
  28. package/dist/changeset_generator.d.ts.map +1 -1
  29. package/dist/changeset_generator.js +2 -2
  30. package/dist/changeset_reader.d.ts.map +1 -1
  31. package/dist/changeset_reader.js +3 -3
  32. package/dist/ci_reconcile.d.ts +6 -10
  33. package/dist/ci_reconcile.d.ts.map +1 -1
  34. package/dist/ci_reconcile.js +6 -8
  35. package/dist/dependency_graph.d.ts +26 -49
  36. package/dist/dependency_graph.d.ts.map +1 -1
  37. package/dist/dependency_graph.js +40 -83
  38. package/dist/dependency_updater.d.ts +1 -1
  39. package/dist/dependency_updater.d.ts.map +1 -1
  40. package/dist/dependency_updater.js +14 -9
  41. package/dist/fetch_repo_data.d.ts +34 -8
  42. package/dist/fetch_repo_data.d.ts.map +1 -1
  43. package/dist/fetch_repo_data.js +44 -22
  44. package/dist/fs_fetch_value_cache.d.ts +1 -1
  45. package/dist/fs_fetch_value_cache.d.ts.map +1 -1
  46. package/dist/fs_fetch_value_cache.js +3 -3
  47. package/dist/git_operations.d.ts +6 -49
  48. package/dist/git_operations.d.ts.map +1 -1
  49. package/dist/git_operations.js +13 -126
  50. package/dist/github.d.ts +17 -2
  51. package/dist/github.d.ts.map +1 -1
  52. package/dist/github.js +17 -8
  53. package/dist/github_helpers.d.ts.map +1 -1
  54. package/dist/github_helpers.js +3 -11
  55. package/dist/gitops_analyze.task.d.ts +24 -2
  56. package/dist/gitops_analyze.task.d.ts.map +1 -1
  57. package/dist/gitops_analyze.task.js +47 -34
  58. package/dist/gitops_config.d.ts +34 -79
  59. package/dist/gitops_config.d.ts.map +1 -1
  60. package/dist/gitops_config.js +76 -53
  61. package/dist/gitops_constants.d.ts +6 -4
  62. package/dist/gitops_constants.d.ts.map +1 -1
  63. package/dist/gitops_constants.js +6 -4
  64. package/dist/gitops_plan.task.d.ts +29 -3
  65. package/dist/gitops_plan.task.d.ts.map +1 -1
  66. package/dist/gitops_plan.task.js +83 -61
  67. package/dist/gitops_publish.task.d.ts +62 -2
  68. package/dist/gitops_publish.task.d.ts.map +1 -1
  69. package/dist/gitops_publish.task.js +193 -105
  70. package/dist/gitops_run.task.d.ts +74 -0
  71. package/dist/gitops_run.task.d.ts.map +1 -1
  72. package/dist/gitops_run.task.js +176 -162
  73. package/dist/gitops_sync.task.d.ts +65 -3
  74. package/dist/gitops_sync.task.d.ts.map +1 -1
  75. package/dist/gitops_sync.task.js +163 -37
  76. package/dist/gitops_task_helpers.d.ts +86 -59
  77. package/dist/gitops_task_helpers.d.ts.map +1 -1
  78. package/dist/gitops_task_helpers.js +120 -79
  79. package/dist/gitops_validate.task.d.ts +1 -2
  80. package/dist/gitops_validate.task.d.ts.map +1 -1
  81. package/dist/gitops_validate.task.js +25 -32
  82. package/dist/graph_validation.d.ts +16 -27
  83. package/dist/graph_validation.d.ts.map +1 -1
  84. package/dist/graph_validation.js +24 -65
  85. package/dist/local_repo.d.ts +50 -62
  86. package/dist/local_repo.d.ts.map +1 -1
  87. package/dist/local_repo.js +83 -196
  88. package/dist/log_helpers.d.ts +8 -8
  89. package/dist/log_helpers.d.ts.map +1 -1
  90. package/dist/multi_repo_publisher.d.ts +10 -0
  91. package/dist/multi_repo_publisher.d.ts.map +1 -1
  92. package/dist/multi_repo_publisher.js +125 -61
  93. package/dist/npm_registry.d.ts +23 -19
  94. package/dist/npm_registry.d.ts.map +1 -1
  95. package/dist/npm_registry.js +21 -48
  96. package/dist/operations.d.ts +75 -180
  97. package/dist/operations.d.ts.map +1 -1
  98. package/dist/operations.js +15 -7
  99. package/dist/operations_defaults.d.ts +17 -2
  100. package/dist/operations_defaults.d.ts.map +1 -1
  101. package/dist/operations_defaults.js +111 -128
  102. package/dist/output_helpers.d.ts +36 -0
  103. package/dist/output_helpers.d.ts.map +1 -1
  104. package/dist/output_helpers.js +37 -3
  105. package/dist/preflight_checks.d.ts +20 -27
  106. package/dist/preflight_checks.d.ts.map +1 -1
  107. package/dist/preflight_checks.js +37 -126
  108. package/dist/publish_gate.d.ts.map +1 -1
  109. package/dist/publish_steps.d.ts +2 -4
  110. package/dist/publish_steps.d.ts.map +1 -1
  111. package/dist/publish_steps.js +4 -8
  112. package/dist/publishing_event.d.ts +2 -8
  113. package/dist/publishing_event.d.ts.map +1 -1
  114. package/dist/publishing_event.js +20 -17
  115. package/dist/publishing_event_handler.d.ts +10 -8
  116. package/dist/publishing_event_handler.d.ts.map +1 -1
  117. package/dist/publishing_event_handler.js +19 -17
  118. package/dist/publishing_plan.d.ts +16 -1
  119. package/dist/publishing_plan.d.ts.map +1 -1
  120. package/dist/publishing_plan.js +332 -254
  121. package/dist/publishing_plan_helpers.d.ts.map +1 -1
  122. package/dist/publishing_plan_helpers.js +3 -3
  123. package/dist/publishing_plan_logging.d.ts +1 -1
  124. package/dist/publishing_plan_logging.d.ts.map +1 -1
  125. package/dist/publishing_plan_logging.js +22 -15
  126. package/dist/repo.svelte.d.ts +7 -0
  127. package/dist/repo.svelte.d.ts.map +1 -1
  128. package/dist/repo.svelte.js +3 -0
  129. package/dist/repo_readiness.d.ts +210 -0
  130. package/dist/repo_readiness.d.ts.map +1 -0
  131. package/dist/repo_readiness.js +516 -0
  132. package/dist/repos_status.d.ts +3340 -0
  133. package/dist/repos_status.d.ts.map +1 -0
  134. package/dist/repos_status.js +555 -0
  135. package/dist/repos_status_load.d.ts +65 -0
  136. package/dist/repos_status_load.d.ts.map +1 -0
  137. package/dist/repos_status_load.js +131 -0
  138. package/dist/version_utils.js +1 -1
  139. package/package.json +15 -34
  140. package/src/lib/cargo_toml.ts +3 -3
  141. package/src/lib/changeset_generator.ts +19 -19
  142. package/src/lib/changeset_reader.ts +18 -18
  143. package/src/lib/ci_reconcile.ts +12 -16
  144. package/src/lib/dependency_graph.ts +61 -113
  145. package/src/lib/dependency_updater.ts +36 -30
  146. package/src/lib/fetch_repo_data.ts +71 -34
  147. package/src/lib/fs_fetch_value_cache.ts +15 -11
  148. package/src/lib/git_operations.ts +22 -194
  149. package/src/lib/github.ts +33 -21
  150. package/src/lib/github_helpers.ts +9 -16
  151. package/src/lib/gitops_analyze.task.ts +104 -66
  152. package/src/lib/gitops_config.ts +90 -139
  153. package/src/lib/gitops_constants.ts +6 -4
  154. package/src/lib/gitops_plan.task.ts +128 -76
  155. package/src/lib/gitops_publish.task.ts +280 -144
  156. package/src/lib/gitops_run.task.ts +265 -193
  157. package/src/lib/gitops_sync.task.ts +236 -52
  158. package/src/lib/gitops_task_helpers.ts +170 -114
  159. package/src/lib/gitops_validate.task.ts +44 -54
  160. package/src/lib/graph_validation.ts +28 -89
  161. package/src/lib/local_repo.ts +128 -335
  162. package/src/lib/log_helpers.ts +18 -28
  163. package/src/lib/multi_repo_publisher.ts +192 -110
  164. package/src/lib/npm_registry.ts +42 -67
  165. package/src/lib/operations.ts +99 -160
  166. package/src/lib/operations_defaults.ts +157 -201
  167. package/src/lib/output_helpers.ts +58 -6
  168. package/src/lib/preflight_checks.ts +52 -188
  169. package/src/lib/publish_gate.ts +7 -9
  170. package/src/lib/publish_steps.ts +27 -25
  171. package/src/lib/publishing_event.ts +26 -23
  172. package/src/lib/publishing_event_handler.ts +24 -22
  173. package/src/lib/publishing_plan.ts +474 -310
  174. package/src/lib/publishing_plan_helpers.ts +16 -12
  175. package/src/lib/publishing_plan_logging.ts +53 -44
  176. package/src/lib/repo.svelte.ts +16 -8
  177. package/src/lib/repo_readiness.ts +647 -0
  178. package/src/lib/repos_status.ts +671 -0
  179. package/src/lib/repos_status_load.ts +173 -0
  180. package/src/lib/version_utils.ts +3 -3
  181. package/dist/config_reconcile.d.ts +0 -46
  182. package/dist/config_reconcile.d.ts.map +0 -1
  183. package/dist/config_reconcile.js +0 -60
  184. package/dist/paths.d.ts +0 -7
  185. package/dist/paths.d.ts.map +0 -1
  186. package/dist/paths.js +0 -6
  187. package/dist/repo_ops.d.ts +0 -59
  188. package/dist/repo_ops.d.ts.map +0 -1
  189. package/dist/repo_ops.js +0 -170
  190. package/dist/resolved_gitops_config.d.ts +0 -9
  191. package/dist/resolved_gitops_config.d.ts.map +0 -1
  192. package/dist/resolved_gitops_config.js +0 -12
  193. package/src/lib/config_reconcile.ts +0 -94
  194. package/src/lib/paths.ts +0 -6
  195. package/src/lib/repo_ops.ts +0 -216
  196. package/src/lib/resolved_gitops_config.ts +0 -27
@@ -6,9 +6,13 @@
6
6
  * @module
7
7
  */
8
8
 
9
- import type {LocalRepo} from './local_repo.ts';
10
- import {needs_update, required_bump_for_dependency_update, type BumpType} from './version_utils.ts';
11
- import type {DependencyUpdate} from './publishing_plan.ts';
9
+ import type { LocalRepo } from './local_repo.ts';
10
+ import {
11
+ needs_update,
12
+ required_bump_for_dependency_update,
13
+ type BumpType
14
+ } from './version_utils.ts';
15
+ import type { DependencyUpdate } from './publishing_plan.ts';
12
16
 
13
17
  /**
14
18
  * Calculates all dependency updates between packages based on predicted versions.
@@ -21,7 +25,7 @@ import type {DependencyUpdate} from './publishing_plan.ts';
21
25
  export const calculate_dependency_updates = (
22
26
  repos: Array<LocalRepo>,
23
27
  predicted_versions: Map<string, string>,
24
- breaking_packages: Set<string>,
28
+ breaking_packages: Set<string>
25
29
  ): {
26
30
  dependency_updates: Array<DependencyUpdate>;
27
31
  breaking_cascades: Map<string, Array<string>>;
@@ -40,7 +44,7 @@ export const calculate_dependency_updates = (
40
44
  updated_dependency: dep_name,
41
45
  current_version,
42
46
  new_version,
43
- type: 'dependencies',
47
+ type: 'dependencies'
44
48
  });
45
49
 
46
50
  if (breaking_packages.has(dep_name)) {
@@ -64,7 +68,7 @@ export const calculate_dependency_updates = (
64
68
  updated_dependency: dep_name,
65
69
  current_version,
66
70
  new_version,
67
- type: 'peerDependencies',
71
+ type: 'peerDependencies'
68
72
  });
69
73
 
70
74
  if (breaking_packages.has(dep_name)) {
@@ -88,14 +92,14 @@ export const calculate_dependency_updates = (
88
92
  updated_dependency: dep_name,
89
93
  current_version,
90
94
  new_version,
91
- type: 'devDependencies',
95
+ type: 'devDependencies'
92
96
  });
93
97
  }
94
98
  }
95
99
  }
96
100
  }
97
101
 
98
- return {dependency_updates, breaking_cascades};
102
+ return { dependency_updates, breaking_cascades };
99
103
  };
100
104
 
101
105
  /**
@@ -109,13 +113,13 @@ export const calculate_dependency_updates = (
109
113
  export const get_required_bump_for_dependencies = (
110
114
  repo: LocalRepo,
111
115
  dependency_updates: Array<DependencyUpdate>,
112
- breaking_packages: Set<string>,
116
+ breaking_packages: Set<string>
113
117
  ): BumpType | null => {
114
118
  // Check if this repo has any prod/peer dependency updates
115
119
  const relevant_updates = dependency_updates.filter(
116
120
  (update) =>
117
121
  update.dependent_package === repo.library.name &&
118
- (update.type === 'dependencies' || update.type === 'peerDependencies'),
122
+ (update.type === 'dependencies' || update.type === 'peerDependencies')
119
123
  );
120
124
 
121
125
  if (relevant_updates.length === 0) {
@@ -124,11 +128,11 @@ export const get_required_bump_for_dependencies = (
124
128
 
125
129
  // Check if any of these dependencies have breaking changes
126
130
  const has_breaking_deps = relevant_updates.some((update) =>
127
- breaking_packages.has(update.updated_dependency),
131
+ breaking_packages.has(update.updated_dependency)
128
132
  );
129
133
 
130
134
  return required_bump_for_dependency_update(
131
135
  repo.package_json.version || '0.0.0',
132
- has_breaking_deps,
136
+ has_breaking_deps
133
137
  );
134
138
  };
@@ -6,18 +6,19 @@
6
6
  * @module
7
7
  */
8
8
 
9
- import type {Logger} from '@fuzdev/fuz_util/log.ts';
10
- import {styleText as st} from 'node:util';
11
-
12
- import type {
13
- PublishingPlan,
14
- VersionChange,
15
- DependencyUpdate,
16
- VerboseData,
17
- VerboseChangesetDetail,
18
- VerboseIteration,
19
- VerbosePropagationChain,
20
- VerboseGraphSummary,
9
+ import type { Logger } from '@fuzdev/fuz_util/log.ts';
10
+ import { styleText as st } from 'node:util';
11
+
12
+ import {
13
+ version_change_kind,
14
+ type PublishingPlan,
15
+ type VersionChange,
16
+ type DependencyUpdate,
17
+ type VerboseData,
18
+ type VerboseChangesetDetail,
19
+ type VerboseIteration,
20
+ type VerbosePropagationChain,
21
+ type VerboseGraphSummary
21
22
  } from './publishing_plan.ts';
22
23
 
23
24
  export interface LogPlanOptions {
@@ -42,7 +43,7 @@ const log_section_header = (title: string, log: Logger): void => {
42
43
  const format_dep_diff = (dep_name: string, current: string, next: string): Array<string> => {
43
44
  return [
44
45
  st('red', ` - "${dep_name}": "${current}"`),
45
- st('green', ` + "${dep_name}": "${next}"`),
46
+ st('green', ` + "${dep_name}": "${next}"`)
46
47
  ];
47
48
  };
48
49
 
@@ -51,7 +52,7 @@ const format_dep_diff = (dep_name: string, current: string, next: string): Array
51
52
  */
52
53
  const get_updates_for_package = (
53
54
  pkg_name: string,
54
- dependency_updates: Array<DependencyUpdate>,
55
+ dependency_updates: Array<DependencyUpdate>
55
56
  ): Map<string, Array<DependencyUpdate>> => {
56
57
  const updates: Map<string, Array<DependencyUpdate>> = new Map();
57
58
  for (const update of dependency_updates) {
@@ -73,37 +74,39 @@ const log_version_change_with_diffs = (
73
74
  total: number,
74
75
  dependency_updates: Array<DependencyUpdate>,
75
76
  breaking_cascades: Map<string, Array<string>>,
76
- log: Logger,
77
+ log: Logger
77
78
  ): void => {
78
79
  const breaking_indicator = change.breaking ? st('red', ' BREAKING') : '';
79
80
  const position = st('dim', `[${index + 1}/${total}]`);
80
81
 
82
+ const kind = version_change_kind(change);
83
+
81
84
  // Determine scenario label
82
85
  let scenario_label = '';
83
- if (change.needs_bump_escalation) {
86
+ if (kind === 'escalation') {
84
87
  scenario_label = st('yellow', ` [${change.existing_bump} → ${change.required_bump}]`);
85
- } else if (change.will_generate_changeset) {
88
+ } else if (kind === 'auto') {
86
89
  scenario_label = st('cyan', ' [auto-changeset]');
87
90
  }
88
91
 
89
92
  // Main version line
90
93
  log.info(
91
94
  `${position} ${change.package_name}: ${change.from} → ${st('green', change.to)} ` +
92
- `(${change.bump_type})${scenario_label}${breaking_indicator}`,
95
+ `(${change.bump_type})${scenario_label}${breaking_indicator}`
93
96
  );
94
97
 
95
98
  // Show escalation reason
96
- if (change.needs_bump_escalation) {
99
+ if (kind === 'escalation') {
97
100
  log.info(
98
101
  st(
99
102
  'dim',
100
- ` changesets specify ${change.existing_bump}, dependencies require ${change.required_bump}`,
101
- ),
103
+ ` changesets specify ${change.existing_bump}, dependencies require ${change.required_bump}`
104
+ )
102
105
  );
103
106
  }
104
107
 
105
108
  // Show trigger reason for auto-changesets
106
- if (change.will_generate_changeset) {
109
+ if (kind === 'auto') {
107
110
  // Find what triggered this
108
111
  const triggers: Array<string> = [];
109
112
  for (const [pkg, affected] of breaking_cascades) {
@@ -138,7 +141,7 @@ const log_version_change_with_diffs = (
138
141
  export const log_publishing_plan = (
139
142
  plan: PublishingPlan,
140
143
  log: Logger,
141
- options: LogPlanOptions = {},
144
+ options: LogPlanOptions = {}
142
145
  ): void => {
143
146
  const {
144
147
  publishing_order,
@@ -147,7 +150,8 @@ export const log_publishing_plan = (
147
150
  breaking_cascades,
148
151
  warnings,
149
152
  info,
150
- errors,
153
+ no_changes,
154
+ errors
151
155
  } = plan;
152
156
 
153
157
  // Errors first (blocking issues)
@@ -175,22 +179,22 @@ export const log_publishing_plan = (
175
179
  return idx_a - idx_b;
176
180
  });
177
181
 
178
- // Separate into groups for headers
179
- const with_changesets = ordered_changes.filter(
180
- (vc) => vc.has_changesets && !vc.needs_bump_escalation,
182
+ // Separate into groups for headers; each change lands in exactly one
183
+ const with_changesets = ordered_changes.filter((vc) => version_change_kind(vc) === 'explicit');
184
+ const with_escalation = ordered_changes.filter(
185
+ (vc) => version_change_kind(vc) === 'escalation'
181
186
  );
182
- const with_escalation = ordered_changes.filter((vc) => vc.needs_bump_escalation);
183
- const with_auto_changesets = ordered_changes.filter((vc) => vc.will_generate_changeset);
187
+ const with_auto_changesets = ordered_changes.filter((vc) => version_change_kind(vc) === 'auto');
184
188
 
185
189
  // A single running counter across all groups so positions read 1..N with no
186
190
  // gaps. (Numbering per-group index would make the first group skip the numbers
187
191
  // that land in a later group, e.g. jump from `[9/12]` to `[11/12]`.)
188
- const total = with_changesets.length + with_escalation.length + with_auto_changesets.length;
192
+ const total = ordered_changes.length;
189
193
  let position = 0;
190
194
  const log_change_group = (
191
195
  title: string,
192
196
  color: 'cyan' | 'yellow',
193
- changes: Array<VersionChange>,
197
+ changes: Array<VersionChange>
194
198
  ): void => {
195
199
  if (changes.length === 0) return;
196
200
  log.info(st(color, title));
@@ -201,7 +205,7 @@ export const log_publishing_plan = (
201
205
  total,
202
206
  dependency_updates,
203
207
  breaking_cascades,
204
- log,
208
+ log
205
209
  );
206
210
  }
207
211
  log.info('');
@@ -219,7 +223,7 @@ export const log_publishing_plan = (
219
223
  const dep_only_packages: Set<string> = new Set();
220
224
  for (const update of dependency_updates) {
221
225
  const has_version_change = version_changes.some(
222
- (vc) => vc.package_name === update.dependent_package,
226
+ (vc) => vc.package_name === update.dependent_package
223
227
  );
224
228
  if (!has_version_change) {
225
229
  dep_only_packages.add(update.dependent_package);
@@ -251,15 +255,20 @@ export const log_publishing_plan = (
251
255
  log.info('');
252
256
  }
253
257
 
254
- // Info (packages with no changes)
255
- if (info.length > 0) {
256
- log.info(st('dim', `No changes: ${info.join(', ')}`));
258
+ // Info sentences, then the packages with nothing to publish
259
+ for (const line of info) {
260
+ log.info(st('dim', line));
261
+ }
262
+ if (no_changes.length > 0) {
263
+ log.info(st('dim', `No changes: ${no_changes.join(', ')}`));
264
+ }
265
+ if (info.length > 0 || no_changes.length > 0) {
257
266
  log.info('');
258
267
  }
259
268
 
260
269
  // Summary
261
270
  const major_count = version_changes.filter((vc) => vc.breaking).length;
262
- const auto_count = version_changes.filter((vc) => vc.will_generate_changeset).length;
271
+ const auto_count = version_changes.filter((vc) => version_change_kind(vc) === 'auto').length;
263
272
  log.info(st('cyan', 'Summary:'));
264
273
  log.info(` ${version_changes.length} packages to publish`);
265
274
  if (auto_count > 0) {
@@ -303,7 +312,7 @@ const log_verbose = (data: VerboseData, log: Logger): void => {
303
312
  */
304
313
  const log_verbose_changeset_details = (
305
314
  details: Array<VerboseChangesetDetail>,
306
- log: Logger,
315
+ log: Logger
307
316
  ): void => {
308
317
  if (details.length === 0) return;
309
318
 
@@ -325,7 +334,7 @@ const log_verbose_changeset_details = (
325
334
  const log_verbose_iteration_details = (
326
335
  iterations: Array<VerboseIteration>,
327
336
  total: number,
328
- log: Logger,
337
+ log: Logger
329
338
  ): void => {
330
339
  if (iterations.length === 0) return;
331
340
 
@@ -389,7 +398,7 @@ const log_verbose_iteration_details = (
389
398
  */
390
399
  const log_verbose_propagation_chains = (
391
400
  chains: Array<VerbosePropagationChain>,
392
- log: Logger,
401
+ log: Logger
393
402
  ): void => {
394
403
  if (chains.length === 0) return;
395
404
 
@@ -403,7 +412,7 @@ const log_verbose_propagation_chains = (
403
412
  const indent = ' '.repeat(i);
404
413
  const connector = '└─';
405
414
  log.info(
406
- st('dim', `${indent}${connector} ${item.pkg} (${item.dep_type} dep) → ${item.action}`),
415
+ st('dim', `${indent}${connector} ${item.pkg} (${item.dep_type} dep) → ${item.action}`)
407
416
  );
408
417
  }
409
418
  }
@@ -419,8 +428,8 @@ const log_verbose_graph_summary = (summary: VerboseGraphSummary, log: Logger): v
419
428
  log.info(
420
429
  st(
421
430
  'dim',
422
- `${summary.package_count} packages, ${summary.internal_dep_count} internal dependencies`,
423
- ),
431
+ `${summary.package_count} packages, ${summary.internal_dep_count} internal dependencies`
432
+ )
424
433
  );
425
434
  log.info('');
426
435
 
@@ -446,7 +455,7 @@ const log_verbose_graph_summary = (summary: VerboseGraphSummary, log: Logger): v
446
455
 
447
456
  log.info('');
448
457
  log.info(
449
- st('dim', `Cycles: ${summary.prod_cycle_count} production, ${summary.dev_cycle_count} dev`),
458
+ st('dim', `Cycles: ${summary.prod_cycle_count} production, ${summary.dev_cycle_count} dev`)
450
459
  );
451
460
  log.info('');
452
461
  };
@@ -1,11 +1,11 @@
1
- import {create_context} from '@fuzdev/fuz_ui/context_helpers.ts';
2
- import type {LibraryJson, SourceJson} from '@fuzdev/fuz_util/library_json.ts';
3
- import type {PkgJson} from '@fuzdev/fuz_util/pkg_json.ts';
4
- import type {PackageJson} from '@fuzdev/fuz_util/package_json.ts';
5
- import type {Url} from '@fuzdev/fuz_util/url.ts';
6
- import {Library} from '@fuzdev/fuz_ui/library.svelte.ts';
1
+ import { create_context } from '@fuzdev/fuz_ui/context_helpers.ts';
2
+ import type { LibraryJson, SourceJson } from '@fuzdev/fuz_util/library_json.ts';
3
+ import type { PkgJson } from '@fuzdev/fuz_util/pkg_json.ts';
4
+ import type { PackageJson } from '@fuzdev/fuz_util/package_json.ts';
5
+ import type { Url } from '@fuzdev/fuz_util/url.ts';
6
+ import { Library } from '@fuzdev/fuz_ui/library.svelte.ts';
7
7
 
8
- import {GithubCheckRunsItem, type GithubPullRequest} from './github.ts';
8
+ import { GithubCheckRunsItem, type GithubPullRequest } from './github.ts';
9
9
 
10
10
  /**
11
11
  * Serialized repo data as stored in `repos.ts` (JSON).
@@ -17,6 +17,11 @@ import {GithubCheckRunsItem, type GithubPullRequest} from './github.ts';
17
17
  export interface RepoJson {
18
18
  library_json: LibraryJson;
19
19
  package_json: PackageJson;
20
+ /**
21
+ * The branch the repo's registry entry follows, which `check_runs` was
22
+ * fetched for. `Repo.branch` reads `main` when it's absent.
23
+ */
24
+ branch?: string;
20
25
  check_runs: GithubCheckRunsItem | null;
21
26
  pull_requests: Array<GithubPullRequest> | null;
22
27
  }
@@ -31,6 +36,8 @@ export class Repo {
31
36
  readonly library: Library;
32
37
  /** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
33
38
  readonly package_json: PackageJson;
39
+ /** The branch CI status was fetched for and the dashboard links to. */
40
+ readonly branch: string;
34
41
  check_runs: GithubCheckRunsItem | null;
35
42
  pull_requests: Array<GithubPullRequest> | null;
36
43
 
@@ -70,6 +77,7 @@ export class Repo {
70
77
  constructor(repo_json: RepoJson) {
71
78
  this.library = new Library(repo_json.library_json);
72
79
  this.package_json = repo_json.package_json;
80
+ this.branch = repo_json.branch ?? 'main';
73
81
  this.check_runs = repo_json.check_runs;
74
82
  this.pull_requests = repo_json.pull_requests;
75
83
  }
@@ -87,5 +95,5 @@ export const repos_parse = (repos: Array<Repo>, homepage_url: string): Repos =>
87
95
  const repo = repos.find((d) => d.homepage_url === homepage_url);
88
96
  if (!repo) throw Error(`Cannot find repo with homepage_url: ${homepage_url}`);
89
97
 
90
- return {repo, repos};
98
+ return { repo, repos };
91
99
  };