@fuzdev/fuz_gitops 0.67.0 → 0.69.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 (89) hide show
  1. package/dist/ModulesDetail.svelte +14 -14
  2. package/dist/ModulesNav.svelte +2 -2
  3. package/dist/PageFooter.svelte +1 -1
  4. package/dist/ReposTable.svelte +1 -1
  5. package/dist/ReposTree.svelte +6 -6
  6. package/dist/ReposTreeNav.svelte +1 -1
  7. package/dist/TablePage.svelte +1 -7
  8. package/dist/TreeItemPage.svelte +3 -3
  9. package/dist/TreePage.svelte +3 -3
  10. package/dist/changeset_generator.d.ts +4 -4
  11. package/dist/changeset_generator.js +5 -5
  12. package/dist/changeset_reader.d.ts +6 -4
  13. package/dist/changeset_reader.d.ts.map +1 -1
  14. package/dist/changeset_reader.js +7 -5
  15. package/dist/dependency_graph.d.ts +3 -3
  16. package/dist/dependency_graph.js +3 -3
  17. package/dist/dependency_updater.d.ts +4 -4
  18. package/dist/dependency_updater.js +5 -5
  19. package/dist/fetch_repo_data.d.ts +4 -4
  20. package/dist/fetch_repo_data.d.ts.map +1 -1
  21. package/dist/fetch_repo_data.js +4 -5
  22. package/dist/fs_fetch_value_cache.d.ts +4 -4
  23. package/dist/fs_fetch_value_cache.js +4 -4
  24. package/dist/git_operations.d.ts +5 -5
  25. package/dist/git_operations.d.ts.map +1 -1
  26. package/dist/git_operations.js +18 -18
  27. package/dist/github.d.ts +1 -1
  28. package/dist/gitops_plan.task.d.ts +3 -3
  29. package/dist/gitops_plan.task.js +3 -3
  30. package/dist/gitops_run.task.js +1 -1
  31. package/dist/gitops_task_helpers.d.ts +5 -5
  32. package/dist/gitops_task_helpers.js +5 -5
  33. package/dist/graph_validation.d.ts +5 -5
  34. package/dist/graph_validation.js +5 -5
  35. package/dist/local_repo.d.ts +6 -6
  36. package/dist/local_repo.js +12 -9
  37. package/dist/multi_repo_publisher.d.ts.map +1 -1
  38. package/dist/multi_repo_publisher.js +4 -4
  39. package/dist/npm_install_helpers.d.ts +3 -3
  40. package/dist/npm_install_helpers.js +3 -3
  41. package/dist/npm_registry.d.ts +4 -4
  42. package/dist/npm_registry.js +5 -6
  43. package/dist/operations.d.ts +19 -17
  44. package/dist/operations.d.ts.map +1 -1
  45. package/dist/operations.js +1 -1
  46. package/dist/operations_defaults.d.ts.map +1 -1
  47. package/dist/operations_defaults.js +49 -14
  48. package/dist/output_helpers.d.ts +2 -2
  49. package/dist/output_helpers.js +2 -2
  50. package/dist/paths.d.ts +1 -1
  51. package/dist/paths.js +1 -1
  52. package/dist/preflight_checks.d.ts +2 -2
  53. package/dist/preflight_checks.js +7 -7
  54. package/dist/publishing_plan.js +4 -4
  55. package/dist/publishing_plan_helpers.d.ts +1 -1
  56. package/dist/publishing_plan_helpers.js +1 -1
  57. package/dist/repo.svelte.d.ts +3 -3
  58. package/dist/repo.svelte.js +2 -2
  59. package/dist/repo_ops.d.ts +6 -6
  60. package/dist/repo_ops.js +7 -7
  61. package/dist/version_utils.d.ts +2 -2
  62. package/dist/version_utils.js +2 -2
  63. package/package.json +18 -16
  64. package/src/lib/changeset_generator.ts +5 -5
  65. package/src/lib/changeset_reader.ts +7 -5
  66. package/src/lib/dependency_graph.ts +3 -3
  67. package/src/lib/dependency_updater.ts +5 -5
  68. package/src/lib/fetch_repo_data.ts +4 -6
  69. package/src/lib/fs_fetch_value_cache.ts +4 -4
  70. package/src/lib/git_operations.ts +32 -18
  71. package/src/lib/github.ts +1 -1
  72. package/src/lib/gitops_plan.task.ts +3 -3
  73. package/src/lib/gitops_run.task.ts +1 -1
  74. package/src/lib/gitops_task_helpers.ts +5 -5
  75. package/src/lib/graph_validation.ts +5 -5
  76. package/src/lib/local_repo.ts +18 -11
  77. package/src/lib/multi_repo_publisher.ts +4 -6
  78. package/src/lib/npm_install_helpers.ts +3 -3
  79. package/src/lib/npm_registry.ts +6 -6
  80. package/src/lib/operations.ts +19 -17
  81. package/src/lib/operations_defaults.ts +47 -16
  82. package/src/lib/output_helpers.ts +2 -2
  83. package/src/lib/paths.ts +1 -1
  84. package/src/lib/preflight_checks.ts +7 -7
  85. package/src/lib/publishing_plan.ts +4 -4
  86. package/src/lib/publishing_plan_helpers.ts +1 -1
  87. package/src/lib/repo.svelte.ts +3 -3
  88. package/src/lib/repo_ops.ts +7 -7
  89. package/src/lib/version_utils.ts +2 -2
@@ -51,7 +51,7 @@ export interface RunPreflightChecksOptions {
51
51
  * Performs comprehensive pre-flight validation:
52
52
  * - Clean workspaces (100% clean required - no uncommitted changes)
53
53
  * - Correct branch (usually main)
54
- * - Changesets present (unless skip_changesets=true)
54
+ * - Changesets present (unless `skip_changesets`=true)
55
55
  * - Builds successful (fail-fast to prevent broken state)
56
56
  * - Git remote reachability
57
57
  * - NPM authentication with username
@@ -60,7 +60,7 @@ export interface RunPreflightChecksOptions {
60
60
  * Build validation runs BEFORE any publishing to prevent the scenario where
61
61
  * version is bumped but build fails, leaving repo in broken state.
62
62
  *
63
- * @returns result with ok=false if any errors, plus warnings and detailed status
63
+ * @returns result with `ok`=false if any errors, plus warnings and detailed status
64
64
  */
65
65
  export const run_preflight_checks = async ({
66
66
  repos,
@@ -91,7 +91,7 @@ export const run_preflight_checks = async ({
91
91
  // 1. Check clean workspaces - must be 100% clean before publishing
92
92
  log?.info(' Checking workspace cleanliness...');
93
93
  for (const repo of repos) {
94
- const clean_result = await git_ops.check_clean_workspace({cwd: repo.repo_dir}); // eslint-disable-line no-await-in-loop
94
+ const clean_result = await git_ops.check_clean_workspace({cwd: repo.repo_dir});
95
95
  if (!clean_result.ok) {
96
96
  errors.push(`${repo.library.name} failed workspace check: ${clean_result.message}`);
97
97
  continue;
@@ -99,7 +99,7 @@ export const run_preflight_checks = async ({
99
99
 
100
100
  if (!clean_result.value) {
101
101
  // Get list of changed files for better error message
102
- const files_result = await git_ops.get_changed_files({cwd: repo.repo_dir}); // eslint-disable-line no-await-in-loop
102
+ const files_result = await git_ops.list_uncommitted_files({cwd: repo.repo_dir});
103
103
  if (files_result.ok) {
104
104
  // No filtering - workspace must be 100% clean
105
105
  const unexpected_files = files_result.value;
@@ -118,7 +118,7 @@ export const run_preflight_checks = async ({
118
118
  // 2. Check correct branch
119
119
  log?.info(` Checking branches (expecting ${required_branch})...`);
120
120
  for (const repo of repos) {
121
- const branch_result = await git_ops.current_branch_name({cwd: repo.repo_dir}); // eslint-disable-line no-await-in-loop
121
+ const branch_result = await git_ops.current_branch_name({cwd: repo.repo_dir});
122
122
  if (!branch_result.ok) {
123
123
  errors.push(`${repo.library.name} failed branch check: ${branch_result.message}`);
124
124
  continue;
@@ -135,7 +135,7 @@ export const run_preflight_checks = async ({
135
135
  if (!skip_changesets) {
136
136
  log?.info(' Checking for changesets...');
137
137
  for (const repo of repos) {
138
- const has_result = await changeset_ops.has_changesets({repo}); // eslint-disable-line no-await-in-loop
138
+ const has_result = await changeset_ops.has_changesets({repo});
139
139
  if (!has_result.ok) {
140
140
  errors.push(`${repo.library.name} failed changeset check: ${has_result.message}`);
141
141
  continue;
@@ -164,7 +164,7 @@ export const run_preflight_checks = async ({
164
164
  log?.info(
165
165
  st('dim', ` [${i + 1}/${repos_to_build.length}] Building ${repo.library.name}...`),
166
166
  );
167
- const build_result = await build_ops.build_package({repo, log}); // eslint-disable-line no-await-in-loop
167
+ const build_result = await build_ops.build_package({repo, log});
168
168
  if (!build_result.ok) {
169
169
  errors.push(
170
170
  `${repo.library.name} failed to build: ${build_result.output || build_result.message || 'unknown error'}`,
@@ -179,7 +179,7 @@ export const generate_publishing_plan = async (
179
179
  if (!repo) continue;
180
180
 
181
181
  // Check for changesets
182
- const has_result = await ops.has_changesets({repo}); // eslint-disable-line no-await-in-loop
182
+ const has_result = await ops.has_changesets({repo});
183
183
 
184
184
  if (!has_result.ok) {
185
185
  errors.push(`Failed to check changesets for ${pkg_name}: ${has_result.message}`);
@@ -188,7 +188,7 @@ export const generate_publishing_plan = async (
188
188
 
189
189
  if (has_result.value) {
190
190
  // Predict version from changesets
191
- const prediction = await ops.predict_next_version({repo, log}); // eslint-disable-line no-await-in-loop
191
+ const prediction = await ops.predict_next_version({repo, log});
192
192
 
193
193
  if (!prediction) {
194
194
  // No changesets found - this shouldn't happen since has_changesets returned true
@@ -202,7 +202,7 @@ export const generate_publishing_plan = async (
202
202
 
203
203
  // Capture changeset details for verbose output
204
204
  if (verbose) {
205
- const changesets_result = await ops.read_changesets({repo, log}); // eslint-disable-line no-await-in-loop
205
+ const changesets_result = await ops.read_changesets({repo, log});
206
206
  if (changesets_result.ok) {
207
207
  const files = changesets_result.value
208
208
  .filter((cs) => cs.packages.some((p) => p.name === pkg_name))
@@ -445,7 +445,7 @@ export const generate_publishing_plan = async (
445
445
  for (const repo of repos) {
446
446
  const has_version_change = version_changes.some((vc) => vc.package_name === repo.library.name);
447
447
  if (!has_version_change) {
448
- const has_result = await ops.has_changesets({repo}); // eslint-disable-line no-await-in-loop
448
+ const has_result = await ops.has_changesets({repo});
449
449
  if (has_result.ok && !has_result.value) {
450
450
  info.push(repo.library.name);
451
451
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Helper functions for publishing plan calculations.
3
3
  *
4
- * Extracted from publishing_plan.ts to reduce file size.
4
+ * Extracted from `publishing_plan.ts` to reduce file size.
5
5
  *
6
6
  * @module
7
7
  */
@@ -9,7 +9,7 @@ import type {Module} from '@fuzdev/fuz_ui/module.svelte.js';
9
9
  import {GithubCheckRunsItem, type GithubPullRequest} from './github.js';
10
10
 
11
11
  /**
12
- * Serialized repo data as stored in repos.ts (JSON).
12
+ * Serialized repo data as stored in `repos.ts` (JSON).
13
13
  */
14
14
  export interface RepoJson {
15
15
  library_json: LibraryJson;
@@ -18,9 +18,9 @@ export interface RepoJson {
18
18
  }
19
19
 
20
20
  /**
21
- * Runtime repo with Library composition for package metadata.
21
+ * Runtime repo with `Library` composition for package metadata.
22
22
  *
23
- * Wraps a Library instance and adds GitHub-specific data (CI status, PRs).
23
+ * Wraps a `Library` instance and adds GitHub-specific data (CI status, PRs).
24
24
  * Convenience getters delegate to `this.library.*` for common properties.
25
25
  */
26
26
  export class Repo {
@@ -6,7 +6,7 @@
6
6
  * - Walking files in repos with sensible exclusions
7
7
  * - Common exclusion patterns for node/svelte projects
8
8
  *
9
- * For full git sync/clone functionality, use `get_gitops_ready()` from gitops_task_helpers.
9
+ * For full git sync/clone functionality, use `get_gitops_ready()` from `gitops_task_helpers`.
10
10
  *
11
11
  * @module
12
12
  */
@@ -83,8 +83,8 @@ export interface RepoPath {
83
83
  * Get repo paths from gitops config without full git sync.
84
84
  * Lighter weight than `get_gitops_ready()` - just resolves paths.
85
85
  *
86
- * @param config_path Path to gitops.config.ts (defaults to ./gitops.config.ts)
87
- * @returns Array of repo info with name, path, and url
86
+ * @param config_path - path to `gitops.config.ts` (defaults to `./gitops.config.ts`)
87
+ * @returns array of repo info with name, path, and url
88
88
  */
89
89
  export const get_repo_paths = async (config_path?: string): Promise<Array<RepoPath>> => {
90
90
  const resolved_config_path = resolve(config_path ?? GITOPS_CONFIG_PATH_DEFAULT);
@@ -152,8 +152,8 @@ export const should_exclude_path = (file_path: string, options?: WalkOptions): b
152
152
  * Walk files in a directory, respecting common exclusions.
153
153
  * Yields absolute paths to files (and optionally directories).
154
154
  *
155
- * @param dir Directory to walk
156
- * @param options Walk options for exclusions and filtering
155
+ * @param dir - directory to walk
156
+ * @param options - walk options for exclusions and filtering
157
157
  */
158
158
  export async function* walk_repo_files(
159
159
  dir: string,
@@ -186,7 +186,7 @@ export async function* walk_repo_files(
186
186
  } else if (entry.isFile()) {
187
187
  // Check file size
188
188
  try {
189
- const file_stat = await stat(full_path); // eslint-disable-line no-await-in-loop
189
+ const file_stat = await stat(full_path);
190
190
  if (file_stat.size <= max_file_size) {
191
191
  yield full_path;
192
192
  }
@@ -201,7 +201,7 @@ export async function* walk_repo_files(
201
201
  }
202
202
 
203
203
  /**
204
- * Collect all files from walk_repo_files into an array.
204
+ * Collect all files from `walk_repo_files` into an array.
205
205
  * Convenience function for when you need all paths upfront.
206
206
  */
207
207
  export const collect_repo_files = async (
@@ -25,7 +25,7 @@ export const get_version_prefix = (version: string): string => {
25
25
  * Normalizes version string for comparison.
26
26
  *
27
27
  * Strips prefixes (^, ~, >=) to get bare version number.
28
- * Handles wildcards as-is. Used by needs_update to compare versions.
28
+ * Handles wildcards as-is. Used by `needs_update` to compare versions.
29
29
  *
30
30
  * @example
31
31
  * ```ts
@@ -74,7 +74,7 @@ export const needs_update = (current: string, new_version: string): boolean => {
74
74
  *
75
75
  * This preserves user intent while handling wildcard replacements sensibly.
76
76
  *
77
- * @param default_strategy prefix to use when no existing prefix found
77
+ * @param default_strategy - prefix to use when no existing prefix found
78
78
  */
79
79
  export const get_update_prefix = (
80
80
  current_version: string,