@fuzdev/fuz_gitops 0.73.0 → 0.74.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/README.md CHANGED
@@ -14,8 +14,8 @@ fuz_gitops is alternative to the monorepo pattern that more loosely couples repo
14
14
  With fuz_gitops you can:
15
15
 
16
16
  - dynamically compose repos
17
- - fetch metadata about collections of repos and import it as typesafe JSON (using
18
- [Gro's public package patterns](https://github.com/fuzdev/gro/blob/main/src/docs/gro_plugin_sveltekit_app.md#well_known_package_json))
17
+ - fetch metadata about collections of repos and import it as typesafe JSON (using fuz_ui's
18
+ [vite_plugin_pkg_json](https://ui.fuz.dev/docs/vite_plugin_pkg_json))
19
19
  - publish a generated docs website for your collections of repos
20
20
  - import its components to view and interact with repo collection metadata
21
21
  - publish metadata about your collections of repos to the web for other users and tools
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type {PackageJson} from '@fuzdev/fuz_util/package_json.js';
2
+ import type {PkgJson} from '@fuzdev/fuz_util/pkg_json.js';
3
3
  import Breadcrumb from '@fuzdev/fuz_ui/Breadcrumb.svelte';
4
4
  import type {Snippet} from 'svelte';
5
5
  import type {SvelteHTMLElements} from 'svelte/elements';
@@ -11,7 +11,7 @@
11
11
  nav,
12
12
  children,
13
13
  }: {
14
- repo: {package_json: PackageJson} | {url: string; package_json: null};
14
+ repo: {pkg_json: PkgJson} | {url: string; pkg_json: null};
15
15
  nav_attrs?: SvelteHTMLElements['nav'];
16
16
  attrs?: SvelteHTMLElements['header'];
17
17
  nav?: Snippet;
@@ -24,7 +24,7 @@
24
24
  {#if nav}
25
25
  {@render nav()}
26
26
  {:else}
27
- <nav {...nav_attrs}><Breadcrumb>{repo.package_json?.glyph}</Breadcrumb></nav>
27
+ <nav {...nav_attrs}><Breadcrumb>{repo.pkg_json?.glyph}</Breadcrumb></nav>
28
28
  {/if}
29
29
  </header>
30
30
 
@@ -1,12 +1,12 @@
1
- import type { PackageJson } from '@fuzdev/fuz_util/package_json.js';
1
+ import type { PkgJson } from '@fuzdev/fuz_util/pkg_json.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { SvelteHTMLElements } from 'svelte/elements';
4
4
  type $$ComponentProps = {
5
5
  repo: {
6
- package_json: PackageJson;
6
+ pkg_json: PkgJson;
7
7
  } | {
8
8
  url: string;
9
- package_json: null;
9
+ pkg_json: null;
10
10
  };
11
11
  nav_attrs?: SvelteHTMLElements['nav'];
12
12
  attrs?: SvelteHTMLElements['header'];
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeader.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PageHeader.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE;QAAC,YAAY,EAAE,WAAW,CAAA;KAAC,GAAG;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,IAAI,CAAA;KAAC,CAAC;IACtE,SAAS,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA6BH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"PageHeader.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PageHeader.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AAE1D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAC,GAAG;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAC,CAAC;IAC1D,SAAS,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA6BH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -40,7 +40,7 @@ export const create_changeset_for_dependency_updates = async (repo, updates, opt
40
40
  log?.info(` Created changeset: ${filename}`);
41
41
  return filepath;
42
42
  };
43
- const calculate_required_bump = (repo, updates) => required_bump_for_dependency_update(repo.library.package_json.version || '0.0.0', updates.some((u) => u.breaking));
43
+ const calculate_required_bump = (repo, updates) => required_bump_for_dependency_update(repo.package_json.version || '0.0.0', updates.some((u) => u.breaking));
44
44
  /**
45
45
  * Generates markdown changeset content for dependency updates.
46
46
  *
@@ -161,7 +161,7 @@ export const predict_next_version = async (repo, log) => {
161
161
  if (!bump_type) {
162
162
  return null;
163
163
  }
164
- const current_version = repo.library.package_json.version || '0.0.0';
164
+ const current_version = repo.package_json.version || '0.0.0';
165
165
  const next_version = calculate_next_version(current_version, bump_type);
166
166
  log?.debug(` Predicted ${repo.library.name}: ${current_version} → ${next_version} (${bump_type})`);
167
167
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"dependency_graph.d.ts","sourceRoot":"../src/lib/","sources":["../src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YAAC,GAAG,EAAE,MAAM,CAAA;SAAC,CAAC,CAAC;KACjD;CAmBD"}
@@ -24,19 +24,19 @@ export class DependencyGraph {
24
24
  init_from_repos(repos) {
25
25
  // First pass: create nodes
26
26
  for (const repo of repos) {
27
- const { library } = repo;
27
+ const { library, package_json } = repo;
28
28
  const node = {
29
29
  name: library.name,
30
- version: library.package_json.version || '0.0.0',
30
+ version: package_json.version || '0.0.0',
31
31
  repo,
32
32
  dependencies: new Map(),
33
33
  dependents: new Set(),
34
- publishable: !library.package_json.private,
34
+ publishable: !package_json.private,
35
35
  };
36
36
  // Extract dependencies
37
- const deps = library.package_json.dependencies || EMPTY_OBJECT;
38
- const dev_deps = library.package_json.devDependencies || EMPTY_OBJECT;
39
- const peer_deps = library.package_json.peerDependencies || EMPTY_OBJECT;
37
+ const deps = package_json.dependencies || EMPTY_OBJECT;
38
+ const dev_deps = package_json.devDependencies || EMPTY_OBJECT;
39
+ const peer_deps = package_json.peerDependencies || EMPTY_OBJECT;
40
40
  // Add dependencies, prioritizing prod/peer over dev
41
41
  // (if a package appears in multiple dep types, use the stronger constraint)
42
42
  for (const [name, version] of Object.entries(deps)) {
@@ -1 +1 @@
1
- {"version":3,"file":"fetch_repo_data.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/fetch_repo_data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAG/D,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAC3B,gBAAgB,KAAK,CAAC,SAAS,CAAC,EAChC,QAAQ,MAAM,EACd,QAAQ,eAAe,EACvB,MAAM,MAAM,EACZ,cAAU,EACV,qBAAqB,MAAM,KACzB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAiCzB,CAAC"}
1
+ {"version":3,"file":"fetch_repo_data.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/fetch_repo_data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAG/D,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAC3B,gBAAgB,KAAK,CAAC,SAAS,CAAC,EAChC,QAAQ,MAAM,EACd,QAAQ,eAAe,EACvB,MAAM,MAAM,EACZ,cAAU,EACV,qBAAqB,MAAM,KACzB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAkCzB,CAAC"}
@@ -15,7 +15,7 @@ import { fetch_github_check_runs, fetch_github_pull_requests } from './github.js
15
15
  */
16
16
  export const fetch_repo_data = async (resolved_repos, token, cache, log, delay = 33, github_api_version) => {
17
17
  const repos = [];
18
- for (const { library, library_json, repo_config } of resolved_repos) {
18
+ for (const { library, package_json, repo_config } of resolved_repos) {
19
19
  const repo_url = library.repo_url;
20
20
  // CI status
21
21
  await wait(delay);
@@ -39,7 +39,8 @@ export const fetch_repo_data = async (resolved_repos, token, cache, log, delay =
39
39
  if (!pull_requests)
40
40
  log?.error('failed to fetch issues: ' + repo_url);
41
41
  repos.push({
42
- library_json,
42
+ library_json: library.library_json,
43
+ package_json,
43
44
  check_runs,
44
45
  pull_requests,
45
46
  });
@@ -1,4 +1,4 @@
1
- import type { LibraryJson } from '@fuzdev/fuz_util/library_json.js';
1
+ import type { PackageJson } from '@fuzdev/fuz_util/package_json.js';
2
2
  import { Library } from '@fuzdev/fuz_ui/library.svelte.js';
3
3
  import type { Logger } from '@fuzdev/fuz_util/log.js';
4
4
  import type { GitOperations, NpmOperations } from './operations.js';
@@ -10,7 +10,8 @@ import type { ResolvedGitopsConfig } from './resolved_gitops_config.js';
10
10
  */
11
11
  export interface LocalRepo {
12
12
  library: Library;
13
- library_json: LibraryJson;
13
+ /** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
14
+ package_json: PackageJson;
14
15
  repo_dir: string;
15
16
  repo_git_ssh_url: string;
16
17
  repo_config: GitopsRepoConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"local_repo.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/local_repo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AAKzD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAGpD,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAGlE,OAAO,KAAK,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAGtE;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,WAAW,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,iBAAiB,C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,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,KAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CA6C3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,6BAG/B;IACF,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CAClB,KAAG,aAAa,GAAG,gBAoBnB,CAAC"}
@@ -71,7 +71,10 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
71
71
  throw new TaskError(`Failed to check for remote in ${repo_dir}: ${origin_result.message}`);
72
72
  }
73
73
  if (origin_result.value) {
74
- const pull_result = await git_ops.pull({ cwd: repo_dir });
74
+ // Pull the configured branch explicitly. Without a branch, `git pull origin`
75
+ // targets the remote's default branch (origin/HEAD), which for a repo checked
76
+ // out on a non-default branch rebases the wrong branch onto it.
77
+ const pull_result = await git_ops.pull({ branch: repo_config.branch, cwd: repo_dir });
75
78
  if (!pull_result.ok) {
76
79
  throw new TaskError(`Failed to pull in ${repo_dir}: ${pull_result.message}`);
77
80
  }
@@ -116,8 +119,9 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
116
119
  }
117
120
  // Load library metadata via svelte-docinfo analysis (cached under `.gro/library.json`).
118
121
  let library_json;
122
+ let package_json;
119
123
  try {
120
- library_json = await library_load_from_repo(repo_dir, { log: _log });
124
+ ({ library_json, package_json } = await library_load_from_repo(repo_dir, { log: _log }));
121
125
  }
122
126
  catch (err) {
123
127
  const message = err instanceof Error ? err.message : String(err);
@@ -127,13 +131,12 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
127
131
  const library = new Library(library_json);
128
132
  const local_repo = {
129
133
  library,
130
- library_json,
134
+ package_json,
131
135
  repo_dir,
132
136
  repo_git_ssh_url,
133
137
  repo_config,
134
138
  };
135
- // Extract dependencies from package_json
136
- const { package_json } = library;
139
+ // Extract dependencies from the full package_json
137
140
  if (package_json.dependencies) {
138
141
  local_repo.dependencies = new Map(Object.entries(package_json.dependencies));
139
142
  }
@@ -1 +1 @@
1
- {"version":3,"file":"operations_defaults.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/operations_defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,OAAO,KAAK,EACX,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,MAAM,iBAAiB,CAAC;AA0BzB,eAAO,MAAM,4BAA4B,EAAE,mBAuB1C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aA0GpC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,iBAsBxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAmDpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,mBAI1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAuCnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAmBtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAQvC,CAAC"}
1
+ {"version":3,"file":"operations_defaults.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/operations_defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,OAAO,KAAK,EACX,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,MAAM,iBAAiB,CAAC;AA0BzB,eAAO,MAAM,4BAA4B,EAAE,mBAuB1C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aA4GpC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,iBAsBxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAmDpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,mBAI1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAuCnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAmBtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAQvC,CAAC"}
@@ -80,7 +80,9 @@ export const default_git_operations = {
80
80
  pull: async (options) => {
81
81
  const { origin, branch, cwd } = options ?? EMPTY_OBJECT;
82
82
  try {
83
- const spawned = await spawn_out('git', ['pull', origin || 'origin', branch || ''], cwd ? { cwd } : undefined);
83
+ // Omit the branch arg when absent: a trailing `''` makes git pull the remote's
84
+ // default branch (origin/HEAD) instead of the current branch's upstream.
85
+ const spawned = await spawn_out('git', ['pull', origin || 'origin', ...(branch ? [branch] : [])], cwd ? { cwd } : undefined);
84
86
  if (spawned.result.ok) {
85
87
  return { ok: true };
86
88
  }
@@ -74,7 +74,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
74
74
  // publish step, npm-wait, bump escalation, or auto-changeset). They keep their slot in
75
75
  // the topological order. Flag a private package that carries a changeset, since that
76
76
  // changeset can't be published.
77
- if (repo.library.package_json.private) {
77
+ if (repo.package_json.private) {
78
78
  const private_has_changesets = await ops.has_changesets({ repo });
79
79
  if (private_has_changesets.ok && private_has_changesets.value) {
80
80
  warnings.push(`${pkg_name} is private — its changeset(s) will not be published`);
@@ -118,7 +118,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
118
118
  }
119
119
  }
120
120
  {
121
- const old_version = repo.library.package_json.version || '0.0.0';
121
+ const old_version = repo.package_json.version || '0.0.0';
122
122
  const is_breaking = is_breaking_change(old_version, prediction.bump_type);
123
123
  predicted_versions.set(pkg_name, prediction.version);
124
124
  if (is_breaking) {
@@ -153,7 +153,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
153
153
  const pkg_name = repo.library.name;
154
154
  // Private packages are excluded from version changes (they never publish), so they
155
155
  // never escalate or auto-generate a changeset.
156
- if (repo.library.package_json.private)
156
+ if (repo.package_json.private)
157
157
  continue;
158
158
  // Get required bump from dependencies
159
159
  const required_bump = get_required_bump_for_dependencies(repo, dependency_updates, breaking_packages);
@@ -173,7 +173,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
173
173
  // Package has changesets - check if it needs bump escalation
174
174
  if (required_bump && compare_bump_types(required_bump, existing_entry.bump_type) > 0) {
175
175
  // Dependencies require a larger bump than existing changesets provide
176
- const old_version = repo.library.package_json.version || '0.0.0';
176
+ const old_version = repo.package_json.version || '0.0.0';
177
177
  const new_version = calculate_next_version(old_version, required_bump);
178
178
  // Only mark as changed if version actually changed
179
179
  if (existing_entry.to !== new_version) {
@@ -209,7 +209,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
209
209
  }
210
210
  else if (required_bump) {
211
211
  // No existing changesets but needs changeset for dependency updates
212
- const old_version = repo.library.package_json.version || '0.0.0';
212
+ const old_version = repo.package_json.version || '0.0.0';
213
213
  const new_version = calculate_next_version(old_version, required_bump);
214
214
  // Check if this is a new version (not already in version_changes)
215
215
  if (!predicted_versions.has(pkg_name)) {
@@ -263,7 +263,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
263
263
  const { dependency_updates: pending_updates } = calculate_dependency_updates(repos, predicted_versions, breaking_packages);
264
264
  for (const repo of repos) {
265
265
  const pkg_name = repo.library.name;
266
- if (repo.library.package_json.private)
266
+ if (repo.package_json.private)
267
267
  continue; // private packages never publish
268
268
  const required_bump = get_required_bump_for_dependencies(repo, pending_updates, breaking_packages);
269
269
  // Check if this package would need processing
@@ -97,5 +97,5 @@ export const get_required_bump_for_dependencies = (repo, dependency_updates, bre
97
97
  }
98
98
  // Check if any of these dependencies have breaking changes
99
99
  const has_breaking_deps = relevant_updates.some((update) => breaking_packages.has(update.updated_dependency));
100
- return required_bump_for_dependency_update(repo.library.package_json.version || '0.0.0', has_breaking_deps);
100
+ return required_bump_for_dependency_update(repo.package_json.version || '0.0.0', has_breaking_deps);
101
101
  };
@@ -1,14 +1,19 @@
1
1
  import type { LibraryJson, SourceJson } from '@fuzdev/fuz_util/library_json.js';
2
+ import type { PkgJson } from '@fuzdev/fuz_util/pkg_json.js';
2
3
  import type { PackageJson } from '@fuzdev/fuz_util/package_json.js';
3
4
  import type { Url } from '@fuzdev/fuz_util/url.js';
4
5
  import { Library } from '@fuzdev/fuz_ui/library.svelte.js';
5
- import type { Module } from '@fuzdev/fuz_ui/module.svelte.js';
6
6
  import { GithubCheckRunsItem, type GithubPullRequest } from './github.js';
7
7
  /**
8
8
  * Serialized repo data as stored in `repos.ts` (JSON).
9
+ *
10
+ * `package_json` is the repo's full `package.json`, carried alongside
11
+ * `library_json` because gitops reads `dependencies`/`devDependencies` for the
12
+ * publishing cascade — fields the curated `LibraryJson.pkg_json` omits.
9
13
  */
10
14
  export interface RepoJson {
11
15
  library_json: LibraryJson;
16
+ package_json: PackageJson;
12
17
  check_runs: GithubCheckRunsItem | null;
13
18
  pull_requests: Array<GithubPullRequest> | null;
14
19
  }
@@ -20,22 +25,21 @@ export interface RepoJson {
20
25
  */
21
26
  export declare class Repo {
22
27
  readonly library: Library;
28
+ /** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
29
+ readonly package_json: PackageJson;
23
30
  check_runs: GithubCheckRunsItem | null;
24
31
  pull_requests: Array<GithubPullRequest> | null;
25
32
  get name(): string;
26
33
  get repo_name(): string;
27
34
  get repo_url(): Url;
28
- get owner_name(): string | null;
29
35
  get homepage_url(): Url | null;
30
36
  get logo_url(): Url | null;
31
37
  get logo_alt(): string;
32
- get published(): boolean;
33
38
  get npm_url(): Url | null;
34
39
  get changelog_url(): Url | null;
35
- get package_json(): PackageJson;
40
+ /** Curated package identity, delegating to `library`. Distinct from the full `package_json`. */
41
+ get pkg_json(): PkgJson;
36
42
  get source_json(): SourceJson;
37
- get modules(): Array<Module>;
38
- get org_url(): string | null;
39
43
  constructor(repo_json: RepoJson);
40
44
  }
41
45
  export interface Repos {
@@ -1 +1 @@
1
- {"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AAC,YAAY,EAAE,WAAW,CAAC;IACnC,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACvC,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAG/C,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,SAAS,IAAI,MAAM,CAEtB;IACD,IAAI,QAAQ,IAAI,GAAG,CAElB;IACD,IAAI,YAAY,IAAI,GAAG,GAAG,IAAI,CAE7B;IACD,IAAI,QAAQ,IAAI,GAAG,GAAG,IAAI,CAEzB;IACD,IAAI,QAAQ,IAAI,MAAM,CAErB;IACD,IAAI,OAAO,IAAI,GAAG,GAAG,IAAI,CAExB;IACD,IAAI,aAAa,IAAI,GAAG,GAAG,IAAI,CAE9B;IACD,gGAAgG;IAChG,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,IAAI,WAAW,IAAI,UAAU,CAE5B;gBAEW,SAAS,EAAE,QAAQ;CAM/B;AAED,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB;AAED,eAAO,MAAM,aAAa;;;;CAA0B,CAAC;AAErD,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,cAAc,MAAM,KAAG,KAMtE,CAAC"}
@@ -9,6 +9,8 @@ import { GithubCheckRunsItem } from './github.js';
9
9
  */
10
10
  export class Repo {
11
11
  library;
12
+ /** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
13
+ package_json;
12
14
  check_runs;
13
15
  pull_requests;
14
16
  // Convenience getters delegating to library
@@ -21,9 +23,6 @@ export class Repo {
21
23
  get repo_url() {
22
24
  return this.library.repo_url;
23
25
  }
24
- get owner_name() {
25
- return this.library.owner_name;
26
- }
27
26
  get homepage_url() {
28
27
  return this.library.homepage_url;
29
28
  }
@@ -33,29 +32,22 @@ export class Repo {
33
32
  get logo_alt() {
34
33
  return this.library.logo_alt;
35
34
  }
36
- get published() {
37
- return this.library.published;
38
- }
39
35
  get npm_url() {
40
36
  return this.library.npm_url;
41
37
  }
42
38
  get changelog_url() {
43
39
  return this.library.changelog_url;
44
40
  }
45
- get package_json() {
46
- return this.library.package_json;
41
+ /** Curated package identity, delegating to `library`. Distinct from the full `package_json`. */
42
+ get pkg_json() {
43
+ return this.library.pkg_json;
47
44
  }
48
45
  get source_json() {
49
46
  return this.library.source_json;
50
47
  }
51
- get modules() {
52
- return this.library.modules;
53
- }
54
- get org_url() {
55
- return this.library.org_url;
56
- }
57
48
  constructor(repo_json) {
58
49
  this.library = new Library(repo_json.library_json);
50
+ this.package_json = repo_json.package_json;
59
51
  this.check_runs = repo_json.check_runs;
60
52
  this.pull_requests = repo_json.pull_requests;
61
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_gitops",
3
- "version": "0.73.0",
3
+ "version": "0.74.0",
4
4
  "description": "a tool for managing many repos",
5
5
  "glyph": "🪄",
6
6
  "logo": "logo.svg",
@@ -29,10 +29,10 @@
29
29
  "node": ">=24.14"
30
30
  },
31
31
  "peerDependencies": {
32
- "@fuzdev/fuz_css": ">=0.61.0",
33
- "@fuzdev/fuz_ui": ">=0.198.0",
34
- "@fuzdev/fuz_util": ">=0.63.1",
35
- "@fuzdev/gro": ">=0.200.0",
32
+ "@fuzdev/fuz_css": ">=0.62.0",
33
+ "@fuzdev/fuz_ui": ">=0.199.0",
34
+ "@fuzdev/fuz_util": ">=0.65.1",
35
+ "@fuzdev/gro": ">=0.204.0",
36
36
  "@sveltejs/kit": "^2",
37
37
  "svelte": "^5",
38
38
  "zod": "^4.3.6"
@@ -40,15 +40,15 @@
40
40
  "devDependencies": {
41
41
  "@changesets/changelog-git": "^0.2.1",
42
42
  "@fuzdev/blake3_wasm": "^0.1.1",
43
- "@fuzdev/fuz_code": "^0.45.1",
44
- "@fuzdev/fuz_css": "^0.61.1",
45
- "@fuzdev/fuz_ui": "^0.198.1",
46
- "@fuzdev/fuz_util": "^0.63.2",
47
- "@fuzdev/gro": "^0.202.0",
43
+ "@fuzdev/fuz_code": "^0.46.0",
44
+ "@fuzdev/fuz_css": "^0.62.0",
45
+ "@fuzdev/fuz_ui": "^0.199.0",
46
+ "@fuzdev/fuz_util": "^0.65.1",
47
+ "@fuzdev/gro": "^0.204.0",
48
48
  "@ryanatkn/eslint-config": "^0.12.1",
49
49
  "@sveltejs/acorn-typescript": "^1.0.9",
50
50
  "@sveltejs/adapter-static": "^3.0.10",
51
- "@sveltejs/kit": "^2.61.1",
51
+ "@sveltejs/kit": "^2.63.0",
52
52
  "@sveltejs/package": "^2.5.7",
53
53
  "@sveltejs/vite-plugin-svelte": "^6.2.4",
54
54
  "@types/estree": "^1.0.8",
@@ -60,8 +60,8 @@
60
60
  "magic-string": "^0.30.21",
61
61
  "prettier": "^3.7.4",
62
62
  "prettier-plugin-svelte": "^3.5.1",
63
- "svelte": "^5.56.0",
64
- "svelte-check": "^4.4.6",
63
+ "svelte": "^5.56.2",
64
+ "svelte-check": "^4.6.0",
65
65
  "svelte-docinfo": "^0.4.0",
66
66
  "svelte2tsx": "^0.7.52",
67
67
  "tslib": "^2.8.1",
@@ -75,7 +75,7 @@ const calculate_required_bump = (
75
75
  updates: Array<DependencyVersionChange>,
76
76
  ): BumpType =>
77
77
  required_bump_for_dependency_update(
78
- repo.library.package_json.version || '0.0.0',
78
+ repo.package_json.version || '0.0.0',
79
79
  updates.some((u) => u.breaking),
80
80
  );
81
81
 
@@ -207,7 +207,7 @@ export const predict_next_version = async (
207
207
  return null;
208
208
  }
209
209
 
210
- const current_version = repo.library.package_json.version || '0.0.0';
210
+ const current_version = repo.package_json.version || '0.0.0';
211
211
  const next_version = calculate_next_version(current_version, bump_type);
212
212
 
213
213
  log?.debug(
@@ -59,22 +59,20 @@ export class DependencyGraph {
59
59
  public init_from_repos(repos: Array<LocalRepo>): void {
60
60
  // First pass: create nodes
61
61
  for (const repo of repos) {
62
- const {library} = repo;
62
+ const {library, package_json} = repo;
63
63
  const node: DependencyNode = {
64
64
  name: library.name,
65
- version: library.package_json.version || '0.0.0',
65
+ version: package_json.version || '0.0.0',
66
66
  repo,
67
67
  dependencies: new Map(),
68
68
  dependents: new Set(),
69
- publishable: !library.package_json.private,
69
+ publishable: !package_json.private,
70
70
  };
71
71
 
72
72
  // Extract dependencies
73
- const deps = library.package_json.dependencies || (EMPTY_OBJECT as Record<string, string>);
74
- const dev_deps =
75
- library.package_json.devDependencies || (EMPTY_OBJECT as Record<string, string>);
76
- const peer_deps =
77
- library.package_json.peerDependencies || (EMPTY_OBJECT as Record<string, string>);
73
+ const deps = package_json.dependencies || (EMPTY_OBJECT as Record<string, string>);
74
+ const dev_deps = package_json.devDependencies || (EMPTY_OBJECT as Record<string, string>);
75
+ const peer_deps = package_json.peerDependencies || (EMPTY_OBJECT as Record<string, string>);
78
76
 
79
77
  // Add dependencies, prioritizing prod/peer over dev
80
78
  // (if a package appears in multiple dep types, use the stronger constraint)
@@ -28,7 +28,7 @@ export const fetch_repo_data = async (
28
28
  github_api_version?: string,
29
29
  ): Promise<Array<RepoJson>> => {
30
30
  const repos: Array<RepoJson> = [];
31
- for (const {library, library_json, repo_config} of resolved_repos) {
31
+ for (const {library, package_json, repo_config} of resolved_repos) {
32
32
  const repo_url = library.repo_url;
33
33
 
34
34
  // CI status
@@ -53,7 +53,8 @@ export const fetch_repo_data = async (
53
53
  if (!pull_requests) log?.error('failed to fetch issues: ' + repo_url);
54
54
 
55
55
  repos.push({
56
- library_json,
56
+ library_json: library.library_json,
57
+ package_json,
57
58
  check_runs,
58
59
  pull_requests,
59
60
  });
@@ -1,5 +1,6 @@
1
1
  import {strip_end} from '@fuzdev/fuz_util/string.js';
2
2
  import type {LibraryJson} from '@fuzdev/fuz_util/library_json.js';
3
+ import type {PackageJson} from '@fuzdev/fuz_util/package_json.js';
3
4
  import {Library} from '@fuzdev/fuz_ui/library.svelte.js';
4
5
  import {existsSync} from 'node:fs';
5
6
  import {join} from 'node:path';
@@ -21,7 +22,8 @@ import {GITOPS_CONCURRENCY_DEFAULT} from './gitops_constants.js';
21
22
  */
22
23
  export interface LocalRepo {
23
24
  library: Library;
24
- library_json: LibraryJson;
25
+ /** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
26
+ package_json: PackageJson;
25
27
  repo_dir: string;
26
28
  repo_git_ssh_url: string;
27
29
  repo_config: GitopsRepoConfig;
@@ -144,7 +146,10 @@ export const local_repo_load = async ({
144
146
  }
145
147
 
146
148
  if (origin_result.value) {
147
- const pull_result = await git_ops.pull({cwd: repo_dir});
149
+ // Pull the configured branch explicitly. Without a branch, `git pull origin`
150
+ // targets the remote's default branch (origin/HEAD), which for a repo checked
151
+ // out on a non-default branch rebases the wrong branch onto it.
152
+ const pull_result = await git_ops.pull({branch: repo_config.branch, cwd: repo_dir});
148
153
  if (!pull_result.ok) {
149
154
  throw new TaskError(`Failed to pull in ${repo_dir}: ${pull_result.message}`);
150
155
  }
@@ -207,8 +212,9 @@ export const local_repo_load = async ({
207
212
 
208
213
  // Load library metadata via svelte-docinfo analysis (cached under `.gro/library.json`).
209
214
  let library_json: LibraryJson;
215
+ let package_json: PackageJson;
210
216
  try {
211
- library_json = await library_load_from_repo(repo_dir, {log: _log});
217
+ ({library_json, package_json} = await library_load_from_repo(repo_dir, {log: _log}));
212
218
  } catch (err) {
213
219
  const message = err instanceof Error ? err.message : String(err);
214
220
  _log?.warn(
@@ -222,14 +228,13 @@ export const local_repo_load = async ({
222
228
 
223
229
  const local_repo: LocalRepo = {
224
230
  library,
225
- library_json,
231
+ package_json,
226
232
  repo_dir,
227
233
  repo_git_ssh_url,
228
234
  repo_config,
229
235
  };
230
236
 
231
- // Extract dependencies from package_json
232
- const {package_json} = library;
237
+ // Extract dependencies from the full package_json
233
238
  if (package_json.dependencies) {
234
239
  local_repo.dependencies = new Map(Object.entries(package_json.dependencies));
235
240
  }
@@ -119,9 +119,11 @@ export const default_git_operations: GitOperations = {
119
119
  pull: async (options) => {
120
120
  const {origin, branch, cwd} = options ?? EMPTY_OBJECT;
121
121
  try {
122
+ // Omit the branch arg when absent: a trailing `''` makes git pull the remote's
123
+ // default branch (origin/HEAD) instead of the current branch's upstream.
122
124
  const spawned = await spawn_out(
123
125
  'git',
124
- ['pull', origin || 'origin', branch || ''],
126
+ ['pull', origin || 'origin', ...(branch ? [branch] : [])],
125
127
  cwd ? {cwd} : undefined,
126
128
  );
127
129
  if (spawned.result.ok) {
@@ -185,7 +185,7 @@ export const generate_publishing_plan = async (
185
185
  // publish step, npm-wait, bump escalation, or auto-changeset). They keep their slot in
186
186
  // the topological order. Flag a private package that carries a changeset, since that
187
187
  // changeset can't be published.
188
- if (repo.library.package_json.private) {
188
+ if (repo.package_json.private) {
189
189
  const private_has_changesets = await ops.has_changesets({repo});
190
190
  if (private_has_changesets.ok && private_has_changesets.value) {
191
191
  warnings.push(`${pkg_name} is private — its changeset(s) will not be published`);
@@ -236,7 +236,7 @@ export const generate_publishing_plan = async (
236
236
  }
237
237
 
238
238
  {
239
- const old_version = repo.library.package_json.version || '0.0.0';
239
+ const old_version = repo.package_json.version || '0.0.0';
240
240
  const is_breaking = is_breaking_change(old_version, prediction.bump_type);
241
241
 
242
242
  predicted_versions.set(pkg_name, prediction.version);
@@ -284,7 +284,7 @@ export const generate_publishing_plan = async (
284
284
 
285
285
  // Private packages are excluded from version changes (they never publish), so they
286
286
  // never escalate or auto-generate a changeset.
287
- if (repo.library.package_json.private) continue;
287
+ if (repo.package_json.private) continue;
288
288
 
289
289
  // Get required bump from dependencies
290
290
  const required_bump = get_required_bump_for_dependencies(
@@ -314,7 +314,7 @@ export const generate_publishing_plan = async (
314
314
  // Package has changesets - check if it needs bump escalation
315
315
  if (required_bump && compare_bump_types(required_bump, existing_entry.bump_type) > 0) {
316
316
  // Dependencies require a larger bump than existing changesets provide
317
- const old_version = repo.library.package_json.version || '0.0.0';
317
+ const old_version = repo.package_json.version || '0.0.0';
318
318
  const new_version = calculate_next_version(old_version, required_bump);
319
319
 
320
320
  // Only mark as changed if version actually changed
@@ -356,7 +356,7 @@ export const generate_publishing_plan = async (
356
356
  }
357
357
  } else if (required_bump) {
358
358
  // No existing changesets but needs changeset for dependency updates
359
- const old_version = repo.library.package_json.version || '0.0.0';
359
+ const old_version = repo.package_json.version || '0.0.0';
360
360
  const new_version = calculate_next_version(old_version, required_bump);
361
361
 
362
362
  // Check if this is a new version (not already in version_changes)
@@ -424,7 +424,7 @@ export const generate_publishing_plan = async (
424
424
 
425
425
  for (const repo of repos) {
426
426
  const pkg_name = repo.library.name;
427
- if (repo.library.package_json.private) continue; // private packages never publish
427
+ if (repo.package_json.private) continue; // private packages never publish
428
428
  const required_bump = get_required_bump_for_dependencies(
429
429
  repo,
430
430
  pending_updates,
@@ -128,7 +128,7 @@ export const get_required_bump_for_dependencies = (
128
128
  );
129
129
 
130
130
  return required_bump_for_dependency_update(
131
- repo.library.package_json.version || '0.0.0',
131
+ repo.package_json.version || '0.0.0',
132
132
  has_breaking_deps,
133
133
  );
134
134
  };
@@ -1,17 +1,22 @@
1
1
  import {create_context} from '@fuzdev/fuz_ui/context_helpers.js';
2
2
  import type {LibraryJson, SourceJson} from '@fuzdev/fuz_util/library_json.js';
3
+ import type {PkgJson} from '@fuzdev/fuz_util/pkg_json.js';
3
4
  import type {PackageJson} from '@fuzdev/fuz_util/package_json.js';
4
5
  import type {Url} from '@fuzdev/fuz_util/url.js';
5
6
  import {Library} from '@fuzdev/fuz_ui/library.svelte.js';
6
- import type {Module} from '@fuzdev/fuz_ui/module.svelte.js';
7
7
 
8
8
  import {GithubCheckRunsItem, type GithubPullRequest} from './github.js';
9
9
 
10
10
  /**
11
11
  * Serialized repo data as stored in `repos.ts` (JSON).
12
+ *
13
+ * `package_json` is the repo's full `package.json`, carried alongside
14
+ * `library_json` because gitops reads `dependencies`/`devDependencies` for the
15
+ * publishing cascade — fields the curated `LibraryJson.pkg_json` omits.
12
16
  */
13
17
  export interface RepoJson {
14
18
  library_json: LibraryJson;
19
+ package_json: PackageJson;
15
20
  check_runs: GithubCheckRunsItem | null;
16
21
  pull_requests: Array<GithubPullRequest> | null;
17
22
  }
@@ -24,6 +29,8 @@ export interface RepoJson {
24
29
  */
25
30
  export class Repo {
26
31
  readonly library: Library;
32
+ /** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
33
+ readonly package_json: PackageJson;
27
34
  check_runs: GithubCheckRunsItem | null;
28
35
  pull_requests: Array<GithubPullRequest> | null;
29
36
 
@@ -37,9 +44,6 @@ export class Repo {
37
44
  get repo_url(): Url {
38
45
  return this.library.repo_url;
39
46
  }
40
- get owner_name(): string | null {
41
- return this.library.owner_name;
42
- }
43
47
  get homepage_url(): Url | null {
44
48
  return this.library.homepage_url;
45
49
  }
@@ -49,30 +53,23 @@ export class Repo {
49
53
  get logo_alt(): string {
50
54
  return this.library.logo_alt;
51
55
  }
52
- get published(): boolean {
53
- return this.library.published;
54
- }
55
56
  get npm_url(): Url | null {
56
57
  return this.library.npm_url;
57
58
  }
58
59
  get changelog_url(): Url | null {
59
60
  return this.library.changelog_url;
60
61
  }
61
- get package_json(): PackageJson {
62
- return this.library.package_json;
62
+ /** Curated package identity, delegating to `library`. Distinct from the full `package_json`. */
63
+ get pkg_json(): PkgJson {
64
+ return this.library.pkg_json;
63
65
  }
64
66
  get source_json(): SourceJson {
65
67
  return this.library.source_json;
66
68
  }
67
- get modules(): Array<Module> {
68
- return this.library.modules;
69
- }
70
- get org_url(): string | null {
71
- return this.library.org_url;
72
- }
73
69
 
74
70
  constructor(repo_json: RepoJson) {
75
71
  this.library = new Library(repo_json.library_json);
72
+ this.package_json = repo_json.package_json;
76
73
  this.check_runs = repo_json.check_runs;
77
74
  this.pull_requests = repo_json.pull_requests;
78
75
  }