8000 Merge pull request #4693 from EscapeB/fix/fix_deploy_issue_4683 · nirshar/rushstack@dfb13d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit dfb13d8

Browse files
authored
Merge pull request microsoft#4693 from EscapeB/fix/fix_deploy_issue_4683
[rush] fix additionalProjectsToInclude field didn't work in rush deploy
2 parents 20f6986 + c5817b6 commit dfb13d8

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "Fix a recent regression where `rush deploy` did not correctly apply the `additionalProjectsToInclude` setting (GitHub #4683)",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush"
10+
}

libraries/rush-lib/src/cli/actions/DeployAction.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,6 @@ export class DeployAction extends BaseRushAction {
103103
});
104104
}
105105

106-
private _getDependencyProjects(project: RushConfigurationProject): Set<RushConfigurationProject> {
107-
const projects: Set<RushConfigurationProject> = new Set();
108-
const queue: RushConfigurationProject[] = [project];
109-
const visited: Set<RushConfigurationProject> = new Set();
110-
111-
while (queue.length > 0) {
112-
const _project: RushConfigurationProject = queue.pop()!;
113-
projects.add(_project);
114-
for (const dependency of _project.dependencyProjects) {
115-
if (visited.has(dependency)) {
116-
continue;
117-
}
118-
queue.push(dependency);
119-
}
120-
}
121-
122-
return projects;
123-
}
124-
125106
protected async runAsync(): Promise<void> {
126107
const scenarioName: string | undefined = this._scenario.value;
127108
const { DeployScenarioConfiguration } = await import('../../logic/deploy/DeployScenarioConfiguration');
@@ -177,7 +158,7 @@ export class DeployAction extends BaseRushAction {
177158
throw new Error(`The specified deployment project "${mainProjectName}" was not found in rush.json`);
178159
}
179160

180-
const projects: Set<RushConfigurationProject> = this._getDependencyProjects(rushConfigurationProject);
161+
const projects: RushConfigurationProject[] = this.rushConfiguration.projects;
181162
if (this.rushConfiguration.packageManager === 'pnpm') {
182163
for (const project of projects) {
183164
const pnpmfileConfiguration: PnpmfileConfiguration = await PnpmfileConfiguration.initializeAsync(

0 commit comments

Comments
 (0)
0