@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.
- package/README.md +91 -17
- package/dist/ModulesDetail.svelte +22 -27
- package/dist/ModulesDetail.svelte.d.ts.map +1 -1
- package/dist/ModulesNav.svelte +8 -5
- package/dist/ModulesNav.svelte.d.ts.map +1 -1
- package/dist/ModulesPage.svelte +3 -5
- package/dist/ModulesPage.svelte.d.ts.map +1 -1
- package/dist/PageFooter.svelte +2 -2
- package/dist/PageHeader.svelte +6 -6
- package/dist/PageHeader.svelte.d.ts +0 -3
- package/dist/PageHeader.svelte.d.ts.map +1 -1
- package/dist/PullRequestsDetail.svelte +29 -20
- package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
- package/dist/PullRequestsPage.svelte +4 -6
- package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
- package/dist/ReposTable.svelte +43 -55
- package/dist/ReposTable.svelte.d.ts.map +1 -1
- package/dist/ReposTree.svelte +9 -21
- package/dist/ReposTree.svelte.d.ts.map +1 -1
- package/dist/ReposTreeNav.svelte +9 -12
- package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
- package/dist/TablePage.svelte +3 -5
- package/dist/TablePage.svelte.d.ts.map +1 -1
- package/dist/TreeItemPage.svelte +3 -5
- package/dist/TreeItemPage.svelte.d.ts.map +1 -1
- package/dist/TreePage.svelte +3 -5
- package/dist/TreePage.svelte.d.ts.map +1 -1
- package/dist/changeset_generator.d.ts.map +1 -1
- package/dist/changeset_generator.js +2 -2
- package/dist/changeset_reader.d.ts.map +1 -1
- package/dist/changeset_reader.js +3 -3
- package/dist/ci_reconcile.d.ts +6 -10
- package/dist/ci_reconcile.d.ts.map +1 -1
- package/dist/ci_reconcile.js +6 -8
- package/dist/dependency_graph.d.ts +26 -49
- package/dist/dependency_graph.d.ts.map +1 -1
- package/dist/dependency_graph.js +40 -83
- package/dist/dependency_updater.d.ts +1 -1
- package/dist/dependency_updater.d.ts.map +1 -1
- package/dist/dependency_updater.js +14 -9
- package/dist/fetch_repo_data.d.ts +34 -8
- package/dist/fetch_repo_data.d.ts.map +1 -1
- package/dist/fetch_repo_data.js +44 -22
- package/dist/fs_fetch_value_cache.d.ts +1 -1
- package/dist/fs_fetch_value_cache.d.ts.map +1 -1
- package/dist/fs_fetch_value_cache.js +3 -3
- package/dist/git_operations.d.ts +6 -49
- package/dist/git_operations.d.ts.map +1 -1
- package/dist/git_operations.js +13 -126
- package/dist/github.d.ts +17 -2
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +17 -8
- package/dist/github_helpers.d.ts.map +1 -1
- package/dist/github_helpers.js +3 -11
- package/dist/gitops_analyze.task.d.ts +24 -2
- package/dist/gitops_analyze.task.d.ts.map +1 -1
- package/dist/gitops_analyze.task.js +47 -34
- package/dist/gitops_config.d.ts +34 -79
- package/dist/gitops_config.d.ts.map +1 -1
- package/dist/gitops_config.js +76 -53
- package/dist/gitops_constants.d.ts +6 -4
- package/dist/gitops_constants.d.ts.map +1 -1
- package/dist/gitops_constants.js +6 -4
- package/dist/gitops_plan.task.d.ts +29 -3
- package/dist/gitops_plan.task.d.ts.map +1 -1
- package/dist/gitops_plan.task.js +83 -61
- package/dist/gitops_publish.task.d.ts +62 -2
- package/dist/gitops_publish.task.d.ts.map +1 -1
- package/dist/gitops_publish.task.js +193 -105
- package/dist/gitops_run.task.d.ts +74 -0
- package/dist/gitops_run.task.d.ts.map +1 -1
- package/dist/gitops_run.task.js +176 -162
- package/dist/gitops_sync.task.d.ts +65 -3
- package/dist/gitops_sync.task.d.ts.map +1 -1
- package/dist/gitops_sync.task.js +163 -37
- package/dist/gitops_task_helpers.d.ts +86 -59
- package/dist/gitops_task_helpers.d.ts.map +1 -1
- package/dist/gitops_task_helpers.js +120 -79
- package/dist/gitops_validate.task.d.ts +1 -2
- package/dist/gitops_validate.task.d.ts.map +1 -1
- package/dist/gitops_validate.task.js +25 -32
- package/dist/graph_validation.d.ts +16 -27
- package/dist/graph_validation.d.ts.map +1 -1
- package/dist/graph_validation.js +24 -65
- package/dist/local_repo.d.ts +50 -62
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +83 -196
- package/dist/log_helpers.d.ts +8 -8
- package/dist/log_helpers.d.ts.map +1 -1
- package/dist/multi_repo_publisher.d.ts +10 -0
- package/dist/multi_repo_publisher.d.ts.map +1 -1
- package/dist/multi_repo_publisher.js +125 -61
- package/dist/npm_registry.d.ts +23 -19
- package/dist/npm_registry.d.ts.map +1 -1
- package/dist/npm_registry.js +21 -48
- package/dist/operations.d.ts +75 -180
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +15 -7
- package/dist/operations_defaults.d.ts +17 -2
- package/dist/operations_defaults.d.ts.map +1 -1
- package/dist/operations_defaults.js +111 -128
- package/dist/output_helpers.d.ts +36 -0
- package/dist/output_helpers.d.ts.map +1 -1
- package/dist/output_helpers.js +37 -3
- package/dist/preflight_checks.d.ts +20 -27
- package/dist/preflight_checks.d.ts.map +1 -1
- package/dist/preflight_checks.js +37 -126
- package/dist/publish_gate.d.ts.map +1 -1
- package/dist/publish_steps.d.ts +2 -4
- package/dist/publish_steps.d.ts.map +1 -1
- package/dist/publish_steps.js +4 -8
- package/dist/publishing_event.d.ts +2 -8
- package/dist/publishing_event.d.ts.map +1 -1
- package/dist/publishing_event.js +20 -17
- package/dist/publishing_event_handler.d.ts +10 -8
- package/dist/publishing_event_handler.d.ts.map +1 -1
- package/dist/publishing_event_handler.js +19 -17
- package/dist/publishing_plan.d.ts +16 -1
- package/dist/publishing_plan.d.ts.map +1 -1
- package/dist/publishing_plan.js +332 -254
- package/dist/publishing_plan_helpers.d.ts.map +1 -1
- package/dist/publishing_plan_helpers.js +3 -3
- package/dist/publishing_plan_logging.d.ts +1 -1
- package/dist/publishing_plan_logging.d.ts.map +1 -1
- package/dist/publishing_plan_logging.js +22 -15
- package/dist/repo.svelte.d.ts +7 -0
- package/dist/repo.svelte.d.ts.map +1 -1
- package/dist/repo.svelte.js +3 -0
- package/dist/repo_readiness.d.ts +210 -0
- package/dist/repo_readiness.d.ts.map +1 -0
- package/dist/repo_readiness.js +516 -0
- package/dist/repos_status.d.ts +3340 -0
- package/dist/repos_status.d.ts.map +1 -0
- package/dist/repos_status.js +555 -0
- package/dist/repos_status_load.d.ts +65 -0
- package/dist/repos_status_load.d.ts.map +1 -0
- package/dist/repos_status_load.js +131 -0
- package/dist/version_utils.js +1 -1
- package/package.json +15 -34
- package/src/lib/cargo_toml.ts +3 -3
- package/src/lib/changeset_generator.ts +19 -19
- package/src/lib/changeset_reader.ts +18 -18
- package/src/lib/ci_reconcile.ts +12 -16
- package/src/lib/dependency_graph.ts +61 -113
- package/src/lib/dependency_updater.ts +36 -30
- package/src/lib/fetch_repo_data.ts +71 -34
- package/src/lib/fs_fetch_value_cache.ts +15 -11
- package/src/lib/git_operations.ts +22 -194
- package/src/lib/github.ts +33 -21
- package/src/lib/github_helpers.ts +9 -16
- package/src/lib/gitops_analyze.task.ts +104 -66
- package/src/lib/gitops_config.ts +90 -139
- package/src/lib/gitops_constants.ts +6 -4
- package/src/lib/gitops_plan.task.ts +128 -76
- package/src/lib/gitops_publish.task.ts +280 -144
- package/src/lib/gitops_run.task.ts +265 -193
- package/src/lib/gitops_sync.task.ts +236 -52
- package/src/lib/gitops_task_helpers.ts +170 -114
- package/src/lib/gitops_validate.task.ts +44 -54
- package/src/lib/graph_validation.ts +28 -89
- package/src/lib/local_repo.ts +128 -335
- package/src/lib/log_helpers.ts +18 -28
- package/src/lib/multi_repo_publisher.ts +192 -110
- package/src/lib/npm_registry.ts +42 -67
- package/src/lib/operations.ts +99 -160
- package/src/lib/operations_defaults.ts +157 -201
- package/src/lib/output_helpers.ts +58 -6
- package/src/lib/preflight_checks.ts +52 -188
- package/src/lib/publish_gate.ts +7 -9
- package/src/lib/publish_steps.ts +27 -25
- package/src/lib/publishing_event.ts +26 -23
- package/src/lib/publishing_event_handler.ts +24 -22
- package/src/lib/publishing_plan.ts +474 -310
- package/src/lib/publishing_plan_helpers.ts +16 -12
- package/src/lib/publishing_plan_logging.ts +53 -44
- package/src/lib/repo.svelte.ts +16 -8
- package/src/lib/repo_readiness.ts +647 -0
- package/src/lib/repos_status.ts +671 -0
- package/src/lib/repos_status_load.ts +173 -0
- package/src/lib/version_utils.ts +3 -3
- package/dist/config_reconcile.d.ts +0 -46
- package/dist/config_reconcile.d.ts.map +0 -1
- package/dist/config_reconcile.js +0 -60
- package/dist/paths.d.ts +0 -7
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -6
- package/dist/repo_ops.d.ts +0 -59
- package/dist/repo_ops.d.ts.map +0 -1
- package/dist/repo_ops.js +0 -170
- package/dist/resolved_gitops_config.d.ts +0 -9
- package/dist/resolved_gitops_config.d.ts.map +0 -1
- package/dist/resolved_gitops_config.js +0 -12
- package/src/lib/config_reconcile.ts +0 -94
- package/src/lib/paths.ts +0 -6
- package/src/lib/repo_ops.ts +0 -216
- package/src/lib/resolved_gitops_config.ts +0 -27
|
@@ -1,40 +1,49 @@
|
|
|
1
|
-
import type {Task} from '@fuzdev/gro';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Task } from '@fuzdev/gro';
|
|
2
|
+
import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { styleText as st } from 'node:util';
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
get_gitops_ready,
|
|
8
|
+
log_readiness_block,
|
|
9
|
+
type ResolveGitopsReposOptions
|
|
10
|
+
} from './gitops_task_helpers.ts';
|
|
11
|
+
import type { LocalRepo } from './local_repo.ts';
|
|
12
|
+
import type { ChangesetOperations } from './operations.ts';
|
|
13
|
+
import { default_changeset_operations } from './operations_defaults.ts';
|
|
6
14
|
import {
|
|
7
15
|
generate_publishing_plan,
|
|
8
|
-
|
|
9
|
-
type PublishingPlan
|
|
10
|
-
type LogPlanOptions,
|
|
16
|
+
version_change_kind,
|
|
17
|
+
type PublishingPlan
|
|
11
18
|
} from './publishing_plan.ts';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
19
|
+
import { log_publishing_plan, type LogPlanOptions } from './publishing_plan_logging.ts';
|
|
20
|
+
import {
|
|
21
|
+
format_and_output,
|
|
22
|
+
output_is_machine,
|
|
23
|
+
route_human_output,
|
|
24
|
+
type OutputFormatters
|
|
25
|
+
} from './output_helpers.ts';
|
|
26
|
+
import { GITOPS_CONFIG_PATH_DEFAULT } from './gitops_constants.ts';
|
|
14
27
|
|
|
15
28
|
/** @nodocs */
|
|
16
29
|
export const Args = z.strictObject({
|
|
17
30
|
config: z
|
|
18
31
|
.string()
|
|
19
|
-
.meta({description: 'path to the gitops config file, absolute or relative to the cwd'})
|
|
32
|
+
.meta({ description: 'path to the gitops config file, absolute or relative to the cwd' })
|
|
20
33
|
.default(GITOPS_CONFIG_PATH_DEFAULT),
|
|
21
|
-
|
|
34
|
+
registry: z
|
|
22
35
|
.string()
|
|
23
|
-
.meta({
|
|
36
|
+
.meta({
|
|
37
|
+
description:
|
|
38
|
+
'path to the repos.toml registry, when `repos` would not find it walking up from the cwd'
|
|
39
|
+
})
|
|
24
40
|
.optional(),
|
|
25
41
|
format: z
|
|
26
42
|
.enum(['stdout', 'json', 'markdown'])
|
|
27
|
-
.meta({description: 'output format'})
|
|
43
|
+
.meta({ description: 'output format' })
|
|
28
44
|
.default('stdout'),
|
|
29
|
-
outfile: z.string().meta({description: 'write output to file instead of logging'}).optional(),
|
|
30
|
-
verbose: z.boolean().meta({description: 'show additional details'}).default(false)
|
|
31
|
-
sync: z
|
|
32
|
-
.boolean()
|
|
33
|
-
.meta({
|
|
34
|
-
description:
|
|
35
|
-
'sync repos (switch branch, pull, install) before planning instead of reading the working tree as-is',
|
|
36
|
-
})
|
|
37
|
-
.default(false),
|
|
45
|
+
outfile: z.string().meta({ description: 'write output to file instead of logging' }).optional(),
|
|
46
|
+
verbose: z.boolean().meta({ description: 'show additional details' }).default(false)
|
|
38
47
|
});
|
|
39
48
|
export type Args = z.infer<typeof Args>;
|
|
40
49
|
|
|
@@ -44,7 +53,7 @@ export type Args = z.infer<typeof Args>;
|
|
|
44
53
|
*
|
|
45
54
|
* Usage:
|
|
46
55
|
* `gro gitops_plan`
|
|
47
|
-
* `gro gitops_plan --
|
|
56
|
+
* `gro gitops_plan --registry ../repos.toml`
|
|
48
57
|
* `gro gitops_plan --config ./custom.config.ts`
|
|
49
58
|
*
|
|
50
59
|
* @nodocs
|
|
@@ -52,42 +61,73 @@ export type Args = z.infer<typeof Args>;
|
|
|
52
61
|
export const task: Task<Args> = {
|
|
53
62
|
summary: 'generate a publishing plan based on changesets',
|
|
54
63
|
Args,
|
|
55
|
-
run: async ({args, log}): Promise<void> => {
|
|
56
|
-
|
|
64
|
+
run: async ({ args, log }): Promise<void> => {
|
|
65
|
+
await run_gitops_plan(args, log);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The side effects `run_gitops_plan` reaches through, injectable for tests.
|
|
71
|
+
*
|
|
72
|
+
* @nodocs
|
|
73
|
+
*/
|
|
74
|
+
export interface GitopsPlanDeps {
|
|
75
|
+
/** Loads the configured repos as they sit (`get_gitops_ready`). */
|
|
76
|
+
load_repos: (options: ResolveGitopsReposOptions) => Promise<{ local_repos: Array<LocalRepo> }>;
|
|
77
|
+
/** Reads each repo's changesets for the plan. */
|
|
78
|
+
changeset_ops: ChangesetOperations;
|
|
79
|
+
}
|
|
57
80
|
|
|
58
|
-
|
|
81
|
+
const default_gitops_plan_deps: GitopsPlanDeps = {
|
|
82
|
+
load_repos: get_gitops_ready,
|
|
83
|
+
changeset_ops: default_changeset_operations
|
|
84
|
+
};
|
|
59
85
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Runs `gro gitops_plan`: loads the repos as they sit, logs the readiness
|
|
88
|
+
* block, generates the plan, and outputs it. Under `--format json` or
|
|
89
|
+
* `markdown` without `--outfile`, the log goes to stderr and stdout carries
|
|
90
|
+
* the document alone (`route_human_output`).
|
|
91
|
+
*
|
|
92
|
+
* @throws {Error} when the plan has errors that would block publishing, after outputting it
|
|
93
|
+
* @nodocs
|
|
94
|
+
*/
|
|
95
|
+
export const run_gitops_plan = async (
|
|
96
|
+
args: Args,
|
|
97
|
+
log: Logger,
|
|
98
|
+
deps: Partial<GitopsPlanDeps> = {}
|
|
99
|
+
): Promise<void> => {
|
|
100
|
+
const { load_repos, changeset_ops } = { ...default_gitops_plan_deps, ...deps };
|
|
101
|
+
const { config, registry, format, outfile, verbose } = args;
|
|
102
|
+
const write_stdout = route_human_output(log, output_is_machine(format, outfile));
|
|
68
103
|
|
|
69
|
-
|
|
70
|
-
log.error('No local repos found');
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
104
|
+
log.info(st('cyan', 'Generating multi-repo publishing plan...'));
|
|
73
105
|
|
|
74
|
-
|
|
106
|
+
// Load local repos as they sit, and say which aren't at rest
|
|
107
|
+
const { local_repos } = await load_repos({ config, registry, log });
|
|
108
|
+
log_readiness_block(local_repos, log);
|
|
75
109
|
|
|
76
|
-
|
|
77
|
-
const plan = await generate_publishing_plan(local_repos, {log, verbose});
|
|
110
|
+
log.info(` Found ${local_repos.length} local repos`);
|
|
78
111
|
|
|
79
|
-
|
|
80
|
-
|
|
112
|
+
// Generate publishing plan
|
|
113
|
+
const plan = await generate_publishing_plan(local_repos, { log, verbose, ops: changeset_ops });
|
|
81
114
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
115
|
+
// Format and output using output_helpers
|
|
116
|
+
await format_and_output(plan, create_plan_formatters({ verbose }), {
|
|
117
|
+
format,
|
|
118
|
+
outfile,
|
|
119
|
+
log,
|
|
120
|
+
write_stdout
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Exit with error if there are blocking issues
|
|
124
|
+
if (plan.errors.length > 0) {
|
|
125
|
+
throw new Error('Publishing plan found errors that would block publishing');
|
|
126
|
+
}
|
|
87
127
|
};
|
|
88
128
|
|
|
89
129
|
const create_plan_formatters = (
|
|
90
|
-
options: LogPlanOptions = {}
|
|
130
|
+
options: LogPlanOptions = {}
|
|
91
131
|
): OutputFormatters<PublishingPlan> => ({
|
|
92
132
|
json: (plan) => {
|
|
93
133
|
const output = {
|
|
@@ -97,12 +137,13 @@ const create_plan_formatters = (
|
|
|
97
137
|
breaking_cascades: Object.fromEntries(plan.breaking_cascades),
|
|
98
138
|
warnings: plan.warnings,
|
|
99
139
|
info: plan.info,
|
|
100
|
-
|
|
140
|
+
no_changes: plan.no_changes,
|
|
141
|
+
errors: plan.errors
|
|
101
142
|
};
|
|
102
143
|
return JSON.stringify(output, null, 2);
|
|
103
144
|
},
|
|
104
145
|
markdown: (plan) => format_plan_as_markdown(plan),
|
|
105
|
-
stdout: (plan, log) => log_publishing_plan(plan, log, options)
|
|
146
|
+
stdout: (plan, log) => log_publishing_plan(plan, log, options)
|
|
106
147
|
});
|
|
107
148
|
|
|
108
149
|
const format_plan_as_markdown = (plan: PublishingPlan): Array<string> => {
|
|
@@ -114,7 +155,8 @@ const format_plan_as_markdown = (plan: PublishingPlan): Array<string> => {
|
|
|
114
155
|
breaking_cascades,
|
|
115
156
|
warnings,
|
|
116
157
|
info,
|
|
117
|
-
|
|
158
|
+
no_changes,
|
|
159
|
+
errors
|
|
118
160
|
} = plan;
|
|
119
161
|
|
|
120
162
|
lines.push('# Publishing Plan');
|
|
@@ -140,21 +182,21 @@ const format_plan_as_markdown = (plan: PublishingPlan): Array<string> => {
|
|
|
140
182
|
|
|
141
183
|
// Version changes
|
|
142
184
|
if (version_changes.length > 0) {
|
|
143
|
-
const with_changesets = version_changes.filter(
|
|
144
|
-
|
|
185
|
+
const with_changesets = version_changes.filter((vc) => version_change_kind(vc) === 'explicit');
|
|
186
|
+
const with_escalation = version_changes.filter(
|
|
187
|
+
(vc) => version_change_kind(vc) === 'escalation'
|
|
145
188
|
);
|
|
146
|
-
const
|
|
147
|
-
const with_auto_changesets = version_changes.filter((vc) => vc.will_generate_changeset);
|
|
189
|
+
const with_auto_changesets = version_changes.filter((vc) => version_change_kind(vc) === 'auto');
|
|
148
190
|
|
|
149
191
|
if (with_changesets.length > 0) {
|
|
150
192
|
lines.push('## Version Changes (from changesets)');
|
|
151
193
|
lines.push('');
|
|
152
|
-
lines.push('| Package | From | To | Bump |
|
|
153
|
-
lines.push('
|
|
194
|
+
lines.push('| Package | From | To | Bump | Breaking |');
|
|
195
|
+
lines.push('|---------|------|----|------|----------|');
|
|
154
196
|
for (const change of with_changesets) {
|
|
155
|
-
const
|
|
197
|
+
const breaking = change.breaking ? '💥 Yes' : 'No';
|
|
156
198
|
lines.push(
|
|
157
|
-
`| \`${change.package_name}\` | ${change.from} | ${change.to} | ${change.bump_type} | ${
|
|
199
|
+
`| \`${change.package_name}\` | ${change.from} | ${change.to} | ${change.bump_type} | ${breaking} |`
|
|
158
200
|
);
|
|
159
201
|
}
|
|
160
202
|
lines.push('');
|
|
@@ -163,17 +205,17 @@ const format_plan_as_markdown = (plan: PublishingPlan): Array<string> => {
|
|
|
163
205
|
if (with_escalation.length > 0) {
|
|
164
206
|
lines.push('## Version Changes (bump escalation required)');
|
|
165
207
|
lines.push('');
|
|
166
|
-
lines.push('| Package | From | To | Changesets Bump | Required Bump |
|
|
167
|
-
lines.push('
|
|
208
|
+
lines.push('| Package | From | To | Changesets Bump | Required Bump | Breaking |');
|
|
209
|
+
lines.push('|---------|------|-----|-----------------|---------------|----------|');
|
|
168
210
|
for (const change of with_escalation) {
|
|
169
|
-
const
|
|
211
|
+
const breaking = change.breaking ? '💥 Yes' : 'No';
|
|
170
212
|
lines.push(
|
|
171
|
-
`| \`${change.package_name}\` | ${change.from} | ${change.to} | ${change.existing_bump} | ${change.required_bump} | ${
|
|
213
|
+
`| \`${change.package_name}\` | ${change.from} | ${change.to} | ${change.existing_bump} | ${change.required_bump} | ${breaking} |`
|
|
172
214
|
);
|
|
173
215
|
}
|
|
174
216
|
lines.push('');
|
|
175
217
|
lines.push(
|
|
176
|
-
'> ⬆️ These packages have changesets, but dependencies require a larger version bump.'
|
|
218
|
+
'> ⬆️ These packages have changesets, but dependencies require a larger version bump.'
|
|
177
219
|
);
|
|
178
220
|
lines.push('');
|
|
179
221
|
}
|
|
@@ -181,12 +223,12 @@ const format_plan_as_markdown = (plan: PublishingPlan): Array<string> => {
|
|
|
181
223
|
if (with_auto_changesets.length > 0) {
|
|
182
224
|
lines.push('## Version Changes (auto-generated for dependency updates)');
|
|
183
225
|
lines.push('');
|
|
184
|
-
lines.push('| Package | From | To | Bump |
|
|
185
|
-
lines.push('
|
|
226
|
+
lines.push('| Package | From | To | Bump | Breaking |');
|
|
227
|
+
lines.push('|---------|------|-----|------|----------|');
|
|
186
228
|
for (const change of with_auto_changesets) {
|
|
187
|
-
const
|
|
229
|
+
const breaking = change.breaking ? '💥 Yes' : 'No';
|
|
188
230
|
lines.push(
|
|
189
|
-
`| \`${change.package_name}\` | ${change.from} | ${change.to} | ${change.bump_type} | ${
|
|
231
|
+
`| \`${change.package_name}\` | ${change.from} | ${change.to} | ${change.bump_type} | ${breaking} |`
|
|
190
232
|
);
|
|
191
233
|
}
|
|
192
234
|
lines.push('');
|
|
@@ -234,7 +276,7 @@ const format_plan_as_markdown = (plan: PublishingPlan): Array<string> => {
|
|
|
234
276
|
? 'peer'
|
|
235
277
|
: 'dev';
|
|
236
278
|
lines.push(
|
|
237
|
-
`- "${update.updated_dependency}": "${update.current_version}" # ${type_label}
|
|
279
|
+
`- "${update.updated_dependency}": "${update.current_version}" # ${type_label}`
|
|
238
280
|
);
|
|
239
281
|
lines.push(`+ "${update.updated_dependency}": "${update.new_version}" # ${type_label}`);
|
|
240
282
|
}
|
|
@@ -255,25 +297,35 @@ const format_plan_as_markdown = (plan: PublishingPlan): Array<string> => {
|
|
|
255
297
|
lines.push('');
|
|
256
298
|
}
|
|
257
299
|
|
|
258
|
-
// Info (
|
|
300
|
+
// Info (normal status, not warnings)
|
|
259
301
|
if (info.length > 0) {
|
|
260
|
-
lines.push('## ℹ️
|
|
302
|
+
lines.push('## ℹ️ Info');
|
|
303
|
+
lines.push('');
|
|
304
|
+
for (const line of info) {
|
|
305
|
+
lines.push(`- ${line}`);
|
|
306
|
+
}
|
|
307
|
+
lines.push('');
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Packages with nothing to publish (normal status)
|
|
311
|
+
if (no_changes.length > 0) {
|
|
312
|
+
lines.push('## No Changes to Publish');
|
|
261
313
|
lines.push('');
|
|
262
|
-
lines.push('*These packages have no changesets and
|
|
314
|
+
lines.push('*These packages have no changesets and nothing to publish:*');
|
|
263
315
|
lines.push('');
|
|
264
|
-
for (const pkg of
|
|
316
|
+
for (const pkg of no_changes) {
|
|
265
317
|
lines.push(`- \`${pkg}\``);
|
|
266
318
|
}
|
|
267
319
|
lines.push('');
|
|
268
320
|
}
|
|
269
321
|
|
|
270
322
|
// Summary
|
|
271
|
-
const
|
|
323
|
+
const breaking_count = version_changes.filter((vc) => vc.breaking).length;
|
|
272
324
|
lines.push('## Summary');
|
|
273
325
|
lines.push('');
|
|
274
326
|
lines.push(`- **Packages to publish**: ${version_changes.length}`);
|
|
275
327
|
lines.push(`- **Dependency updates**: ${dependency_updates.length}`);
|
|
276
|
-
lines.push(`- **
|
|
328
|
+
lines.push(`- **Breaking changes**: ${breaking_count}`);
|
|
277
329
|
lines.push(`- **Warnings**: ${warnings.length}`);
|
|
278
330
|
lines.push(`- **Errors**: ${errors.length}`);
|
|
279
331
|
|