nx 22.0.0-canary.20251007-01d5f3f → 22.0.0-canary.20251008-05ab516
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/package.json +11 -11
- package/schemas/nx-schema.json +96 -83
- package/src/command-line/configure-ai-agents/command-object.d.ts +1 -1
- package/src/command-line/configure-ai-agents/command-object.d.ts.map +1 -1
- package/src/command-line/configure-ai-agents/command-object.js +18 -4
- package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +1 -1
- package/src/command-line/configure-ai-agents/configure-ai-agents.js +58 -31
- package/src/command-line/nx-cloud/login/command-object.d.ts.map +1 -1
- package/src/command-line/nx-cloud/login/command-object.js +2 -2
- package/src/command-line/nx-cloud/logout/command-object.js +1 -1
- package/src/command-line/release/changelog.d.ts.map +1 -1
- package/src/command-line/release/changelog.js +40 -29
- package/src/command-line/release/command-object.d.ts +7 -3
- package/src/command-line/release/command-object.d.ts.map +1 -1
- package/src/command-line/release/config/config.d.ts.map +1 -1
- package/src/command-line/release/config/config.js +14 -0
- package/src/command-line/release/config/version-plans.d.ts.map +1 -1
- package/src/command-line/release/config/version-plans.js +4 -1
- package/src/command-line/release/publish.d.ts.map +1 -1
- package/src/command-line/release/publish.js +35 -11
- package/src/command-line/release/release.d.ts.map +1 -1
- package/src/command-line/release/release.js +31 -30
- package/src/command-line/release/utils/release-graph.d.ts +219 -0
- package/src/command-line/release/utils/release-graph.d.ts.map +1 -0
- package/src/command-line/release/utils/release-graph.js +658 -0
- package/src/command-line/release/utils/semver.d.ts +1 -2
- package/src/command-line/release/utils/semver.d.ts.map +1 -1
- package/src/command-line/release/utils/semver.js +3 -5
- package/src/command-line/release/utils/shared.d.ts +1 -1
- package/src/command-line/release/utils/shared.d.ts.map +1 -1
- package/src/command-line/release/utils/shared.js +49 -15
- package/src/command-line/release/version/release-group-processor.d.ts +3 -152
- package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
- package/src/command-line/release/version/release-group-processor.js +50 -569
- package/src/command-line/release/version/resolve-current-version.d.ts +1 -1
- package/src/command-line/release/version/resolve-current-version.d.ts.map +1 -1
- package/src/command-line/release/version/resolve-current-version.js +1 -1
- package/src/command-line/release/version/test-utils.d.ts +13 -4
- package/src/command-line/release/version/test-utils.d.ts.map +1 -1
- package/src/command-line/release/version/test-utils.js +26 -11
- package/src/command-line/release/version/version-actions.d.ts +12 -5
- package/src/command-line/release/version/version-actions.d.ts.map +1 -1
- package/src/command-line/release/version/version-actions.js +36 -19
- package/src/command-line/release/version.d.ts +6 -1
- package/src/command-line/release/version.d.ts.map +1 -1
- package/src/command-line/release/version.js +57 -28
- package/src/config/nx-json.d.ts +26 -4
- package/src/config/nx-json.d.ts.map +1 -1
- package/src/config/nx-json.js +8 -8
- package/src/tasks-runner/run-command.js +2 -2
|
@@ -19,18 +19,18 @@ const path_1 = require("../../utils/path");
|
|
|
19
19
|
const workspace_root_1 = require("../../utils/workspace-root");
|
|
20
20
|
const config_1 = require("./config/config");
|
|
21
21
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
22
|
-
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
23
22
|
const version_plans_1 = require("./config/version-plans");
|
|
24
23
|
const git_1 = require("./utils/git");
|
|
25
24
|
const launch_editor_1 = require("./utils/launch-editor");
|
|
26
25
|
const markdown_1 = require("./utils/markdown");
|
|
27
26
|
const print_changes_1 = require("./utils/print-changes");
|
|
28
27
|
const print_config_1 = require("./utils/print-config");
|
|
28
|
+
const release_graph_1 = require("./utils/release-graph");
|
|
29
29
|
const remote_release_client_1 = require("./utils/remote-release-clients/remote-release-client");
|
|
30
30
|
const resolve_changelog_renderer_1 = require("./utils/resolve-changelog-renderer");
|
|
31
31
|
const resolve_nx_json_error_message_1 = require("./utils/resolve-nx-json-error-message");
|
|
32
|
-
const version_plan_utils_1 = require("./utils/version-plan-utils");
|
|
33
32
|
const shared_1 = require("./utils/shared");
|
|
33
|
+
const version_plan_utils_1 = require("./utils/version-plan-utils");
|
|
34
34
|
const releaseChangelogCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
|
|
35
35
|
exports.releaseChangelogCLIHandler = releaseChangelogCLIHandler;
|
|
36
36
|
function createAPI(overrideReleaseConfig) {
|
|
@@ -74,19 +74,30 @@ function createAPI(overrideReleaseConfig) {
|
|
|
74
74
|
});
|
|
75
75
|
process.exit(1);
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
if
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
const tree = new tree_1.FsTree(workspace_root_1.workspaceRoot, args.verbose);
|
|
78
|
+
// Use pre-built release graph if provided, otherwise create a new one
|
|
79
|
+
const releaseGraph = args.releaseGraph ||
|
|
80
|
+
(await (0, release_graph_1.createReleaseGraph)({
|
|
81
|
+
tree,
|
|
82
|
+
projectGraph,
|
|
83
|
+
nxReleaseConfig,
|
|
84
|
+
filters: {
|
|
85
|
+
projects: args.projects,
|
|
86
|
+
groups: args.groups,
|
|
87
|
+
},
|
|
88
|
+
firstRelease: args.firstRelease,
|
|
89
|
+
verbose: args.verbose,
|
|
90
|
+
}));
|
|
91
|
+
// Display filter log if filters were applied (only when graph was created, not reused)
|
|
92
|
+
if (!args.releaseGraph &&
|
|
93
|
+
releaseGraph.filterLog &&
|
|
83
94
|
process.env.NX_RELEASE_INTERNAL_SUPPRESS_FILTER_LOG !== 'true') {
|
|
84
|
-
output_1.output.note(filterLog);
|
|
95
|
+
output_1.output.note(releaseGraph.filterLog);
|
|
85
96
|
}
|
|
86
97
|
const rawVersionPlans = await (0, version_plans_1.readRawVersionPlans)();
|
|
87
|
-
await (0, version_plans_1.setResolvedVersionPlansOnGroups)(rawVersionPlans, releaseGroups, Object.keys(projectGraph.nodes), args.verbose);
|
|
98
|
+
await (0, version_plans_1.setResolvedVersionPlansOnGroups)(rawVersionPlans, releaseGraph.releaseGroups, Object.keys(projectGraph.nodes), args.verbose);
|
|
88
99
|
// Validate version plans against the filter after resolution
|
|
89
|
-
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGroups, releaseGroupToFilteredProjects);
|
|
100
|
+
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects);
|
|
90
101
|
if (versionPlanValidationError) {
|
|
91
102
|
output_1.output.error(versionPlanValidationError);
|
|
92
103
|
process.exit(1);
|
|
@@ -106,7 +117,6 @@ function createAPI(overrideReleaseConfig) {
|
|
|
106
117
|
});
|
|
107
118
|
return {};
|
|
108
119
|
}
|
|
109
|
-
const tree = new tree_1.FsTree(workspace_root_1.workspaceRoot, args.verbose);
|
|
110
120
|
const useAutomaticFromRef = nxReleaseConfig.changelog?.automaticFromRef || args.firstRelease;
|
|
111
121
|
/**
|
|
112
122
|
* For determining the versions to use within changelog files, there are a few different possibilities:
|
|
@@ -122,7 +132,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
122
132
|
* - in this case, the version property will be used as the reference for the workspace changelog, and the versionData object will be used
|
|
123
133
|
* to generate project changelogs
|
|
124
134
|
*/
|
|
125
|
-
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args,
|
|
135
|
+
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args, releaseGraph);
|
|
126
136
|
const to = args.to || 'HEAD';
|
|
127
137
|
const toSHA = await (0, git_1.getCommitHash)(to);
|
|
128
138
|
const headSHA = to === 'HEAD' ? toSHA : await (0, git_1.getCommitHash)('HEAD');
|
|
@@ -145,19 +155,19 @@ function createAPI(overrideReleaseConfig) {
|
|
|
145
155
|
throw new Error(`You are attempting to recreate the changelog for an old release, but you have enabled auto-commit mode. Please disable auto-commit mode by updating your nx.json, or passing --git-commit=false`);
|
|
146
156
|
}
|
|
147
157
|
const commitMessage = args.gitCommitMessage || nxReleaseConfig.changelog.git.commitMessage;
|
|
148
|
-
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGroups, releaseGroupToFilteredProjects, projectsVersionData, commitMessage);
|
|
158
|
+
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData, commitMessage);
|
|
149
159
|
// Resolve any git tags as early as possible so that we can hard error in case of any duplicates before reaching the actual git command
|
|
150
160
|
const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog.git.tag
|
|
151
|
-
? (0, shared_1.createGitTagValues)(releaseGroups, releaseGroupToFilteredProjects, projectsVersionData)
|
|
161
|
+
? (0, shared_1.createGitTagValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData)
|
|
152
162
|
: [];
|
|
153
163
|
(0, shared_1.handleDuplicateGitTags)(gitTagValues);
|
|
154
164
|
const postGitTasks = [];
|
|
155
165
|
let workspaceChangelogChanges = [];
|
|
156
166
|
// If there are multiple release groups, we'll just skip the workspace changelog anyway.
|
|
157
|
-
const versionPlansEnabledForWorkspaceChangelog = releaseGroups[0].resolvedVersionPlans;
|
|
167
|
+
const versionPlansEnabledForWorkspaceChangelog = releaseGraph.releaseGroups[0].resolvedVersionPlans;
|
|
158
168
|
if (versionPlansEnabledForWorkspaceChangelog) {
|
|
159
|
-
if (releaseGroups.length === 1) {
|
|
160
|
-
const releaseGroup = releaseGroups[0];
|
|
169
|
+
if (releaseGraph.releaseGroups.length === 1) {
|
|
170
|
+
const releaseGroup = releaseGraph.releaseGroups[0];
|
|
161
171
|
if (releaseGroup.projectsRelationship === 'fixed') {
|
|
162
172
|
const versionPlans = releaseGroup.resolvedVersionPlans;
|
|
163
173
|
workspaceChangelogChanges = versionPlans
|
|
@@ -254,7 +264,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
254
264
|
* and figuring them out during the main iteration would be too late.
|
|
255
265
|
*/
|
|
256
266
|
const projectToAdditionalDependencyBumps = new Map();
|
|
257
|
-
for (const releaseGroup of releaseGroups) {
|
|
267
|
+
for (const releaseGroup of releaseGraph.releaseGroups) {
|
|
258
268
|
if (releaseGroup.projectsRelationship !== 'independent') {
|
|
259
269
|
continue;
|
|
260
270
|
}
|
|
@@ -285,7 +295,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
285
295
|
}
|
|
286
296
|
}
|
|
287
297
|
const allProjectChangelogs = {};
|
|
288
|
-
for (const releaseGroup of releaseGroups) {
|
|
298
|
+
for (const releaseGroup of releaseGraph.releaseGroups) {
|
|
289
299
|
const config = releaseGroup.changelog;
|
|
290
300
|
// The entire feature is disabled at the release group level, exit early
|
|
291
301
|
if (config === false) {
|
|
@@ -293,7 +303,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
293
303
|
}
|
|
294
304
|
const projects = args.projects?.length
|
|
295
305
|
? // If the user has passed a list of projects, we need to use the filtered list of projects within the release group, plus any dependents
|
|
296
|
-
Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
306
|
+
Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
297
307
|
return [
|
|
298
308
|
project,
|
|
299
309
|
...(projectsVersionData[project]?.dependentProjects.map((dep) => dep.source) || []),
|
|
@@ -509,19 +519,19 @@ function createAPI(overrideReleaseConfig) {
|
|
|
509
519
|
}
|
|
510
520
|
}
|
|
511
521
|
}
|
|
512
|
-
await applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues,
|
|
522
|
+
await applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues, releaseGraph);
|
|
513
523
|
return {
|
|
514
524
|
workspaceChangelog,
|
|
515
525
|
projectChangelogs: allProjectChangelogs,
|
|
516
526
|
};
|
|
517
527
|
};
|
|
518
528
|
}
|
|
519
|
-
function resolveChangelogVersions(args,
|
|
529
|
+
function resolveChangelogVersions(args, releaseGraph) {
|
|
520
530
|
if (!args.version && !args.versionData) {
|
|
521
531
|
throw new Error(`You must provide a version string and/or a versionData object.`);
|
|
522
532
|
}
|
|
523
|
-
const versionData = releaseGroups.reduce((versionData, releaseGroup) => {
|
|
524
|
-
const releaseGroupProjectNames = Array.from(releaseGroupToFilteredProjects.get(releaseGroup));
|
|
533
|
+
const versionData = releaseGraph.releaseGroups.reduce((versionData, releaseGroup) => {
|
|
534
|
+
const releaseGroupProjectNames = Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup));
|
|
525
535
|
for (const projectName of releaseGroupProjectNames) {
|
|
526
536
|
if (!args.versionData) {
|
|
527
537
|
versionData[projectName] = {
|
|
@@ -560,7 +570,7 @@ function applyRemoteReleaseProviderName(newRemoteReleaseProviderName) {
|
|
|
560
570
|
remoteReleaseProviderName = newRemoteReleaseProviderName;
|
|
561
571
|
}
|
|
562
572
|
}
|
|
563
|
-
async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues,
|
|
573
|
+
async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues, releaseGraph) {
|
|
564
574
|
let latestCommit = toSHA;
|
|
565
575
|
const changes = tree.listChanges();
|
|
566
576
|
/**
|
|
@@ -603,8 +613,8 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
603
613
|
let deletedFiles = [];
|
|
604
614
|
if (args.deleteVersionPlans) {
|
|
605
615
|
const planFiles = new Set();
|
|
606
|
-
releaseGroups.forEach((group) => {
|
|
607
|
-
const filteredProjects = releaseGroupToFilteredProjects.get(group);
|
|
616
|
+
releaseGraph.releaseGroups.forEach((group) => {
|
|
617
|
+
const filteredProjects = releaseGraph.releaseGroupToFilteredProjects.get(group);
|
|
608
618
|
if (group.resolvedVersionPlans) {
|
|
609
619
|
// Check each version plan individually to see if it should be deleted
|
|
610
620
|
const plansToDelete = [];
|
|
@@ -835,7 +845,8 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
835
845
|
}
|
|
836
846
|
const preferDockerVersion = (0, shared_1.shouldPreferDockerVersionForReleaseGroup)(releaseGroup);
|
|
837
847
|
const releaseVersion = new shared_1.ReleaseVersion({
|
|
838
|
-
version: preferDockerVersion &&
|
|
848
|
+
version: (preferDockerVersion === true || preferDockerVersion === 'both') &&
|
|
849
|
+
projectsVersionData[project.name].dockerVersion
|
|
839
850
|
? projectsVersionData[project.name].dockerVersion
|
|
840
851
|
: projectsVersionData[project.name].newVersion,
|
|
841
852
|
releaseTagPattern: releaseGroup.releaseTagPattern,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CommandModule } from 'yargs';
|
|
2
|
-
import { OutputStyle, RunManyOptions } from '../yargs-utils/shared-options';
|
|
3
|
-
import {
|
|
1
|
+
import { type CommandModule } from 'yargs';
|
|
2
|
+
import { type OutputStyle, type RunManyOptions } from '../yargs-utils/shared-options';
|
|
3
|
+
import type { ReleaseGraph } from './utils/release-graph';
|
|
4
|
+
import type { VersionData } from './utils/shared';
|
|
4
5
|
export interface BaseNxReleaseArgs {
|
|
5
6
|
verbose?: boolean;
|
|
6
7
|
printConfig?: boolean | 'debug';
|
|
@@ -31,6 +32,7 @@ export type VersionOptions = NxReleaseArgs & GitOptions & VersionPlanArgs & Firs
|
|
|
31
32
|
preid?: string;
|
|
32
33
|
stageChanges?: boolean;
|
|
33
34
|
versionActionsOptionsOverrides?: Record<string, unknown>;
|
|
35
|
+
releaseGraph?: ReleaseGraph;
|
|
34
36
|
};
|
|
35
37
|
export type ChangelogOptions = NxReleaseArgs & GitOptions & VersionPlanArgs & FirstReleaseArgs & {
|
|
36
38
|
version?: string | null;
|
|
@@ -39,6 +41,7 @@ export type ChangelogOptions = NxReleaseArgs & GitOptions & VersionPlanArgs & Fi
|
|
|
39
41
|
from?: string;
|
|
40
42
|
interactive?: string;
|
|
41
43
|
createRelease?: false | 'github' | 'gitlab';
|
|
44
|
+
releaseGraph?: ReleaseGraph;
|
|
42
45
|
};
|
|
43
46
|
export type PublishOptions = NxReleaseArgs & Partial<RunManyOptions> & {
|
|
44
47
|
outputStyle?: OutputStyle;
|
|
@@ -48,6 +51,7 @@ export type PublishOptions = NxReleaseArgs & Partial<RunManyOptions> & {
|
|
|
48
51
|
access?: string;
|
|
49
52
|
otp?: number;
|
|
50
53
|
versionData?: VersionData;
|
|
54
|
+
releaseGraph?: ReleaseGraph;
|
|
51
55
|
};
|
|
52
56
|
export type PlanOptions = NxReleaseArgs & {
|
|
53
57
|
bump?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,aAAa,EAAY,MAAM,OAAO,CAAC;AAEhE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EAQpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,UAAU;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aA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AAE,iCAAiC,CACtC,YAAY,CACV,2BAA2B,CACzB,YAAY,CACV,sBAAsB,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CACvD,EACD,MAAM,CACP,CACF,EACD,WAAW,CACZ,CAAC;KACH,CAAC;CACH,CACF,EAED,UAAU,GAAG,QAAQ,CACtB,GAAG;IAEF,MAAM,EAAE,YAAY,CAAC,4BAA4B,CAAC,GAAG,SAAS,CAAC;CAChE,CAAC;AAGF,MAAM,WAAW,0BAA0B;IACzC,IAAI,EACA,6BAA6B,GAC7B,mCAAmC,GACnC,4EAA4E,GAC5E,iCAAiC,GACjC,+DAA+D,GAC/D,kDAAkD,GAClD,mCAAmC,GACnC,2CAA2C,GAC3C,2CAA2C,GAC3C,+CAA+C,GAC/C,oCAAoC,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;CACzC;AAGD,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,UAAU,GAAE,mBAAmB,CAAC,SAAS,CAAM,GAC9C,OAAO,CAAC;IACT,KAAK,EAAE,IAAI,GAAG,0BAA0B,CAAC;IACzC,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC,CAAC,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/config/config.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,mBAAmB,EAEnB,sBAAsB,EACtB,4BAA4B,EAG7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAa7E,KAAK,YAAY,CAAC,CAAC,IAAI,QAAQ,CAAC;KAC7B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC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/D,kDAAkD,GAClD,mCAAmC,GACnC,2CAA2C,GAC3C,2CAA2C,GAC3C,+CAA+C,GAC/C,oCAAoC,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;CACzC;AAGD,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,UAAU,GAAE,mBAAmB,CAAC,SAAS,CAAM,GAC9C,OAAO,CAAC;IACT,KAAK,EAAE,IAAI,GAAG,0BAA0B,CAAC;IACzC,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC,CAAC,CAmuBD;AA4GD,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,KAAK,CAAC,CA2IhB;AA2QD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -236,6 +236,7 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
236
236
|
releaseTagPatternCheckAllBranchesWhen: userConfig.releaseTagPatternCheckAllBranchesWhen ?? undefined,
|
|
237
237
|
releaseTagPatternRequireSemver: userConfig.releaseTagPatternRequireSemver ??
|
|
238
238
|
defaultReleaseTagPatternRequireSemver,
|
|
239
|
+
releaseTagPatternPreferDockerVersion: userConfig.releaseTagPatternPreferDockerVersion ?? false,
|
|
239
240
|
releaseTagPatternStrictPreid: userConfig.releaseTagPatternStrictPreid ??
|
|
240
241
|
defaultReleaseTagPatternStrictPreid,
|
|
241
242
|
conventionalCommits: conventional_commits_1.DEFAULT_CONVENTIONAL_COMMITS_CONFIG,
|
|
@@ -286,6 +287,7 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
286
287
|
: WORKSPACE_DEFAULTS.releaseTagPattern,
|
|
287
288
|
releaseTagPatternCheckAllBranchesWhen: userConfig.releaseTagPatternCheckAllBranchesWhen ?? undefined,
|
|
288
289
|
releaseTagPatternRequireSemver: groupReleaseTagPatternRequireSemver,
|
|
290
|
+
releaseTagPatternPreferDockerVersion: false,
|
|
289
291
|
releaseTagPatternStrictPreid: groupReleaseTagPatternStrictPreid,
|
|
290
292
|
versionPlans: false,
|
|
291
293
|
};
|
|
@@ -483,6 +485,9 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
483
485
|
releaseTagPatternRequireSemver: releaseGroup.releaseTagPatternRequireSemver ??
|
|
484
486
|
userConfig.releaseTagPatternRequireSemver ??
|
|
485
487
|
defaultReleaseTagPatternRequireSemver,
|
|
488
|
+
releaseTagPatternPreferDockerVersion: releaseGroup.releaseTagPatternPreferDockerVersion ??
|
|
489
|
+
userConfig.releaseTagPatternPreferDockerVersion ??
|
|
490
|
+
false,
|
|
486
491
|
releaseTagPatternStrictPreid: releaseGroup.releaseTagPatternStrictPreid ??
|
|
487
492
|
userConfig.releaseTagPatternStrictPreid ??
|
|
488
493
|
defaultReleaseTagPatternStrictPreid,
|
|
@@ -533,6 +538,14 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
533
538
|
if (hasDockerProjects) {
|
|
534
539
|
// If any project in the group has docker configuration, disable semver requirement
|
|
535
540
|
releaseGroup.releaseTagPatternRequireSemver = false;
|
|
541
|
+
// Set releaseTagPatternPreferDockerVersion to true by default when docker projects exist,
|
|
542
|
+
// unless user has explicitly configured it
|
|
543
|
+
if (releaseGroup.releaseTagPatternPreferDockerVersion === false &&
|
|
544
|
+
userConfig.groups?.[releaseGroupName]
|
|
545
|
+
?.releaseTagPatternPreferDockerVersion === undefined &&
|
|
546
|
+
userConfig.releaseTagPatternPreferDockerVersion === undefined) {
|
|
547
|
+
releaseGroup.releaseTagPatternPreferDockerVersion = true;
|
|
548
|
+
}
|
|
536
549
|
}
|
|
537
550
|
}
|
|
538
551
|
const configError = validateChangelogConfig(releaseGroups, rootChangelogConfig);
|
|
@@ -554,6 +567,7 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
554
567
|
releaseTagPatternCheckAllBranchesWhen: WORKSPACE_DEFAULTS.releaseTagPatternCheckAllBranchesWhen,
|
|
555
568
|
releaseTagPatternRequireSemver: WORKSPACE_DEFAULTS.releaseTagPatternRequireSemver,
|
|
556
569
|
releaseTagPatternStrictPreid: WORKSPACE_DEFAULTS.releaseTagPatternStrictPreid,
|
|
570
|
+
releaseTagPatternPreferDockerVersion: WORKSPACE_DEFAULTS.releaseTagPatternPreferDockerVersion,
|
|
557
571
|
git: rootGitConfig,
|
|
558
572
|
docker: rootDockerConfig,
|
|
559
573
|
version: rootVersionConfig,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-plans.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/config/version-plans.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,gBAAgB,EAAE,WAAW,CAAC;IAC9B;;;;OAIG;IACH,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAClD;AAID,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CA0BrE;AAED,wBAAsB,+BAA+B,CACnD,eAAe,EAAE,cAAc,EAAE,EACjC,aAAa,EAAE,oBAAoB,EAAE,EACrC,0BAA0B,EAAE,MAAM,EAAE,EACpC,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,oBAAoB,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"version-plans.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/config/version-plans.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,gBAAgB,EAAE,WAAW,CAAC;IAC9B;;;;OAIG;IACH,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAClD;AAID,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CA0BrE;AAED,wBAAsB,+BAA+B,CACnD,eAAe,EAAE,cAAc,EAAE,EACjC,aAAa,EAAE,oBAAoB,EAAE,EACrC,0BAA0B,EAAE,MAAM,EAAE,EACpC,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAwNjC;AASD,wBAAgB,2BAA2B,WAE1C"}
|
|
@@ -149,7 +149,10 @@ async function setResolvedVersionPlansOnGroups(rawVersionPlans, releaseGroups, a
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
|
-
|
|
152
|
+
// Avoid duplicates when releaseGraph is reused and version plans are resolved multiple times
|
|
153
|
+
if (!existingPlan.triggeredByProjects.includes(key)) {
|
|
154
|
+
existingPlan.triggeredByProjects.push(key);
|
|
155
|
+
}
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAEvB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAEvB,MAAM,sBAAsB,CAAC;AAuB9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASlD,MAAM,WAAW,qBAAqB;IACpC,CAAC,WAAW,EAAE,MAAM,GAAG;QACrB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,eAAO,MAAM,wBAAwB,GAAI,MAAM,cAAc,oBAWzD,CAAC;AAEL,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAOnE,MAAM,cAAc,KACnB,OAAO,CAAC,qBAAqB,CAAC,CAuIlC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.releasePublishCLIHandler = void 0;
|
|
4
4
|
exports.createAPI = createAPI;
|
|
5
5
|
const nx_json_1 = require("../../config/nx-json");
|
|
6
|
+
const tree_1 = require("../../generators/tree");
|
|
6
7
|
const native_1 = require("../../native");
|
|
7
8
|
const file_map_utils_1 = require("../../project-graph/file-map-utils");
|
|
8
9
|
const tasks_execution_hooks_1 = require("../../project-graph/plugins/tasks-execution-hooks");
|
|
@@ -16,8 +17,8 @@ const workspace_root_1 = require("../../utils/workspace-root");
|
|
|
16
17
|
const graph_1 = require("../graph/graph");
|
|
17
18
|
const config_1 = require("./config/config");
|
|
18
19
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
19
|
-
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
20
20
|
const print_config_1 = require("./utils/print-config");
|
|
21
|
+
const release_graph_1 = require("./utils/release-graph");
|
|
21
22
|
const releasePublishCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, async () => {
|
|
22
23
|
const publishProjectsResult = await createAPI({})(args);
|
|
23
24
|
// If all projects are published successfully, return 0, otherwise return 1
|
|
@@ -57,14 +58,26 @@ function createAPI(overrideReleaseConfig) {
|
|
|
57
58
|
isDebug: args.printConfig === 'debug',
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
// Use pre-built release graph if provided, otherwise create a new one
|
|
62
|
+
const releaseGraph = args.releaseGraph ||
|
|
63
|
+
(await (0, release_graph_1.createReleaseGraph)({
|
|
64
|
+
// Only build the tree if no existing graph, it's only needed for this
|
|
65
|
+
tree: new tree_1.FsTree(workspace_root_1.workspaceRoot, args.verbose),
|
|
66
|
+
projectGraph,
|
|
67
|
+
nxReleaseConfig,
|
|
68
|
+
filters: {
|
|
69
|
+
projects: _args.projects,
|
|
70
|
+
groups: _args.groups,
|
|
71
|
+
},
|
|
72
|
+
firstRelease: args.firstRelease,
|
|
73
|
+
verbose: args.verbose,
|
|
74
|
+
// Publish doesn't need to resolve current versions during graph construction
|
|
75
|
+
skipVersionResolution: true,
|
|
76
|
+
}));
|
|
77
|
+
// Display filter log if filters were applied
|
|
78
|
+
if (releaseGraph.filterLog &&
|
|
66
79
|
process.env.NX_RELEASE_INTERNAL_SUPPRESS_FILTER_LOG !== 'true') {
|
|
67
|
-
output_1.output.note(filterLog);
|
|
80
|
+
output_1.output.note(releaseGraph.filterLog);
|
|
68
81
|
}
|
|
69
82
|
/**
|
|
70
83
|
* If the user is filtering to a subset of projects or groups, we should not run the publish task
|
|
@@ -77,9 +90,15 @@ function createAPI(overrideReleaseConfig) {
|
|
|
77
90
|
if (args.projects?.length) {
|
|
78
91
|
/**
|
|
79
92
|
* Run publishing for all remaining release groups and filtered projects within them
|
|
93
|
+
* in topological order
|
|
80
94
|
*/
|
|
81
|
-
for (const
|
|
82
|
-
const
|
|
95
|
+
for (const releaseGroupName of releaseGraph.sortedReleaseGroups) {
|
|
96
|
+
const releaseGroup = releaseGraph.releaseGroups.find((g) => g.name === releaseGroupName);
|
|
97
|
+
if (!releaseGroup) {
|
|
98
|
+
// Release group was filtered out, skip
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const publishProjectsResult = await runPublishOnProjects(_args, projectGraph, nxJson, Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup)), {
|
|
83
102
|
excludeTaskDependencies: shouldExcludeTaskDependencies,
|
|
84
103
|
loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false',
|
|
85
104
|
});
|
|
@@ -93,7 +112,12 @@ function createAPI(overrideReleaseConfig) {
|
|
|
93
112
|
/**
|
|
94
113
|
* Run publishing for all remaining release groups
|
|
95
114
|
*/
|
|
96
|
-
for (const
|
|
115
|
+
for (const releaseGroupName of releaseGraph.sortedReleaseGroups) {
|
|
116
|
+
const releaseGroup = releaseGraph.releaseGroups.find((g) => g.name === releaseGroupName);
|
|
117
|
+
if (!releaseGroup) {
|
|
118
|
+
// Release group was filtered out, skip
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
97
121
|
const publishProjectsResult = await runPublishOnProjects(_args, projectGraph, nxJson, releaseGroup.projects, {
|
|
98
122
|
excludeTaskDependencies: shouldExcludeTaskDependencies,
|
|
99
123
|
loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/release.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAM1E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/release.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAM1E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2BlE,OAAO,EACL,sBAAsB,EAEvB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,iBAAiB,GAAI,MAAM,cAAc,oBACC,CAAC;AAExD,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAMnE,MAAM,cAAc,KACnB,OAAO,CAAC,sBAAsB,GAAG,MAAM,CAAC,CA4W5C"}
|
|
@@ -12,7 +12,6 @@ const output_1 = require("../../utils/output");
|
|
|
12
12
|
const changelog_1 = require("./changelog");
|
|
13
13
|
const config_1 = require("./config/config");
|
|
14
14
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
15
|
-
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
16
15
|
const version_plans_1 = require("./config/version-plans");
|
|
17
16
|
const publish_1 = require("./publish");
|
|
18
17
|
const git_1 = require("./utils/git");
|
|
@@ -58,16 +57,6 @@ function createAPI(overrideReleaseConfig) {
|
|
|
58
57
|
isDebug: args.printConfig === 'debug',
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
|
-
const { error: filterError, filterLog, releaseGroups, releaseGroupToFilteredProjects, } = (0, filter_release_groups_1.filterReleaseGroups)(projectGraph, nxReleaseConfig, args.projects, args.groups);
|
|
62
|
-
if (filterError) {
|
|
63
|
-
output_1.output.error(filterError);
|
|
64
|
-
process.exit(1);
|
|
65
|
-
}
|
|
66
|
-
if (filterLog) {
|
|
67
|
-
output_1.output.note(filterLog);
|
|
68
|
-
}
|
|
69
|
-
// Do not repeat the filter log in the release subcommands
|
|
70
|
-
process.env.NX_RELEASE_INTERNAL_SUPPRESS_FILTER_LOG = 'true';
|
|
71
60
|
const rawVersionPlans = await (0, version_plans_1.readRawVersionPlans)();
|
|
72
61
|
if (args.specifier && rawVersionPlans.length > 0) {
|
|
73
62
|
output_1.output.error({
|
|
@@ -84,21 +73,21 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84
73
|
const shouldStage = (shouldCommit || userProvidedReleaseConfig.git?.stageChanges) ?? false;
|
|
85
74
|
const shouldTag = userProvidedReleaseConfig.git?.tag ?? true;
|
|
86
75
|
const shouldCreateWorkspaceRemoteRelease = shouldCreateRemoteRelease(nxReleaseConfig.changelog.workspaceChangelog);
|
|
87
|
-
|
|
88
|
-
const shouldPush = (shouldCreateWorkspaceRemoteRelease ||
|
|
89
|
-
releaseGroups.some((group) => shouldCreateRemoteRelease(group.changelog))) ??
|
|
90
|
-
false;
|
|
91
|
-
const versionResult = await releaseVersion({
|
|
76
|
+
const { workspaceVersion, projectsVersionData, releaseGraph, } = await releaseVersion({
|
|
92
77
|
...args,
|
|
93
78
|
stageChanges: shouldStage,
|
|
94
79
|
gitCommit: false,
|
|
95
80
|
gitTag: false,
|
|
96
81
|
deleteVersionPlans: false,
|
|
97
82
|
});
|
|
83
|
+
// Suppress the filter log for the changelog command as it would have already been printed by the version command
|
|
84
|
+
process.env.NX_RELEASE_INTERNAL_SUPPRESS_FILTER_LOG = 'true';
|
|
98
85
|
const changelogResult = await releaseChangelog({
|
|
99
86
|
...args,
|
|
100
|
-
|
|
101
|
-
|
|
87
|
+
// Re-use existing release graph
|
|
88
|
+
releaseGraph,
|
|
89
|
+
versionData: projectsVersionData,
|
|
90
|
+
version: workspaceVersion,
|
|
102
91
|
stageChanges: shouldStage,
|
|
103
92
|
gitCommit: false,
|
|
104
93
|
gitTag: false,
|
|
@@ -106,16 +95,16 @@ function createAPI(overrideReleaseConfig) {
|
|
|
106
95
|
createRelease: false,
|
|
107
96
|
deleteVersionPlans: false,
|
|
108
97
|
});
|
|
109
|
-
await (0, version_plans_1.setResolvedVersionPlansOnGroups)(rawVersionPlans, releaseGroups, Object.keys(projectGraph.nodes), args.verbose);
|
|
98
|
+
await (0, version_plans_1.setResolvedVersionPlansOnGroups)(rawVersionPlans, releaseGraph.releaseGroups, Object.keys(projectGraph.nodes), args.verbose);
|
|
110
99
|
// Validate version plans against the filter after resolution
|
|
111
|
-
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGroups, releaseGroupToFilteredProjects);
|
|
100
|
+
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects);
|
|
112
101
|
if (versionPlanValidationError) {
|
|
113
102
|
output_1.output.error(versionPlanValidationError);
|
|
114
103
|
process.exit(1);
|
|
115
104
|
}
|
|
116
105
|
const planFiles = new Set();
|
|
117
|
-
releaseGroups.forEach((group) => {
|
|
118
|
-
const filteredProjects = releaseGroupToFilteredProjects.get(group);
|
|
106
|
+
releaseGraph.releaseGroups.forEach((group) => {
|
|
107
|
+
const filteredProjects = releaseGraph.releaseGroupToFilteredProjects.get(group);
|
|
119
108
|
if (group.resolvedVersionPlans) {
|
|
120
109
|
// Check each version plan individually to see if it should be deleted
|
|
121
110
|
const plansToDelete = [];
|
|
@@ -162,7 +151,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
162
151
|
if (shouldCommit) {
|
|
163
152
|
output_1.output.logSingleLine(`Committing changes with git`);
|
|
164
153
|
const commitMessage = nxReleaseConfig.git.commitMessage;
|
|
165
|
-
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGroups, releaseGroupToFilteredProjects,
|
|
154
|
+
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData, commitMessage);
|
|
166
155
|
await (0, git_1.gitCommit)({
|
|
167
156
|
messages: commitMessageValues,
|
|
168
157
|
additionalArgs: nxReleaseConfig.git.commitArgs,
|
|
@@ -173,7 +162,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
173
162
|
if (shouldTag) {
|
|
174
163
|
output_1.output.logSingleLine(`Tagging commit with git`);
|
|
175
164
|
// Resolve any git tags as early as possible so that we can hard error in case of any duplicates before reaching the actual git command
|
|
176
|
-
const gitTagValues = (0, shared_1.createGitTagValues)(releaseGroups, releaseGroupToFilteredProjects,
|
|
165
|
+
const gitTagValues = (0, shared_1.createGitTagValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData);
|
|
177
166
|
(0, shared_1.handleDuplicateGitTags)(gitTagValues);
|
|
178
167
|
for (const tag of gitTagValues) {
|
|
179
168
|
await (0, git_1.gitTag)({
|
|
@@ -186,6 +175,10 @@ function createAPI(overrideReleaseConfig) {
|
|
|
186
175
|
}
|
|
187
176
|
}
|
|
188
177
|
let hasPushedChanges = false;
|
|
178
|
+
// If the workspace or any of the release groups specify that a remote release should be created, we need to push the changes to the remote
|
|
179
|
+
const shouldPush = (shouldCreateWorkspaceRemoteRelease ||
|
|
180
|
+
releaseGraph.releaseGroups.some((group) => shouldCreateRemoteRelease(group.changelog))) ??
|
|
181
|
+
false;
|
|
189
182
|
if (shouldPush) {
|
|
190
183
|
output_1.output.logSingleLine(`Pushing to git remote "origin"`);
|
|
191
184
|
await (0, git_1.gitPush)({
|
|
@@ -209,7 +202,11 @@ function createAPI(overrideReleaseConfig) {
|
|
|
209
202
|
latestCommit = await (0, git_1.getCommitHash)('HEAD');
|
|
210
203
|
await remoteReleaseClient.createOrUpdateRelease(changelogResult.workspaceChangelog.releaseVersion, changelogResult.workspaceChangelog.contents, latestCommit, { dryRun: args.dryRun });
|
|
211
204
|
}
|
|
212
|
-
for (const
|
|
205
|
+
for (const releaseGroupName of releaseGraph.sortedReleaseGroups) {
|
|
206
|
+
const releaseGroup = releaseGraph.releaseGroups.find((g) => g.name === releaseGroupName);
|
|
207
|
+
if (!releaseGroup) {
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
213
210
|
const shouldCreateProjectRemoteReleases = shouldCreateRemoteRelease(releaseGroup.changelog);
|
|
214
211
|
if (shouldCreateProjectRemoteReleases &&
|
|
215
212
|
changelogResult.projectChangelogs) {
|
|
@@ -219,7 +216,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
219
216
|
.createRelease);
|
|
220
217
|
const projects = args.projects?.length
|
|
221
218
|
? // If the user has passed a list of projects, we need to use the filtered list of projects within the release group
|
|
222
|
-
Array.from(releaseGroupToFilteredProjects.get(releaseGroup))
|
|
219
|
+
Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup))
|
|
223
220
|
: // Otherwise, we use the full list of projects within the release group
|
|
224
221
|
releaseGroup.projects;
|
|
225
222
|
const projectNodes = projects.map((name) => projectGraph.nodes[name]);
|
|
@@ -241,8 +238,8 @@ function createAPI(overrideReleaseConfig) {
|
|
|
241
238
|
}
|
|
242
239
|
let hasNewVersion = false;
|
|
243
240
|
// null means that all projects are versioned together but there were no changes
|
|
244
|
-
if (
|
|
245
|
-
hasNewVersion = Object.values(
|
|
241
|
+
if (workspaceVersion !== null) {
|
|
242
|
+
hasNewVersion = Object.values(projectsVersionData).some((version) =>
|
|
246
243
|
/**
|
|
247
244
|
* There is a scenario where applications will not have a newVersion created by VerisonActions,
|
|
248
245
|
* however, there will still be a dockerVersion created from the docker release.
|
|
@@ -257,7 +254,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
257
254
|
if (shouldPublish) {
|
|
258
255
|
const publishResults = await releasePublish({
|
|
259
256
|
...args,
|
|
260
|
-
versionData:
|
|
257
|
+
versionData: projectsVersionData,
|
|
261
258
|
});
|
|
262
259
|
const allExitOk = Object.values(publishResults).every((result) => result.code === 0);
|
|
263
260
|
if (!allExitOk) {
|
|
@@ -268,7 +265,11 @@ function createAPI(overrideReleaseConfig) {
|
|
|
268
265
|
else {
|
|
269
266
|
output_1.output.logSingleLine('Skipped publishing packages.');
|
|
270
267
|
}
|
|
271
|
-
return
|
|
268
|
+
return {
|
|
269
|
+
workspaceVersion,
|
|
270
|
+
projectsVersionData,
|
|
271
|
+
releaseGraph,
|
|
272
|
+
};
|
|
272
273
|
};
|
|
273
274
|
}
|
|
274
275
|
async function promptForPublish() {
|