nx 22.0.0-canary.20251006-738b06b → 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/adapter/angular-json.d.ts.map +1 -1
- package/src/adapter/angular-json.js +13 -17
- 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/init/init-v2.js +1 -1
- 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 -30
- 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 -570
- 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/devkit-exports.d.ts +1 -1
- package/src/devkit-exports.d.ts.map +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/js/index.d.ts +1 -2
- package/src/plugins/js/index.d.ts.map +1 -1
- package/src/plugins/js/index.js +28 -32
- package/src/plugins/js/lock-file/lock-file.d.ts +2 -2
- package/src/plugins/js/lock-file/lock-file.d.ts.map +1 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +1 -1
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts.map +1 -1
- package/src/project-graph/plugins/loaded-nx-plugin.js +8 -6
- package/src/project-graph/plugins/public-api.d.ts +1 -36
- package/src/project-graph/plugins/public-api.d.ts.map +1 -1
- package/src/project-graph/plugins/utils.d.ts +4 -2
- package/src/project-graph/plugins/utils.d.ts.map +1 -1
- package/src/tasks-runner/run-command.js +2 -2
|
@@ -19,19 +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");
|
|
34
|
-
const
|
|
33
|
+
const version_plan_utils_1 = require("./utils/version-plan-utils");
|
|
35
34
|
const releaseChangelogCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
|
|
36
35
|
exports.releaseChangelogCLIHandler = releaseChangelogCLIHandler;
|
|
37
36
|
function createAPI(overrideReleaseConfig) {
|
|
@@ -75,19 +74,30 @@ function createAPI(overrideReleaseConfig) {
|
|
|
75
74
|
});
|
|
76
75
|
process.exit(1);
|
|
77
76
|
}
|
|
78
|
-
const
|
|
79
|
-
if
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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 &&
|
|
84
94
|
process.env.NX_RELEASE_INTERNAL_SUPPRESS_FILTER_LOG !== 'true') {
|
|
85
|
-
output_1.output.note(filterLog);
|
|
95
|
+
output_1.output.note(releaseGraph.filterLog);
|
|
86
96
|
}
|
|
87
97
|
const rawVersionPlans = await (0, version_plans_1.readRawVersionPlans)();
|
|
88
|
-
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);
|
|
89
99
|
// Validate version plans against the filter after resolution
|
|
90
|
-
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGroups, releaseGroupToFilteredProjects);
|
|
100
|
+
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects);
|
|
91
101
|
if (versionPlanValidationError) {
|
|
92
102
|
output_1.output.error(versionPlanValidationError);
|
|
93
103
|
process.exit(1);
|
|
@@ -107,7 +117,6 @@ function createAPI(overrideReleaseConfig) {
|
|
|
107
117
|
});
|
|
108
118
|
return {};
|
|
109
119
|
}
|
|
110
|
-
const tree = new tree_1.FsTree(workspace_root_1.workspaceRoot, args.verbose);
|
|
111
120
|
const useAutomaticFromRef = nxReleaseConfig.changelog?.automaticFromRef || args.firstRelease;
|
|
112
121
|
/**
|
|
113
122
|
* For determining the versions to use within changelog files, there are a few different possibilities:
|
|
@@ -123,7 +132,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
123
132
|
* - in this case, the version property will be used as the reference for the workspace changelog, and the versionData object will be used
|
|
124
133
|
* to generate project changelogs
|
|
125
134
|
*/
|
|
126
|
-
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args,
|
|
135
|
+
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args, releaseGraph);
|
|
127
136
|
const to = args.to || 'HEAD';
|
|
128
137
|
const toSHA = await (0, git_1.getCommitHash)(to);
|
|
129
138
|
const headSHA = to === 'HEAD' ? toSHA : await (0, git_1.getCommitHash)('HEAD');
|
|
@@ -146,19 +155,19 @@ function createAPI(overrideReleaseConfig) {
|
|
|
146
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`);
|
|
147
156
|
}
|
|
148
157
|
const commitMessage = args.gitCommitMessage || nxReleaseConfig.changelog.git.commitMessage;
|
|
149
|
-
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGroups, releaseGroupToFilteredProjects, projectsVersionData, commitMessage);
|
|
158
|
+
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData, commitMessage);
|
|
150
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
|
|
151
160
|
const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog.git.tag
|
|
152
|
-
? (0, shared_1.createGitTagValues)(releaseGroups, releaseGroupToFilteredProjects, projectsVersionData)
|
|
161
|
+
? (0, shared_1.createGitTagValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData)
|
|
153
162
|
: [];
|
|
154
163
|
(0, shared_1.handleDuplicateGitTags)(gitTagValues);
|
|
155
164
|
const postGitTasks = [];
|
|
156
165
|
let workspaceChangelogChanges = [];
|
|
157
166
|
// If there are multiple release groups, we'll just skip the workspace changelog anyway.
|
|
158
|
-
const versionPlansEnabledForWorkspaceChangelog = releaseGroups[0].resolvedVersionPlans;
|
|
167
|
+
const versionPlansEnabledForWorkspaceChangelog = releaseGraph.releaseGroups[0].resolvedVersionPlans;
|
|
159
168
|
if (versionPlansEnabledForWorkspaceChangelog) {
|
|
160
|
-
if (releaseGroups.length === 1) {
|
|
161
|
-
const releaseGroup = releaseGroups[0];
|
|
169
|
+
if (releaseGraph.releaseGroups.length === 1) {
|
|
170
|
+
const releaseGroup = releaseGraph.releaseGroups[0];
|
|
162
171
|
if (releaseGroup.projectsRelationship === 'fixed') {
|
|
163
172
|
const versionPlans = releaseGroup.resolvedVersionPlans;
|
|
164
173
|
workspaceChangelogChanges = versionPlans
|
|
@@ -255,7 +264,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
255
264
|
* and figuring them out during the main iteration would be too late.
|
|
256
265
|
*/
|
|
257
266
|
const projectToAdditionalDependencyBumps = new Map();
|
|
258
|
-
for (const releaseGroup of releaseGroups) {
|
|
267
|
+
for (const releaseGroup of releaseGraph.releaseGroups) {
|
|
259
268
|
if (releaseGroup.projectsRelationship !== 'independent') {
|
|
260
269
|
continue;
|
|
261
270
|
}
|
|
@@ -286,7 +295,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
286
295
|
}
|
|
287
296
|
}
|
|
288
297
|
const allProjectChangelogs = {};
|
|
289
|
-
for (const releaseGroup of releaseGroups) {
|
|
298
|
+
for (const releaseGroup of releaseGraph.releaseGroups) {
|
|
290
299
|
const config = releaseGroup.changelog;
|
|
291
300
|
// The entire feature is disabled at the release group level, exit early
|
|
292
301
|
if (config === false) {
|
|
@@ -294,7 +303,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
294
303
|
}
|
|
295
304
|
const projects = args.projects?.length
|
|
296
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
|
|
297
|
-
Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
306
|
+
Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
298
307
|
return [
|
|
299
308
|
project,
|
|
300
309
|
...(projectsVersionData[project]?.dependentProjects.map((dep) => dep.source) || []),
|
|
@@ -510,19 +519,19 @@ function createAPI(overrideReleaseConfig) {
|
|
|
510
519
|
}
|
|
511
520
|
}
|
|
512
521
|
}
|
|
513
|
-
await applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues,
|
|
522
|
+
await applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues, releaseGraph);
|
|
514
523
|
return {
|
|
515
524
|
workspaceChangelog,
|
|
516
525
|
projectChangelogs: allProjectChangelogs,
|
|
517
526
|
};
|
|
518
527
|
};
|
|
519
528
|
}
|
|
520
|
-
function resolveChangelogVersions(args,
|
|
529
|
+
function resolveChangelogVersions(args, releaseGraph) {
|
|
521
530
|
if (!args.version && !args.versionData) {
|
|
522
531
|
throw new Error(`You must provide a version string and/or a versionData object.`);
|
|
523
532
|
}
|
|
524
|
-
const versionData = releaseGroups.reduce((versionData, releaseGroup) => {
|
|
525
|
-
const releaseGroupProjectNames = Array.from(releaseGroupToFilteredProjects.get(releaseGroup));
|
|
533
|
+
const versionData = releaseGraph.releaseGroups.reduce((versionData, releaseGroup) => {
|
|
534
|
+
const releaseGroupProjectNames = Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup));
|
|
526
535
|
for (const projectName of releaseGroupProjectNames) {
|
|
527
536
|
if (!args.versionData) {
|
|
528
537
|
versionData[projectName] = {
|
|
@@ -561,7 +570,7 @@ function applyRemoteReleaseProviderName(newRemoteReleaseProviderName) {
|
|
|
561
570
|
remoteReleaseProviderName = newRemoteReleaseProviderName;
|
|
562
571
|
}
|
|
563
572
|
}
|
|
564
|
-
async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues,
|
|
573
|
+
async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues, releaseGraph) {
|
|
565
574
|
let latestCommit = toSHA;
|
|
566
575
|
const changes = tree.listChanges();
|
|
567
576
|
/**
|
|
@@ -604,8 +613,8 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
604
613
|
let deletedFiles = [];
|
|
605
614
|
if (args.deleteVersionPlans) {
|
|
606
615
|
const planFiles = new Set();
|
|
607
|
-
releaseGroups.forEach((group) => {
|
|
608
|
-
const filteredProjects = releaseGroupToFilteredProjects.get(group);
|
|
616
|
+
releaseGraph.releaseGroups.forEach((group) => {
|
|
617
|
+
const filteredProjects = releaseGraph.releaseGroupToFilteredProjects.get(group);
|
|
609
618
|
if (group.resolvedVersionPlans) {
|
|
610
619
|
// Check each version plan individually to see if it should be deleted
|
|
611
620
|
const plansToDelete = [];
|
|
@@ -836,7 +845,8 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
836
845
|
}
|
|
837
846
|
const preferDockerVersion = (0, shared_1.shouldPreferDockerVersionForReleaseGroup)(releaseGroup);
|
|
838
847
|
const releaseVersion = new shared_1.ReleaseVersion({
|
|
839
|
-
version: preferDockerVersion &&
|
|
848
|
+
version: (preferDockerVersion === true || preferDockerVersion === 'both') &&
|
|
849
|
+
projectsVersionData[project.name].dockerVersion
|
|
840
850
|
? projectsVersionData[project.name].dockerVersion
|
|
841
851
|
: projectsVersionData[project.name].newVersion,
|
|
842
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;AA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U,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,EA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
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() {
|