nx 20.7.1 → 20.8.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.eslintrc.json +3 -1
  2. package/package.json +11 -11
  3. package/release/index.d.ts +1 -1
  4. package/release/index.js +2 -1
  5. package/schemas/nx-schema.json +133 -33
  6. package/src/command-line/release/changelog.js +15 -10
  7. package/src/command-line/release/command-object.d.ts +1 -0
  8. package/src/command-line/release/command-object.js +4 -0
  9. package/src/command-line/release/config/config.d.ts +8 -7
  10. package/src/command-line/release/config/config.js +122 -42
  11. package/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
  12. package/src/command-line/release/config/use-legacy-versioning.js +9 -0
  13. package/src/command-line/release/index.d.ts +4 -0
  14. package/src/command-line/release/index.js +6 -1
  15. package/src/command-line/release/plan-check.js +6 -3
  16. package/src/command-line/release/plan.js +7 -3
  17. package/src/command-line/release/publish.js +5 -3
  18. package/src/command-line/release/release.js +8 -3
  19. package/src/command-line/release/utils/batch-projects-by-generator-config.js +6 -3
  20. package/src/command-line/release/utils/git.d.ts +2 -1
  21. package/src/command-line/release/utils/git.js +10 -2
  22. package/src/command-line/release/utils/github.js +3 -1
  23. package/src/command-line/release/utils/resolve-semver-specifier.d.ts +2 -1
  24. package/src/command-line/release/utils/resolve-semver-specifier.js +2 -1
  25. package/src/command-line/release/utils/semver.d.ts +8 -0
  26. package/src/command-line/release/utils/semver.js +8 -0
  27. package/src/command-line/release/utils/shared-legacy.d.ts +25 -0
  28. package/src/command-line/release/utils/shared-legacy.js +2 -0
  29. package/src/command-line/release/utils/shared.d.ts +11 -17
  30. package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +7 -0
  31. package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +47 -0
  32. package/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
  33. package/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
  34. package/src/command-line/release/version/project-logger.d.ts +8 -0
  35. package/src/command-line/release/version/project-logger.js +45 -0
  36. package/src/command-line/release/version/release-group-processor.d.ts +251 -0
  37. package/src/command-line/release/version/release-group-processor.js +1040 -0
  38. package/src/command-line/release/version/resolve-current-version.d.ts +32 -0
  39. package/src/command-line/release/version/resolve-current-version.js +241 -0
  40. package/src/command-line/release/version/test-utils.d.ts +95 -0
  41. package/src/command-line/release/version/test-utils.js +416 -0
  42. package/src/command-line/release/version/topological-sort.d.ts +9 -0
  43. package/src/command-line/release/version/topological-sort.js +41 -0
  44. package/src/command-line/release/version/version-actions.d.ts +170 -0
  45. package/src/command-line/release/version/version-actions.js +183 -0
  46. package/src/command-line/release/version-legacy.d.ts +46 -0
  47. package/src/command-line/release/version-legacy.js +453 -0
  48. package/src/command-line/release/version.d.ts +0 -40
  49. package/src/command-line/release/version.js +80 -262
  50. package/src/config/nx-json.d.ts +110 -12
  51. package/src/config/workspace-json-project-json.d.ts +2 -2
  52. package/src/core/graph/main.js +1 -1
  53. package/src/core/graph/styles.css +1 -1
  54. package/src/native/index.d.ts +22 -16
  55. package/src/native/native-bindings.js +1 -0
  56. package/src/native/nx.wasi-browser.js +7 -7
  57. package/src/native/nx.wasm32-wasi.wasm +0 -0
  58. package/src/plugins/js/lock-file/utils/package-json.d.ts +1 -1
  59. package/src/plugins/js/lock-file/utils/package-json.js +2 -1
  60. package/src/plugins/js/lock-file/yarn-parser.js +75 -29
  61. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +10 -1
  62. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +59 -6
  63. package/src/project-graph/error-types.js +28 -1
  64. package/src/tasks-runner/cache.d.ts +1 -0
  65. package/src/tasks-runner/cache.js +11 -0
  66. package/src/tasks-runner/run-command.js +9 -9
  67. package/src/utils/handle-errors.js +15 -0
@@ -0,0 +1,25 @@
1
+ import { Tree } from '../../../generators/tree';
2
+ export type ReleaseVersionGeneratorResult = {
3
+ data: VersionData;
4
+ callback: (tree: Tree, opts: {
5
+ dryRun?: boolean;
6
+ verbose?: boolean;
7
+ generatorOptions?: Record<string, unknown>;
8
+ }) => Promise<string[] | {
9
+ changedFiles: string[];
10
+ deletedFiles: string[];
11
+ }>;
12
+ };
13
+ export type VersionData = Record<string, {
14
+ /**
15
+ * newVersion will be null in the case that no changes are detected for the project,
16
+ * e.g. when using conventional commits
17
+ */
18
+ newVersion: string | null;
19
+ currentVersion: string;
20
+ /**
21
+ * The list of projects which depend upon the current project.
22
+ * NOTE: This is more strictly typed in versioning v2.
23
+ */
24
+ dependentProjects: any[];
25
+ }>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,32 +1,26 @@
1
1
  import { ProjectGraph } from '../../../config/project-graph';
2
- import { Tree } from '../../../generators/tree';
3
2
  import type { ReleaseGroupWithName } from '../config/filter-release-groups';
4
3
  import { GitCommit } from './git';
5
4
  export declare const noDiffInChangelogMessage: string;
6
- export type ReleaseVersionGeneratorResult = {
7
- data: VersionData;
8
- callback: (tree: Tree, opts: {
9
- dryRun?: boolean;
10
- verbose?: boolean;
11
- generatorOptions?: Record<string, unknown>;
12
- }) => Promise<string[] | {
13
- changedFiles: string[];
14
- deletedFiles: string[];
15
- }>;
16
- };
17
- export type VersionData = Record<string, {
5
+ export type VersionData = Record<string, VersionDataEntry>;
6
+ export interface VersionDataEntry {
7
+ currentVersion: string;
18
8
  /**
19
9
  * newVersion will be null in the case that no changes are detected for the project,
20
10
  * e.g. when using conventional commits
21
11
  */
22
12
  newVersion: string | null;
23
- currentVersion: string;
24
13
  /**
25
14
  * The list of projects which depend upon the current project.
26
- * TODO: investigate generic type for this once more ecosystems are explored
27
15
  */
28
- dependentProjects: any[];
29
- }>;
16
+ dependentProjects: {
17
+ source: string;
18
+ target: string;
19
+ type: string;
20
+ dependencyCollection: string;
21
+ rawVersionSpec: string;
22
+ }[];
23
+ }
30
24
  export declare class ReleaseVersion {
31
25
  rawVersion: string;
32
26
  gitTag: string;
@@ -0,0 +1,7 @@
1
+ import type { ProjectGraph, ProjectGraphProjectNode } from '../../../config/project-graph';
2
+ import { NxReleaseConfig } from '../config/config';
3
+ import { ReleaseGroupWithName } from '../config/filter-release-groups';
4
+ import { getLatestGitTagForPattern } from '../utils/git';
5
+ import { ProjectLogger } from './project-logger';
6
+ import { SemverBumpType } from './version-actions';
7
+ export declare function deriveSpecifierFromConventionalCommits(nxReleaseConfig: NxReleaseConfig, projectGraph: ProjectGraph, projectLogger: ProjectLogger, releaseGroup: ReleaseGroupWithName, projectGraphNode: ProjectGraphProjectNode, isPrerelease: boolean, latestMatchingGitTag: Awaited<ReturnType<typeof getLatestGitTagForPattern>> | undefined, fallbackCurrentVersionResolver?: 'disk', preid?: string): Promise<SemverBumpType>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deriveSpecifierFromConventionalCommits = deriveSpecifierFromConventionalCommits;
4
+ const git_1 = require("../utils/git");
5
+ const resolve_semver_specifier_1 = require("../utils/resolve-semver-specifier");
6
+ async function deriveSpecifierFromConventionalCommits(nxReleaseConfig, projectGraph, projectLogger, releaseGroup, projectGraphNode,
7
+ // NOTE: This TODO was carried over from the original version generator.
8
+ //
9
+ // TODO: reevaluate this prerelease logic/workflow for independent projects
10
+ // Always assume that if the current version is a prerelease, then the next version should be a prerelease.
11
+ // Users must manually graduate from a prerelease to a release by providing an explicit specifier.
12
+ isPrerelease, latestMatchingGitTag, fallbackCurrentVersionResolver, preid) {
13
+ const affectedProjects = releaseGroup.projectsRelationship === 'independent'
14
+ ? [projectGraphNode.name]
15
+ : releaseGroup.projects;
16
+ // latestMatchingGitTag will be undefined if the current version was resolved from the disk fallback.
17
+ // In this case, we want to use the first commit as the ref to be consistent with the changelog command.
18
+ const previousVersionRef = latestMatchingGitTag
19
+ ? latestMatchingGitTag.tag
20
+ : fallbackCurrentVersionResolver === 'disk'
21
+ ? await (0, git_1.getFirstGitCommit)()
22
+ : undefined;
23
+ if (!previousVersionRef) {
24
+ // This should never happen since the checks above should catch if the current version couldn't be resolved
25
+ throw new Error(`Unable to determine previous version ref for the projects ${affectedProjects.join(', ')}. This is likely a bug in Nx.`);
26
+ }
27
+ let specifier = await (0, resolve_semver_specifier_1.resolveSemverSpecifierFromConventionalCommits)(previousVersionRef, projectGraph, affectedProjects, nxReleaseConfig.conventionalCommits);
28
+ if (!specifier) {
29
+ projectLogger.buffer(`🚫 No changes were detected using git history and the conventional commits standard`);
30
+ return 'none';
31
+ }
32
+ // NOTE: This TODO was carried over from the original version generator.
33
+ // TODO: reevaluate this prerelease logic/workflow for independent projects
34
+ if (isPrerelease) {
35
+ specifier = 'prerelease';
36
+ projectLogger.buffer(`📄 Resolved the specifier as "${specifier}" since the current version is a prerelease`);
37
+ }
38
+ else {
39
+ let extraText = '';
40
+ if (preid && !specifier.startsWith('pre')) {
41
+ specifier = `pre${specifier}`;
42
+ extraText = `, combined with your given preid "${preid}"`;
43
+ }
44
+ projectLogger.buffer(`📄 Resolved the specifier as "${specifier}" using git history and the conventional commits standard${extraText}`);
45
+ }
46
+ return specifier;
47
+ }
@@ -0,0 +1,8 @@
1
+ import type { ProjectGraphProjectNode } from '../../../config/project-graph';
2
+ import { ReleaseGroupWithName } from '../config/filter-release-groups';
3
+ import { SemverBumpType } from './version-actions';
4
+ import { ProjectLogger } from './project-logger';
5
+ export declare function deriveSpecifierFromVersionPlan(projectLogger: ProjectLogger, releaseGroup: ReleaseGroupWithName, projectGraphNode: ProjectGraphProjectNode, currentVersion: string): Promise<{
6
+ bumpType: SemverBumpType;
7
+ versionPlanPath: string;
8
+ }>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deriveSpecifierFromVersionPlan = deriveSpecifierFromVersionPlan;
4
+ const semver_1 = require("semver");
5
+ async function deriveSpecifierFromVersionPlan(projectLogger, releaseGroup, projectGraphNode, currentVersion) {
6
+ const projectName = projectGraphNode.name;
7
+ let bumpType = null;
8
+ let versionPlanPath = null;
9
+ if (releaseGroup.projectsRelationship === 'independent') {
10
+ const result = releaseGroup.resolvedVersionPlans.reduce((acc, plan) => {
11
+ if (!acc.spec) {
12
+ return {
13
+ spec: plan.projectVersionBumps[projectName],
14
+ path: plan.relativePath,
15
+ };
16
+ }
17
+ if (plan.projectVersionBumps[projectName]) {
18
+ const prevNewVersion = (0, semver_1.inc)(currentVersion, acc.spec);
19
+ const nextNewVersion = (0, semver_1.inc)(currentVersion, plan.projectVersionBumps[projectName]);
20
+ return (0, semver_1.gt)(nextNewVersion, prevNewVersion)
21
+ ? {
22
+ spec: plan.projectVersionBumps[projectName],
23
+ path: plan.relativePath,
24
+ }
25
+ : acc;
26
+ }
27
+ return acc;
28
+ }, { spec: null, path: null });
29
+ bumpType = result.spec;
30
+ versionPlanPath = result.path;
31
+ }
32
+ else {
33
+ const result = releaseGroup.resolvedVersionPlans.reduce((acc, plan) => {
34
+ if (!acc.spec) {
35
+ return {
36
+ spec: plan.groupVersionBump,
37
+ path: plan.relativePath,
38
+ };
39
+ }
40
+ const prevNewVersion = (0, semver_1.inc)(currentVersion, acc.spec);
41
+ const nextNewVersion = (0, semver_1.inc)(currentVersion, plan.groupVersionBump);
42
+ return (0, semver_1.gt)(nextNewVersion, prevNewVersion)
43
+ ? {
44
+ spec: plan.groupVersionBump,
45
+ path: plan.relativePath,
46
+ }
47
+ : acc;
48
+ }, { spec: null, path: null });
49
+ bumpType = result.spec;
50
+ versionPlanPath = result.path;
51
+ }
52
+ if (!bumpType) {
53
+ projectLogger.buffer(`🚫 No changes were detected within version plans`);
54
+ }
55
+ return {
56
+ bumpType: bumpType ?? 'none',
57
+ versionPlanPath,
58
+ };
59
+ }
@@ -0,0 +1,8 @@
1
+ export declare class ProjectLogger {
2
+ private projectName;
3
+ private logs;
4
+ private color;
5
+ constructor(projectName: string);
6
+ buffer(msg: string): void;
7
+ flush(): void;
8
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectLogger = void 0;
4
+ const chalk = require("chalk");
5
+ const output_1 = require("../../../utils/output");
6
+ const colors = [
7
+ { instance: chalk.green, spinnerColor: 'green' },
8
+ { instance: chalk.greenBright, spinnerColor: 'green' },
9
+ { instance: chalk.red, spinnerColor: 'red' },
10
+ { instance: chalk.redBright, spinnerColor: 'red' },
11
+ { instance: chalk.cyan, spinnerColor: 'cyan' },
12
+ { instance: chalk.cyanBright, spinnerColor: 'cyan' },
13
+ { instance: chalk.yellow, spinnerColor: 'yellow' },
14
+ { instance: chalk.yellowBright, spinnerColor: 'yellow' },
15
+ { instance: chalk.magenta, spinnerColor: 'magenta' },
16
+ { instance: chalk.magentaBright, spinnerColor: 'magenta' },
17
+ ];
18
+ function getColor(projectName) {
19
+ let code = 0;
20
+ for (let i = 0; i < projectName.length; ++i) {
21
+ code += projectName.charCodeAt(i);
22
+ }
23
+ const colorIndex = code % colors.length;
24
+ return colors[colorIndex];
25
+ }
26
+ class ProjectLogger {
27
+ constructor(projectName) {
28
+ this.projectName = projectName;
29
+ this.logs = [];
30
+ this.color = getColor(projectName);
31
+ }
32
+ buffer(msg) {
33
+ this.logs.push(msg);
34
+ }
35
+ flush() {
36
+ if (this.logs.length === 0) {
37
+ return;
38
+ }
39
+ output_1.output.logSingleLine(`Running release version for project: ${this.color.instance.bold(this.projectName)}`);
40
+ this.logs.forEach((msg) => {
41
+ console.log(this.color.instance.bold(this.projectName) + ' ' + msg);
42
+ });
43
+ }
44
+ }
45
+ exports.ProjectLogger = ProjectLogger;
@@ -0,0 +1,251 @@
1
+ import { NxReleaseVersionV2Configuration } from '../../../config/nx-json';
2
+ import { ProjectGraph } from '../../../config/project-graph';
3
+ import { Tree } from '../../../generators/tree';
4
+ import { type NxReleaseConfig } from '../config/config';
5
+ import type { ReleaseGroupWithName } from '../config/filter-release-groups';
6
+ 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: NxReleaseVersionV2Configuration['specifierSource'];
14
+ currentVersionResolver: NxReleaseVersionV2Configuration['currentVersionResolver'];
15
+ currentVersionResolverMetadata: NxReleaseVersionV2Configuration['currentVersionResolverMetadata'];
16
+ fallbackCurrentVersionResolver: NxReleaseVersionV2Configuration['fallbackCurrentVersionResolver'];
17
+ versionPrefix: NxReleaseVersionV2Configuration['versionPrefix'];
18
+ preserveLocalDependencyProtocols: NxReleaseVersionV2Configuration['preserveLocalDependencyProtocols'];
19
+ versionActionsOptions: NxReleaseVersionV2Configuration['versionActionsOptions'];
20
+ manifestRootsToUpdate: NxReleaseVersionV2Configuration['manifestRootsToUpdate'];
21
+ }
22
+ export declare const BUMP_TYPE_REASON_TEXT: {
23
+ readonly DEPENDENCY_WAS_BUMPED: ", because a dependency was bumped, ";
24
+ readonly USER_SPECIFIER: ", from the given specifier, ";
25
+ readonly PROMPTED_USER_SPECIFIER: ", from the prompted specifier, ";
26
+ readonly CONVENTIONAL_COMMITS: ", derived from conventional commits data, ";
27
+ readonly VERSION_PLANS: ", read from version plan {versionPlanPath}, ";
28
+ readonly DEPENDENCY_ACROSS_GROUPS_WAS_BUMPED: ", because a dependency project belonging to another release group was bumped, ";
29
+ readonly OTHER_PROJECT_IN_FIXED_GROUP_WAS_BUMPED_DUE_TO_DEPENDENCY: ", because of a dependency-only bump to another project in the same fixed release group, ";
30
+ };
31
+ interface ReleaseGroupProcessorOptions {
32
+ dryRun: boolean;
33
+ verbose: boolean;
34
+ firstRelease: boolean;
35
+ preid: string;
36
+ userGivenSpecifier?: string;
37
+ projectsToProcess?: string[];
38
+ /**
39
+ * The optional results of applying the --project or --group filters.
40
+ * These will be empty if there is no filtering, or contain the subset of projects or groups that
41
+ * are being versioned if one of the (mutually exclusive) filters is set.
42
+ */
43
+ filters: {
44
+ projects?: string[];
45
+ groups?: string[];
46
+ };
47
+ }
48
+ export declare class ReleaseGroupProcessor {
49
+ private tree;
50
+ private projectGraph;
51
+ private nxReleaseConfig;
52
+ private releaseGroups;
53
+ private releaseGroupToFilteredProjects;
54
+ private options;
55
+ /**
56
+ * Stores the relationships between release groups, including their dependencies
57
+ * and dependents. This is used for determining processing order and propagating
58
+ * version changes between related groups.
59
+ */
60
+ private groupGraph;
61
+ /**
62
+ * Tracks which release groups have already been processed to avoid
63
+ * processing them multiple times. Used during the group traversal.
64
+ */
65
+ private processedGroups;
66
+ /**
67
+ * Keeps track of which projects have already had their versions bumped.
68
+ * This is used to avoid redundant version bumping and to determine which
69
+ * projects need their dependencies updated.
70
+ */
71
+ private bumpedProjects;
72
+ /**
73
+ * Cache of release groups sorted in topological order to ensure dependencies
74
+ * are processed before dependents. Computed once and reused throughout processing.
75
+ */
76
+ private sortedReleaseGroups;
77
+ /**
78
+ * Maps each release group to its projects sorted in topological order.
79
+ * Ensures projects are processed after their dependencies within each group.
80
+ */
81
+ private sortedProjects;
82
+ /**
83
+ * Track the unique afterAllProjectsVersioned functions involved in the current versioning process,
84
+ * so that we can ensure they are only invoked once per versioning execution.
85
+ */
86
+ private uniqueAfterAllProjectsVersioned;
87
+ /**
88
+ * Track the versionActions for each project so that we can invoke certain instance methods.
89
+ */
90
+ private projectsToVersionActions;
91
+ /**
92
+ * versionData that will ultimately be returned to the nx release version handler by getVersionData()
93
+ */
94
+ private versionData;
95
+ /**
96
+ * Set of all projects that are configured in the nx release config.
97
+ * Used to validate dependencies and identify projects that should be updated.
98
+ */
99
+ private allProjectsConfiguredForNxRelease;
100
+ /**
101
+ * Set of projects that will be processed in the current run.
102
+ * This is potentially a subset of allProjectsConfiguredForNxRelease based on filters
103
+ * and dependency relationships.
104
+ */
105
+ private allProjectsToProcess;
106
+ /**
107
+ * If the user provided a specifier at the time of versioning we store it here so that it can take priority
108
+ * over any configuration.
109
+ */
110
+ private userGivenSpecifier;
111
+ /**
112
+ * Caches the current version of each project to avoid repeated disk/registry/git tag lookups.
113
+ * Often used during new version calculation. Will be null if the current version resolver is set to 'none'.
114
+ */
115
+ private cachedCurrentVersions;
116
+ /**
117
+ * Caches git tag information for projects that resolve their version from git tags.
118
+ * This avoids performing expensive git operations multiple times for the same project.
119
+ */
120
+ private cachedLatestMatchingGitTag;
121
+ /**
122
+ * Temporary storage for dependent project names while building the dependency graph.
123
+ * This is used as an intermediate step before creating the full dependent projects data.
124
+ */
125
+ private tmpCachedDependentProjects;
126
+ /**
127
+ * Resolve the data regarding dependent projects for each project upfront so that it remains accurate
128
+ * even after updates are applied to manifests.
129
+ */
130
+ private originalDependentProjectsPerProject;
131
+ /**
132
+ * In the case of fixed release groups that are configured to resolve the current version from a registry
133
+ * or a git tag, it would be a waste of time and resources to resolve the current version for each individual
134
+ * project, therefore we maintain a cache of the current version for each applicable fixed release group here.
135
+ */
136
+ private currentVersionsPerFixedReleaseGroup;
137
+ /**
138
+ * Cache of project loggers for each project.
139
+ */
140
+ private projectLoggers;
141
+ /**
142
+ * Track any version plan files that have been processed so that we can delete them after versioning is complete,
143
+ * while leaving any unprocessed files in place.
144
+ */
145
+ private processedVersionPlanFiles;
146
+ /**
147
+ * Certain configuration options can be overridden at the project level, and otherwise fall back to the release group level.
148
+ * Many also have a specific default value if nothing is set at either level. To avoid applying this hierarchy for each project
149
+ * every time such a configuration option is needed, we cache the result per project here.
150
+ */
151
+ private finalConfigsByProject;
152
+ /**
153
+ * Maps each project to its release group for quick O(1) lookups.
154
+ * This avoids having to scan through all release groups to find a project.
155
+ */
156
+ private projectToReleaseGroup;
157
+ /**
158
+ * Maps each project to its dependents (projects that depend on it).
159
+ * This is the inverse of the projectToDependencies map and enables
160
+ * efficient lookup of dependent projects for propagating version changes.
161
+ */
162
+ private projectToDependents;
163
+ /**
164
+ * Maps each project to its dependencies (projects it depends on).
165
+ * Used for building dependency graphs and determining processing order.
166
+ */
167
+ private projectToDependencies;
168
+ /**
169
+ * Caches the updateDependents setting for each project to avoid repeated
170
+ * lookups and calculations. This determines if dependent projects should
171
+ * be automatically updated when a dependency changes.
172
+ */
173
+ private projectToUpdateDependentsSetting;
174
+ constructor(tree: Tree, projectGraph: ProjectGraph, nxReleaseConfig: NxReleaseConfig, releaseGroups: ReleaseGroupWithName[], releaseGroupToFilteredProjects: Map<ReleaseGroupWithName, Set<string>>, options: ReleaseGroupProcessorOptions);
175
+ /**
176
+ * Initialize the processor by building the group graph and preparing for processing.
177
+ * This method must be called before processGroups().
178
+ */
179
+ init(): Promise<void>;
180
+ /**
181
+ * Setup mapping from project to release group and cache updateDependents settings
182
+ */
183
+ private setupProjectReleaseGroupMapping;
184
+ /**
185
+ * Determine which projects should be processed and resolve their version actions
186
+ */
187
+ private setupProjectsToProcess;
188
+ /**
189
+ * Find all dependents that should be processed due to dependency updates
190
+ */
191
+ private findDependentsToProcess;
192
+ private buildGroupDependencyGraph;
193
+ private populateDependentProjectsData;
194
+ getReleaseGroupNameForProject(projectName: string): string | null;
195
+ getNextGroup(): string | null;
196
+ processGroups(): Promise<string[]>;
197
+ flushAllProjectLoggers(): void;
198
+ deleteProcessedVersionPlanFiles(): void;
199
+ getVersionData(): VersionData;
200
+ /**
201
+ * Invoke the afterAllProjectsVersioned functions for each unique versionActions type.
202
+ * This can be useful for performing actions like updating a workspace level lock file.
203
+ *
204
+ * Because the tree has already been flushed to disk at this point, each afterAllProjectsVersioned
205
+ * function is responsible for returning the list of changed and deleted files that it affected.
206
+ *
207
+ * The root level `release.version.versionActionsOptions` is what is passed in here because this
208
+ * is a one time action for the whole workspace. Release group and project level overrides are
209
+ * not applicable.
210
+ */
211
+ afterAllProjectsVersioned(rootVersionActionsOptions: Record<string, unknown>): Promise<{
212
+ changedFiles: string[];
213
+ deletedFiles: string[];
214
+ }>;
215
+ private processGroup;
216
+ private propagateChangesToDependentGroups;
217
+ private bumpVersions;
218
+ private bumpFixedVersionGroup;
219
+ private bumpIndependentVersionGroup;
220
+ private determineVersionBumpForProject;
221
+ private getVersionActionsForProject;
222
+ private getFinalConfigForProject;
223
+ private getProjectLoggerForProject;
224
+ private getCurrentCachedVersionForProject;
225
+ private getCachedFinalConfigForProject;
226
+ /**
227
+ * Apply project and release group precedence and default values, as well as validate the final configuration,
228
+ * ready to be cached.
229
+ */
230
+ private resolveFinalConfigForProject;
231
+ private calculateNewVersion;
232
+ private updateDependenciesForProject;
233
+ private bumpVersionForProject;
234
+ private updateDependenciesForDependents;
235
+ private getOriginalDependentProjects;
236
+ private propagateChanges;
237
+ private getFixedReleaseGroupBumpType;
238
+ private determineSideEffectBump;
239
+ private getProjectDependents;
240
+ private getAllNonImplicitDependents;
241
+ private getNonImplicitDependentsForProject;
242
+ private hasAutoUpdateDependents;
243
+ private topologicallySortReleaseGroups;
244
+ private topologicallySortProjects;
245
+ /**
246
+ * Precompute project -> dependents/dependencies relationships for O(1) lookups
247
+ */
248
+ private precomputeDependencyRelationships;
249
+ private getProjectDependencies;
250
+ }
251
+ export {};