nx 22.0.0-beta.3 → 22.0.0-beta.4
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
|
@@ -21,16 +21,14 @@ function isRelativeVersionKeyword(val) {
|
|
|
21
21
|
function isValidSemverSpecifier(specifier) {
|
|
22
22
|
return (specifier && !!((0, semver_1.valid)(specifier) || isRelativeVersionKeyword(specifier)));
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
function determineSemverChange(relevantCommits, // <projectName, commits>
|
|
26
|
-
config) {
|
|
24
|
+
function determineSemverChange(relevantCommits, config) {
|
|
27
25
|
const semverChangePerProject = new Map();
|
|
28
26
|
for (const [projectName, relevantCommit] of relevantCommits) {
|
|
29
27
|
let highestChange = null;
|
|
30
28
|
for (const { commit, isProjectScopedCommit } of relevantCommit) {
|
|
31
29
|
if (!isProjectScopedCommit) {
|
|
32
|
-
// commit is relevant to the project, but not directly, report
|
|
33
|
-
highestChange = Math.max(
|
|
30
|
+
// commit is relevant to the project, but not directly, report patch change to match side-effectful bump behavior in update dependents in release-group-processor
|
|
31
|
+
highestChange = Math.max(1 /* SemverSpecifier.PATCH */, highestChange ?? 0);
|
|
34
32
|
continue;
|
|
35
33
|
}
|
|
36
34
|
const semverType = config.types[commit.type]?.semverBump;
|
|
@@ -48,7 +48,7 @@ export declare function commitChanges({ changedFiles, deletedFiles, isDryRun, is
|
|
|
48
48
|
gitCommitArgs?: string | string[];
|
|
49
49
|
}): Promise<void>;
|
|
50
50
|
export declare function createCommitMessageValues(releaseGroups: ReleaseGroupWithName[], releaseGroupToFilteredProjects: Map<ReleaseGroupWithName, Set<string>>, versionData: VersionData, commitMessage: string): string[];
|
|
51
|
-
export declare function shouldPreferDockerVersionForReleaseGroup(releaseGroup: ReleaseGroupWithName): boolean;
|
|
51
|
+
export declare function shouldPreferDockerVersionForReleaseGroup(releaseGroup: ReleaseGroupWithName): boolean | 'both';
|
|
52
52
|
export declare function shouldSkipVersionActions(dockerOptions: {
|
|
53
53
|
skipVersionActions?: string[] | boolean;
|
|
54
54
|
}, projectName: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAK7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAErD,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,oBAAoB,EAAE,MAAM,CAAC;QAC7B,cAAc,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,qBAAa,cAAc;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;gBAEV,EACV,OAAO,EAAE,qEAAqE;IAC9E,iBAAiB,EAAE,8EAA8E;IACjG,WAAW,GACZ,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CAQF;AAED,wBAAsB,aAAa,CAAC,EAClC,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,aAAa,GACd,EAAE;IACD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACnC,iBAsBA;AAED,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,oBAAoB,EAAE,EACrC,8BAA8B,EAAE,GAAG,CAAC,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,EACtE,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,GACpB,MAAM,EAAE,CA0GV;AAcD,wBAAgB,wCAAwC,CACtD,YAAY,EAAE,oBAAoB,GACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAK7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,S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AM,EAAE,CAAC;CACnC,iBAsBA;AAED,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,oBAAoB,EAAE,EACrC,8BAA8B,EAAE,GAAG,CAAC,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,EACtE,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,GACpB,MAAM,EAAE,CA0GV;AAcD,wBAAgB,wCAAwC,CACtD,YAAY,EAAE,oBAAoB,GACjC,OAAO,GAAG,MAAM,CAElB;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;CAAE,EAC1D,WAAW,EAAE,MAAM,GAClB,OAAO,CAOT;AAED,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,oBAAoB,EAAE,EACrC,8BAA8B,EAAE,GAAG,CAAC,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,EACtE,WAAW,EAAE,WAAW,GACvB,MAAM,EAAE,CA6FV;AAeD,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAcnE;AAED,wBAAsB,4BAA4B,CAChD,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAAE,EACpB,QAAQ,EAAE,MAAM,EAAE,GAEpB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,qBAAqB,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAAC,CAwC5E"}
|
|
@@ -160,9 +160,7 @@ function stripPlaceholders(str, placeholders) {
|
|
|
160
160
|
return str;
|
|
161
161
|
}
|
|
162
162
|
function shouldPreferDockerVersionForReleaseGroup(releaseGroup) {
|
|
163
|
-
|
|
164
|
-
// releaseTagPatternRequireSemver would be false
|
|
165
|
-
return !releaseGroup.releaseTagPatternRequireSemver;
|
|
163
|
+
return releaseGroup.releaseTagPatternPreferDockerVersion;
|
|
166
164
|
}
|
|
167
165
|
function shouldSkipVersionActions(dockerOptions, projectName) {
|
|
168
166
|
return (dockerOptions.skipVersionActions === true ||
|
|
@@ -181,12 +179,30 @@ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versi
|
|
|
181
179
|
if (projectVersionData.newVersion !== null ||
|
|
182
180
|
projectVersionData.dockerVersion !== null) {
|
|
183
181
|
const preferDockerVersion = shouldPreferDockerVersionForReleaseGroup(releaseGroup);
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
182
|
+
if (preferDockerVersion === 'both') {
|
|
183
|
+
// Create tags for both docker and semver versions
|
|
184
|
+
if (projectVersionData.dockerVersion) {
|
|
185
|
+
tags.push((0, utils_1.interpolate)(releaseGroup.releaseTagPattern, {
|
|
186
|
+
version: projectVersionData.dockerVersion,
|
|
187
|
+
projectName: project,
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
if (projectVersionData.newVersion) {
|
|
191
|
+
tags.push((0, utils_1.interpolate)(releaseGroup.releaseTagPattern, {
|
|
192
|
+
version: projectVersionData.newVersion,
|
|
193
|
+
projectName: project,
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
// Use either docker version or semver version based on preference
|
|
199
|
+
tags.push((0, utils_1.interpolate)(releaseGroup.releaseTagPattern, {
|
|
200
|
+
version: preferDockerVersion
|
|
201
|
+
? projectVersionData.dockerVersion
|
|
202
|
+
: projectVersionData.newVersion,
|
|
203
|
+
projectName: project,
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
190
206
|
}
|
|
191
207
|
}
|
|
192
208
|
continue;
|
|
@@ -196,12 +212,30 @@ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versi
|
|
|
196
212
|
if (projectVersionData.newVersion !== null ||
|
|
197
213
|
projectVersionData.dockerVersion !== null) {
|
|
198
214
|
const preferDockerVersion = shouldPreferDockerVersionForReleaseGroup(releaseGroup);
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
215
|
+
if (preferDockerVersion === 'both') {
|
|
216
|
+
// Create tags for both docker and semver versions
|
|
217
|
+
if (projectVersionData.dockerVersion) {
|
|
218
|
+
tags.push((0, utils_1.interpolate)(releaseGroup.releaseTagPattern, {
|
|
219
|
+
version: projectVersionData.dockerVersion,
|
|
220
|
+
releaseGroupName: releaseGroup.name,
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
223
|
+
if (projectVersionData.newVersion) {
|
|
224
|
+
tags.push((0, utils_1.interpolate)(releaseGroup.releaseTagPattern, {
|
|
225
|
+
version: projectVersionData.newVersion,
|
|
226
|
+
releaseGroupName: releaseGroup.name,
|
|
227
|
+
}));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
// Use either docker version or semver version based on preference
|
|
232
|
+
tags.push((0, utils_1.interpolate)(releaseGroup.releaseTagPattern, {
|
|
233
|
+
version: preferDockerVersion
|
|
234
|
+
? projectVersionData.dockerVersion
|
|
235
|
+
: projectVersionData.newVersion,
|
|
236
|
+
releaseGroupName: releaseGroup.name,
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
205
239
|
}
|
|
206
240
|
}
|
|
207
241
|
return tags;
|
|
@@ -1,28 +1,8 @@
|
|
|
1
|
-
import { ManifestRootToUpdate, NxReleaseDockerConfiguration, NxReleaseVersionConfiguration } from '../../../config/nx-json';
|
|
2
1
|
import { ProjectGraph } from '../../../config/project-graph';
|
|
3
2
|
import { Tree } from '../../../generators/tree';
|
|
4
3
|
import { type NxReleaseConfig } from '../config/config';
|
|
5
|
-
import
|
|
4
|
+
import { ReleaseGraph } from '../utils/release-graph';
|
|
6
5
|
import type { VersionData } from '../utils/shared';
|
|
7
|
-
/**
|
|
8
|
-
* The final configuration for a project after applying release group and project level overrides,
|
|
9
|
-
* as well as default values. This will be passed to the relevant version actions implementation,
|
|
10
|
-
* and referenced throughout the versioning process.
|
|
11
|
-
*/
|
|
12
|
-
export interface FinalConfigForProject {
|
|
13
|
-
specifierSource: NxReleaseVersionConfiguration['specifierSource'];
|
|
14
|
-
currentVersionResolver: NxReleaseVersionConfiguration['currentVersionResolver'];
|
|
15
|
-
currentVersionResolverMetadata: NxReleaseVersionConfiguration['currentVersionResolverMetadata'];
|
|
16
|
-
fallbackCurrentVersionResolver: NxReleaseVersionConfiguration['fallbackCurrentVersionResolver'];
|
|
17
|
-
versionPrefix: NxReleaseVersionConfiguration['versionPrefix'];
|
|
18
|
-
preserveLocalDependencyProtocols: NxReleaseVersionConfiguration['preserveLocalDependencyProtocols'];
|
|
19
|
-
preserveMatchingDependencyRanges: NxReleaseVersionConfiguration['preserveMatchingDependencyRanges'];
|
|
20
|
-
versionActionsOptions: NxReleaseVersionConfiguration['versionActionsOptions'];
|
|
21
|
-
manifestRootsToUpdate: Array<Exclude<ManifestRootToUpdate, string>>;
|
|
22
|
-
dockerOptions: NxReleaseDockerConfiguration & {
|
|
23
|
-
groupPreVersionCommand?: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
6
|
export declare const BUMP_TYPE_REASON_TEXT: {
|
|
27
7
|
readonly DEPENDENCY_WAS_BUMPED: ", because a dependency was bumped, ";
|
|
28
8
|
readonly USER_SPECIFIER: ", from the given specifier, ";
|
|
@@ -55,15 +35,8 @@ export declare class ReleaseGroupProcessor {
|
|
|
55
35
|
private tree;
|
|
56
36
|
private projectGraph;
|
|
57
37
|
private nxReleaseConfig;
|
|
58
|
-
private
|
|
59
|
-
private releaseGroupToFilteredProjects;
|
|
38
|
+
private releaseGraph;
|
|
60
39
|
private options;
|
|
61
|
-
/**
|
|
62
|
-
* Stores the relationships between release groups, including their dependencies
|
|
63
|
-
* and dependents. This is used for determining processing order and propagating
|
|
64
|
-
* version changes between related groups.
|
|
65
|
-
*/
|
|
66
|
-
private groupGraph;
|
|
67
40
|
/**
|
|
68
41
|
* Tracks which release groups have already been processed to avoid
|
|
69
42
|
* processing them multiple times. Used during the group traversal.
|
|
@@ -75,128 +48,21 @@ export declare class ReleaseGroupProcessor {
|
|
|
75
48
|
* projects need their dependencies updated.
|
|
76
49
|
*/
|
|
77
50
|
private bumpedProjects;
|
|
78
|
-
/**
|
|
79
|
-
* Cache of release groups sorted in topological order to ensure dependencies
|
|
80
|
-
* are processed before dependents. Computed once and reused throughout processing.
|
|
81
|
-
*/
|
|
82
|
-
private sortedReleaseGroups;
|
|
83
|
-
/**
|
|
84
|
-
* Maps each release group to its projects sorted in topological order.
|
|
85
|
-
* Ensures projects are processed after their dependencies within each group.
|
|
86
|
-
*/
|
|
87
|
-
private sortedProjects;
|
|
88
|
-
/**
|
|
89
|
-
* Track the unique afterAllProjectsVersioned functions involved in the current versioning process,
|
|
90
|
-
* so that we can ensure they are only invoked once per versioning execution.
|
|
91
|
-
*/
|
|
92
|
-
private uniqueAfterAllProjectsVersioned;
|
|
93
|
-
/**
|
|
94
|
-
* Track the versionActions for each project so that we can invoke certain instance methods.
|
|
95
|
-
*/
|
|
96
|
-
private projectsToVersionActions;
|
|
97
51
|
/**
|
|
98
52
|
* versionData that will ultimately be returned to the nx release version handler by getVersionData()
|
|
99
53
|
*/
|
|
100
54
|
private versionData;
|
|
101
|
-
/**
|
|
102
|
-
* Set of all projects that are configured in the nx release config.
|
|
103
|
-
* Used to validate dependencies and identify projects that should be updated.
|
|
104
|
-
*/
|
|
105
|
-
private allProjectsConfiguredForNxRelease;
|
|
106
|
-
/**
|
|
107
|
-
* Set of projects that will be processed in the current run.
|
|
108
|
-
* This is potentially a subset of allProjectsConfiguredForNxRelease based on filters
|
|
109
|
-
* and dependency relationships.
|
|
110
|
-
*/
|
|
111
|
-
private allProjectsToProcess;
|
|
112
55
|
/**
|
|
113
56
|
* If the user provided a specifier at the time of versioning we store it here so that it can take priority
|
|
114
57
|
* over any configuration.
|
|
115
58
|
*/
|
|
116
59
|
private userGivenSpecifier;
|
|
117
|
-
/**
|
|
118
|
-
* Caches the current version of each project to avoid repeated disk/registry/git tag lookups.
|
|
119
|
-
* Often used during new version calculation. Will be null if the current version resolver is set to 'none'.
|
|
120
|
-
*/
|
|
121
|
-
private cachedCurrentVersions;
|
|
122
|
-
/**
|
|
123
|
-
* Caches git tag information for projects that resolve their version from git tags.
|
|
124
|
-
* This avoids performing expensive git operations multiple times for the same project.
|
|
125
|
-
*/
|
|
126
|
-
private cachedLatestMatchingGitTag;
|
|
127
|
-
/**
|
|
128
|
-
* Temporary storage for dependent project names while building the dependency graph.
|
|
129
|
-
* This is used as an intermediate step before creating the full dependent projects data.
|
|
130
|
-
*/
|
|
131
|
-
private tmpCachedDependentProjects;
|
|
132
|
-
/**
|
|
133
|
-
* Resolve the data regarding dependent projects for each project upfront so that it remains accurate
|
|
134
|
-
* even after updates are applied to manifests.
|
|
135
|
-
*/
|
|
136
|
-
private originalDependentProjectsPerProject;
|
|
137
|
-
/**
|
|
138
|
-
* In the case of fixed release groups that are configured to resolve the current version from a registry
|
|
139
|
-
* or a git tag, it would be a waste of time and resources to resolve the current version for each individual
|
|
140
|
-
* project, therefore we maintain a cache of the current version for each applicable fixed release group here.
|
|
141
|
-
*/
|
|
142
|
-
private currentVersionsPerFixedReleaseGroup;
|
|
143
|
-
/**
|
|
144
|
-
* Cache of project loggers for each project.
|
|
145
|
-
*/
|
|
146
|
-
private projectLoggers;
|
|
147
60
|
/**
|
|
148
61
|
* Track any version plan files that have been processed so that we can delete them after versioning is complete,
|
|
149
62
|
* while leaving any unprocessed files in place.
|
|
150
63
|
*/
|
|
151
64
|
private processedVersionPlanFiles;
|
|
152
|
-
|
|
153
|
-
* Certain configuration options can be overridden at the project level, and otherwise fall back to the release group level.
|
|
154
|
-
* Many also have a specific default value if nothing is set at either level. To avoid applying this hierarchy for each project
|
|
155
|
-
* every time such a configuration option is needed, we cache the result per project here.
|
|
156
|
-
*/
|
|
157
|
-
private finalConfigsByProject;
|
|
158
|
-
/**
|
|
159
|
-
* Maps each project to its release group for quick O(1) lookups.
|
|
160
|
-
* This avoids having to scan through all release groups to find a project.
|
|
161
|
-
*/
|
|
162
|
-
private projectToReleaseGroup;
|
|
163
|
-
/**
|
|
164
|
-
* Maps each project to its dependents (projects that depend on it).
|
|
165
|
-
* This is the inverse of the projectToDependencies map and enables
|
|
166
|
-
* efficient lookup of dependent projects for propagating version changes.
|
|
167
|
-
*/
|
|
168
|
-
private projectToDependents;
|
|
169
|
-
/**
|
|
170
|
-
* Maps each project to its dependencies (projects it depends on).
|
|
171
|
-
* Used for building dependency graphs and determining processing order.
|
|
172
|
-
*/
|
|
173
|
-
private projectToDependencies;
|
|
174
|
-
/**
|
|
175
|
-
* Caches the updateDependents setting for each project to avoid repeated
|
|
176
|
-
* lookups and calculations. This determines if dependent projects should
|
|
177
|
-
* be automatically updated when a dependency changes.
|
|
178
|
-
*/
|
|
179
|
-
private projectToUpdateDependentsSetting;
|
|
180
|
-
constructor(tree: Tree, projectGraph: ProjectGraph, nxReleaseConfig: NxReleaseConfig, releaseGroups: ReleaseGroupWithName[], releaseGroupToFilteredProjects: Map<ReleaseGroupWithName, Set<string>>, options: ReleaseGroupProcessorOptions);
|
|
181
|
-
/**
|
|
182
|
-
* Initialize the processor by building the group graph and preparing for processing.
|
|
183
|
-
* This method must be called before processGroups().
|
|
184
|
-
*/
|
|
185
|
-
init(): Promise<void>;
|
|
186
|
-
/**
|
|
187
|
-
* Setup mapping from project to release group and cache updateDependents settings
|
|
188
|
-
*/
|
|
189
|
-
private setupProjectReleaseGroupMapping;
|
|
190
|
-
/**
|
|
191
|
-
* Determine which projects should be processed and resolve their version actions
|
|
192
|
-
*/
|
|
193
|
-
private setupProjectsToProcess;
|
|
194
|
-
/**
|
|
195
|
-
* Find all dependents that should be processed due to dependency updates
|
|
196
|
-
*/
|
|
197
|
-
private findDependentsToProcess;
|
|
198
|
-
private buildGroupDependencyGraph;
|
|
199
|
-
private populateDependentProjectsData;
|
|
65
|
+
constructor(tree: Tree, projectGraph: ProjectGraph, nxReleaseConfig: NxReleaseConfig, releaseGraph: ReleaseGraph, options: ReleaseGroupProcessorOptions);
|
|
200
66
|
getReleaseGroupNameForProject(projectName: string): string | null;
|
|
201
67
|
getNextGroup(): string | null;
|
|
202
68
|
processGroups(): Promise<string[]>;
|
|
@@ -225,15 +91,9 @@ export declare class ReleaseGroupProcessor {
|
|
|
225
91
|
private bumpIndependentVersionGroup;
|
|
226
92
|
private determineVersionBumpForProject;
|
|
227
93
|
private getVersionActionsForProject;
|
|
228
|
-
private getFinalConfigForProject;
|
|
229
94
|
private getProjectLoggerForProject;
|
|
230
95
|
private getCurrentCachedVersionForProject;
|
|
231
96
|
private getCachedFinalConfigForProject;
|
|
232
|
-
/**
|
|
233
|
-
* Apply project and release group precedence and default values, as well as validate the final configuration,
|
|
234
|
-
* ready to be cached.
|
|
235
|
-
*/
|
|
236
|
-
private resolveFinalConfigForProject;
|
|
237
97
|
private calculateNewVersion;
|
|
238
98
|
private updateDependenciesForProject;
|
|
239
99
|
private bumpVersionForProject;
|
|
@@ -242,16 +102,7 @@ export declare class ReleaseGroupProcessor {
|
|
|
242
102
|
private getFixedReleaseGroupBumpType;
|
|
243
103
|
private determineSideEffectBump;
|
|
244
104
|
private getProjectDependents;
|
|
245
|
-
private getAllNonImplicitDependents;
|
|
246
105
|
private getNonImplicitDependentsForProject;
|
|
247
|
-
private hasAutoUpdateDependents;
|
|
248
|
-
private topologicallySortReleaseGroups;
|
|
249
|
-
private topologicallySortProjects;
|
|
250
|
-
/**
|
|
251
|
-
* Precompute project -> dependents/dependencies relationships for O(1) lookups
|
|
252
|
-
*/
|
|
253
|
-
private precomputeDependencyRelationships;
|
|
254
|
-
private getProjectDependencies;
|
|
255
106
|
}
|
|
256
107
|
export {};
|
|
257
108
|
//# sourceMappingURL=release-group-processor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-group-processor.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/version/release-group-processor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"release-group-processor.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/version/release-group-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EAEb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAyB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE7E,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,iBAAiB,CAAC;AAarE,eAAO,MAAM,qBAAqB;;;;;;;;;CAYxB,CAAC;AAEX,UAAU,4BAA4B;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IAEd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;;;OAIG;IACH,OAAO,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IAEF,8BAA8B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1D;AAED,qBAAa,qBAAqB;IAmC9B,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,OAAO;IAtCjB;;;OAGG;IACH,OAAO,CAAC,eAAe,CAA0B;IAEjD;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAA0B;IAEhD;;OAEG;IACH,OAAO,CAAC,WAAW,CAGL;IAEd;;;OAGG;IACH,OAAO,CAAC,kBAAkB,CAAqB;IAE/C;;;OAGG;I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