Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/reviews/api/rush-lib.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,8 @@ export class RushConfigurationProject {
get rushConfiguration(): RushConfiguration;
get shouldPublish(): boolean;
get skipRushCheck(): boolean;
// (undocumented)
readonly splitWorkspace: boolean;
// @beta
get tags(): ReadonlySet<string>;
get tempProjectName(): string;
Expand Down
8 changes: 7 additions & 1 deletion libraries/rush-lib/src/api/RushConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/* eslint max-lines: off */

import * as path from 'path';
import * as process from 'process';
import * as semver from 'semver';
import {
JsonFile,
Expand Down Expand Up @@ -769,9 +770,14 @@ export class RushConfiguration {
this._projects = [];
this._projectsByName = new Map<string, RushConfigurationProject>();

let filteredProjects: IRushConfigurationProjectJson[] = this._rushConfigurationJson.projects;
if (process.argv.indexOf('install') >= 0 || process.argv.indexOf('update') >= 0) {
filteredProjects = filteredProjects.filter((x) => !x.splitWorkspace);
}

// We sort the projects array in alphabetical order. This ensures that the packages
// are processed in a deterministic order by the various Rush algorithms.
const sortedProjectJsons: IRushConfigurationProjectJson[] = this._rushConfigurationJson.projects.slice(0);
const sortedProjectJsons: IRushConfigurationProjectJson[] = filteredProjects.slice(0);
sortedProjectJsons.sort((a: IRushConfigurationProjectJson, b: IRushConfigurationProjectJson) =>
a.packageName.localeCompare(b.packageName)
);
Expand Down
5 changes: 5 additions & 0 deletions libraries/rush-lib/src/api/RushConfigurationProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface IRushConfigurationProjectJson {
skipRushCheck?: boolean;
publishFolder?: string;
tags?: string[];
splitWorkspace?: boolean;
}

/**
Expand Down Expand Up @@ -77,6 +78,8 @@ export class RushConfigurationProject {
private _dependencyProjects: Set<RushConfigurationProject> | undefined = undefined;
private _consumingProjects: Set<RushConfigurationProject> | undefined = undefined;

public readonly splitWorkspace: boolean;

/** @internal */
public constructor(options: IRushConfigurationProjectOptions) {
const { projectJson, rushConfiguration, tempProjectName, allowedProjectTags } = options;
Expand Down Expand Up @@ -187,6 +190,8 @@ export class RushConfigurationProject {
} else {
this._tags = new Set(projectJson.tags);
}

this.splitWorkspace = !!projectJson.splitWorkspace;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion libraries/rush-lib/src/schemas/rush.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
}
}
},
"additionalProperties": false,
"additionalProperties": true,
"required": ["packageName", "projectFolder"]
}
},
Expand Down