@rushstack/rush-sdk 5.85.1 → 5.86.0-pr3481.11

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 (2) hide show
  1. package/dist/rush-lib.d.ts +500 -405
  2. package/package.json +7 -7
@@ -85,27 +85,20 @@ export declare class ApprovedPackagesItem {
85
85
  * @public
86
86
  */
87
87
  export declare class ApprovedPackagesPolicy {
88
- private _enabled;
89
- private _ignoredNpmScopes;
90
- private _reviewCategories;
91
- private _browserApprovedPackages;
92
- private _nonbrowserApprovedPackages;
93
- /** @internal */
94
- constructor(rushConfiguration: RushConfiguration, rushConfigurationJson: IRushConfigurationJson);
95
88
  /**
96
89
  * Whether the feature is enabled. The feature is enabled if the "approvedPackagesPolicy"
97
90
  * field is assigned in rush.json.
98
91
  */
99
- get enabled(): boolean;
92
+ readonly enabled: boolean;
100
93
  /**
101
94
  * A list of NPM package scopes that will be excluded from review (e.g. `@types`)
102
95
  */
103
- get ignoredNpmScopes(): Set<string>;
96
+ readonly ignoredNpmScopes: ReadonlySet<string>;
104
97
  /**
105
98
  * A list of category names that are valid for usage as the RushConfigurationProject.reviewCategory field.
106
99
  * This array will never be undefined.
107
100
  */
108
- get reviewCategories(): Set<string>;
101
+ readonly reviewCategories: ReadonlySet<string>;
109
102
  /**
110
103
  * Packages approved for usage in a web browser. This is the stricter of the two types, so by default
111
104
  * all new packages are added to this file.
@@ -120,7 +113,7 @@ export declare class ApprovedPackagesPolicy {
120
113
  *
121
114
  * Example filename: `C:\MyRepo\common\config\rush\browser-approved-packages.json`
122
115
  */
123
- get browserApprovedPackages(): ApprovedPackagesConfiguration;
116
+ readonly browserApprovedPackages: ApprovedPackagesConfiguration;
124
117
  /**
125
118
  * Packages approved for usage everywhere *except* in a web browser.
126
119
  *
@@ -133,7 +126,58 @@ export declare class ApprovedPackagesPolicy {
133
126
  *
134
127
  * Example filename: `C:\MyRepo\common\config\rush\browser-approved-packages.json`
135
128
  */
136
- get nonbrowserApprovedPackages(): ApprovedPackagesConfiguration;
129
+ readonly nonbrowserApprovedPackages: ApprovedPackagesConfiguration;
130
+ /** @internal */
131
+ constructor(rushConfiguration: RushConfiguration, rushConfigurationJson: IRushConfigurationJson);
132
+ }
133
+
134
+ /**
135
+ * A base class for flag file.
136
+ * @internal
137
+ */
138
+ export declare class _BaseFlag<T extends object = JsonObject> {
139
+ /**
140
+ * Flag file path
141
+ */
142
+ readonly path: string;
143
+ /**
144
+ * Content of the flag
145
+ */
146
+ protected _state: T;
147
+ /**
148
+ * Whether the current state is modified
149
+ */
150
+ protected _isModified: boolean;
151
+ /**
152
+ * Creates a new flag file
153
+ * @param folderPath - the folder that this flag is managing
154
+ * @param state - optional, the state that should be managed or compared
155
+ */
156
+ constructor(folderPath: string, state?: Partial<T>);
157
+ /**
158
+ * Returns true if the file exists and the contents match the current state.
159
+ */
160
+ isValid(): boolean;
161
+ /**
162
+ * Writes the flag file to disk with the current state
163
+ */
164
+ create(): void;
165
+ /**
166
+ * Merge new data into current state by lodash "merge"
167
+ */
168
+ mergeFromObject(data: JsonObject): void;
169
+ /**
170
+ * Writes the flag file to disk with the current state if modified
171
+ */
172
+ saveIfModified(): void;
173
+ /**
174
+ * Removes the flag file
175
+ */
176
+ clear(): void;
177
+ /**
178
+ * Returns Name of the flag file
179
+ */
180
+ protected get flagName(): string;
137
181
  }
138
182
 
139
183
  /**
@@ -222,31 +266,22 @@ export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCach
222
266
  */
223
267
  export declare class CommonVersionsConfiguration {
224
268
  private static _jsonSchema;
225
- private _filePath;
226
269
  private _preferredVersions;
227
- private _implicitlyPreferredVersions;
228
270
  private _allowedAlternativeVersions;
229
271
  private _modified;
230
- private constructor();
231
- /**
232
- * Loads the common-versions.json data from the specified file path.
233
- * If the file has not been created yet, then an empty object is returned.
234
- */
235
- static loadFromFile(jsonFilename: string): CommonVersionsConfiguration;
236
- private static _deserializeTable;
237
- private static _serializeTable;
238
272
  /**
239
273
  * Get the absolute file path of the common-versions.json file.
240
274
  */
241
- get filePath(): string;
242
- /**
243
- * Get a sha1 hash of the preferred versions.
244
- */
245
- getPreferredVersionsHash(): string;
275
+ readonly filePath: string;
246
276
  /**
247
- * Writes the "common-versions.json" file to disk, using the filename that was passed to loadFromFile().
277
+ * When set to true, for all projects in the repo, all dependencies will be automatically added as preferredVersions,
278
+ * except in cases where different projects specify different version ranges for a given dependency. For older
279
+ * package managers, this tended to reduce duplication of indirect dependencies. However, it can sometimes cause
280
+ * trouble for indirect dependencies with incompatible peerDependencies ranges.
281
+ *
282
+ * If the value is `undefined`, then the default value is `true`.
248
283
  */
249
- save(): boolean;
284
+ readonly implicitlyPreferredVersions: boolean | undefined;
250
285
  /**
251
286
  * A table that specifies a "preferred version" for a given NPM package. This feature is typically used
252
287
  * to hold back an indirect dependency to a specific older version, or to reduce duplication of indirect dependencies.
@@ -261,16 +296,7 @@ export declare class CommonVersionsConfiguration {
261
296
  * After modifying this field, it's recommended to run `rush update --full` so that the package manager
262
297
  * will recalculate all version selections.
263
298
  */
264
- get preferredVersions(): Map<string, string>;
265
- /**
266
- * When set to true, for all projects in the repo, all dependencies will be automatically added as preferredVersions,
267
- * except in cases where different projects specify different version ranges for a given dependency. For older
268
- * package managers, this tended to reduce duplication of indirect dependencies. However, it can sometimes cause
269
- * trouble for indirect dependencies with incompatible peerDependencies ranges.
270
- *
271
- * If the value is `undefined`, then the default value is `true`.
272
- */
273
- get implicitlyPreferredVersions(): boolean | undefined;
299
+ readonly preferredVersions: Map<string, string>;
274
300
  /**
275
301
  * A table that stores, for a given dependency, a list of SemVer ranges that will be accepted
276
302
  * by "rush check" in addition to the normal version range.
@@ -283,7 +309,23 @@ export declare class CommonVersionsConfiguration {
283
309
  * Note that the normal version range (as inferred by looking at all projects in the repo)
284
310
  * should NOT be included in this list.
285
311
  */
286
- get allowedAlternativeVersions(): Map<string, ReadonlyArray<string>>;
312
+ readonly allowedAlternativeVersions: Map<string, ReadonlyArray<string>>;
313
+ private constructor();
314
+ /**
315
+ * Loads the common-versions.json data from the specified file path.
316
+ * If the file has not been created yet, then an empty object is returned.
317
+ */
318
+ static loadFromFile(jsonFilename: string): CommonVersionsConfiguration;
319
+ private static _deserializeTable;
320
+ private static _serializeTable;
321
+ /**
322
+ * Get a sha1 hash of the preferred versions.
323
+ */
324
+ getPreferredVersionsHash(): string;
325
+ /**
326
+ * Writes the "common-versions.json" file to disk, using the filename that was passed to loadFromFile().
327
+ */
328
+ save(): boolean;
287
329
  /**
288
330
  * Returns preferredVersions.
289
331
  */
@@ -627,17 +669,16 @@ export declare class EventHooks {
627
669
  */
628
670
  export declare class ExperimentsConfiguration {
629
671
  private static _jsonSchema;
630
- private _experimentConfiguration;
631
672
  private _jsonFileName;
632
- /**
633
- * @internal
634
- */
635
- constructor(jsonFileName: string);
636
673
  /**
637
674
  * Get the experiments configuration.
638
675
  * @beta
639
676
  */
640
- get configuration(): Readonly<IExperimentsJson>;
677
+ readonly configuration: Readonly<IExperimentsJson>;
678
+ /**
679
+ * @internal
680
+ */
681
+ constructor(jsonFileName: string);
641
682
  }
642
683
 
643
684
  /**
@@ -886,6 +927,11 @@ export declare interface IExperimentsJson {
886
927
  * in common/config/rush/command-line.json.
887
928
  */
888
929
  phasedCommands?: boolean;
930
+ /**
931
+ * If true, rush install or rush update implicitly specify --ignore-scripts during pnpm install,
932
+ * and run install lifecycle scripts by pnpm rebuild --pending after pnpm install successfully.
933
+ */
934
+ deferredInstallationScripts?: boolean;
889
935
  /**
890
936
  * If true, perform a clean install after when running `rush install` or `rush update` if the
891
937
  * `.npmrc` file has changed since the last install.
@@ -957,6 +1003,51 @@ declare interface IIndividualVersionJson extends IVersionPolicyJson {
957
1003
  lockedMajor?: number;
958
1004
  }
959
1005
 
1006
+ /**
1007
+ * This represents the JSON data structure for the "last-install.flag" file.
1008
+ * @internal
1009
+ */
1010
+ export declare interface _ILastInstallFlagJson {
1011
+ /**
1012
+ * Current node version
1013
+ */
1014
+ node: string;
1015
+ /**
1016
+ * Current package manager name
1017
+ */
1018
+ packageManager: PackageManagerName;
1019
+ /**
1020
+ * Current package manager version
1021
+ */
1022
+ packageManagerVersion: string;
1023
+ /**
1024
+ * Current rush json folder
1025
+ */
1026
+ rushJsonFolder: string;
1027
+ /**
1028
+ * The content of package.json, used in the flag file of autoinstaller
1029
+ */
1030
+ packageJson?: IPackageJson;
1031
+ /**
1032
+ * Same with pnpmOptions.pnpmStorePath in rush.json
1033
+ */
1034
+ storePath?: string;
1035
+ /**
1036
+ * True when "useWorkspaces" is true in rush.json
1037
+ */
1038
+ workspaces?: true;
1039
+ /**
1040
+ * True when user explicitly specify "--ignore-scripts" CLI parameter or deferredInstallationScripts
1041
+ */
1042
+ ignoreScripts?: true;
1043
+ /**
1044
+ * When specified, it is a list of selected projects during partial install
1045
+ * It is undefined when full install
1046
+ */
1047
+ selectedProjectNames?: string[];
1048
+ [key: string]: unknown;
1049
+ }
1050
+
960
1051
  /**
961
1052
  * Options to pass to the rush "launch" functions.
962
1053
  *
@@ -1027,15 +1118,14 @@ export declare interface ILogger {
1027
1118
  * @public
1028
1119
  */
1029
1120
  export declare class IndividualVersionPolicy extends VersionPolicy {
1030
- private _lockedMajor;
1031
1121
  /**
1032
- * @internal
1122
+ * The major version that has been locked
1033
1123
  */
1034
- constructor(versionPolicyJson: IIndividualVersionJson);
1124
+ readonly lockedMajor: number | undefined;
1035
1125
  /**
1036
- * The major version that has been locked
1126
+ * @internal
1037
1127
  */
1038
- get lockedMajor(): number | undefined;
1128
+ constructor(versionPolicyJson: IIndividualVersionJson);
1039
1129
  /**
1040
1130
  * Serialized json for this policy
1041
1131
  *
@@ -1317,6 +1407,10 @@ export declare interface _IPnpmOptionsJson extends IPackageManagerOptionsJsonBas
1317
1407
  * {@inheritDoc PnpmOptionsConfiguration.globalAllowedDeprecatedVersions}
1318
1408
  */
1319
1409
  globalAllowedDeprecatedVersions?: Record<string, string>;
1410
+ /**
1411
+ * {@inheritDoc PnpmOptionsConfiguration.globalPatchedDependencies}
1412
+ */
1413
+ globalPatchedDependencies?: Record<string, string>;
1320
1414
  /**
1321
1415
  * {@inheritDoc PnpmOptionsConfiguration.unsupportedPackageJsonSettings}
1322
1416
  */
@@ -1373,6 +1467,7 @@ declare interface IRushConfigurationJson {
1373
1467
  rushVersion: string;
1374
1468
  repository?: IRushRepositoryJson;
1375
1469
  nodeSupportedVersionRange?: string;
1470
+ nodeSupportedVersionInstructions?: string;
1376
1471
  suppressNodeLtsWarning?: boolean;
1377
1472
  projectFolderMinDepth?: number;
1378
1473
  projectFolderMaxDepth?: number;
@@ -1405,6 +1500,7 @@ declare interface IRushConfigurationProjectJson {
1405
1500
  skipRushCheck?: boolean;
1406
1501
  publishFolder?: string;
1407
1502
  tags?: string[];
1503
+ splitWorkspace?: boolean;
1408
1504
  }
1409
1505
 
1410
1506
  /**
@@ -1429,6 +1525,16 @@ declare interface IRushConfigurationProjectOptions {
1429
1525
  allowedProjectTags: Set<string> | undefined;
1430
1526
  }
1431
1527
 
1528
+ /**
1529
+ * The filter parameters to search from all projects.
1530
+ */
1531
+ declare interface IRushConfigurationProjectsFilter {
1532
+ /**
1533
+ * If true, filter out projects that specify splitWorkspace as true.
1534
+ */
1535
+ splitWorkspace: boolean;
1536
+ }
1537
+
1432
1538
  /**
1433
1539
  * Part of IRushConfigurationJson.
1434
1540
  */
@@ -1692,16 +1798,9 @@ export declare interface _IYarnOptionsJson extends IPackageManagerOptionsJsonBas
1692
1798
  * it can invalidate the last install.
1693
1799
  * @internal
1694
1800
  */
1695
- export declare class _LastInstallFlag {
1696
- private _path;
1697
- private _state;
1698
- /**
1699
- * Creates a new LastInstall flag
1700
- * @param folderPath - the folder that this flag is managing
1701
- * @param state - optional, the state that should be managed or compared
1702
- */
1703
- constructor(folderPath: string, state?: JsonObject);
1801
+ export declare class _LastInstallFlag extends _BaseFlag<_ILastInstallFlagJson> {
1704
1802
  /**
1803
+ * @override
1705
1804
  * Returns true if the file exists and the contents match the current state.
1706
1805
  */
1707
1806
  isValid(options?: _ILockfileValidityCheckOptions): boolean;
@@ -1715,18 +1814,6 @@ export declare class _LastInstallFlag {
1715
1814
  rushVerb: string;
1716
1815
  }): boolean;
1717
1816
  private _isValid;
1718
- /**
1719
- * Writes the flag file to disk with the current state
1720
- */
1721
- create(): void;
1722
- /**
1723
- * Removes the flag file
1724
- */
1725
- clear(): void;
1726
- /**
1727
- * Returns the full path to the flag file
1728
- */
1729
- get path(): string;
1730
1817
  /**
1731
1818
  * Returns the name of the flag file
1732
1819
  */
@@ -1739,27 +1826,25 @@ export declare class _LastInstallFlag {
1739
1826
  */
1740
1827
  export declare class LockStepVersionPolicy extends VersionPolicy {
1741
1828
  private _version;
1742
- private _nextBump;
1743
- private _mainProject;
1744
- /**
1745
- * @internal
1746
- */
1747
- constructor(versionPolicyJson: ILockStepVersionJson);
1748
- /**
1749
- * The value of the lockstep version
1750
- */
1751
- get version(): string;
1752
1829
  /**
1753
1830
  * The type of bump for next bump.
1754
1831
  */
1755
- get nextBump(): BumpType | undefined;
1832
+ readonly nextBump: BumpType | undefined;
1756
1833
  /**
1757
1834
  * The main project for the version policy.
1758
1835
  *
1759
1836
  * If the value is provided, change logs will only be generated in that project.
1760
1837
  * If the value is not provided, change logs will be hosted in each project associated with the policy.
1761
1838
  */
1762
- get mainProject(): string | undefined;
1839
+ readonly mainProject: string | undefined;
1840
+ /**
1841
+ * @internal
1842
+ */
1843
+ constructor(versionPolicyJson: ILockStepVersionJson);
1844
+ /**
1845
+ * The value of the lockstep version
1846
+ */
1847
+ get version(): string;
1763
1848
  /**
1764
1849
  * Serialized json for this policy
1765
1850
  *
@@ -1960,9 +2045,11 @@ export declare class Operation {
1960
2045
  * @internal
1961
2046
  */
1962
2047
  export declare class _OperationStateFile {
1963
- private readonly _rushProject;
1964
- private readonly _filename;
1965
2048
  private _state;
2049
+ /**
2050
+ * Returns the filename of the metadata file.
2051
+ */
2052
+ readonly filename: string;
1966
2053
  constructor(options: _IOperationStateFileOptions);
1967
2054
  private static _getFilename;
1968
2055
  /**
@@ -1971,10 +2058,6 @@ export declare class _OperationStateFile {
1971
2058
  * @internal
1972
2059
  */
1973
2060
  static getFilenameRelativeToProjectRoot(phase: IPhase): string;
1974
- /**
1975
- * Returns the filename of the metadata file.
1976
- */
1977
- get filename(): string;
1978
2061
  get state(): _IOperationStateJson | undefined;
1979
2062
  writeAsync(json: _IOperationStateJson): Promise<void>;
1980
2063
  tryRestoreAsync(): Promise<_IOperationStateJson | undefined>;
@@ -2027,33 +2110,30 @@ export declare enum OperationStatus {
2027
2110
  * @public
2028
2111
  */
2029
2112
  export declare class PackageJsonDependency {
2030
- private _type;
2031
- private _name;
2032
2113
  private _version;
2033
2114
  private _onChange;
2115
+ readonly name: string;
2116
+ readonly dependencyType: DependencyType;
2034
2117
  constructor(name: string, version: string, type: DependencyType, onChange: () => void);
2035
- get name(): string;
2036
2118
  get version(): string;
2037
2119
  setVersion(newVersion: string): void;
2038
- get dependencyType(): DependencyType;
2039
2120
  }
2040
2121
 
2041
2122
  /**
2042
2123
  * @public
2043
2124
  */
2044
2125
  export declare class PackageJsonEditor {
2045
- private readonly _filePath;
2046
2126
  private readonly _dependencies;
2047
2127
  private readonly _devDependencies;
2048
2128
  private readonly _resolutions;
2049
2129
  private _modified;
2050
2130
  private _sourceData;
2131
+ readonly filePath: string;
2051
2132
  private constructor();
2052
2133
  static load(filePath: string): PackageJsonEditor;
2053
2134
  static fromObject(object: IPackageJson, filename: string): PackageJsonEditor;
2054
2135
  get name(): string;
2055
2136
  get version(): string;
2056
- get filePath(): string;
2057
2137
  /**
2058
2138
  * The list of dependencies of type DependencyType.Regular, DependencyType.Optional, or DependencyType.Peer.
2059
2139
  */
@@ -2105,16 +2185,15 @@ export declare abstract class PackageManager {
2105
2185
  * The SemVer version of the package manager.
2106
2186
  */
2107
2187
  readonly version: string;
2108
- protected _shrinkwrapFilename: string;
2109
- /** @internal */
2110
- protected constructor(version: string, packageManager: PackageManagerName);
2111
2188
  /**
2112
2189
  * The filename of the shrinkwrap file that is used by the package manager.
2113
2190
  *
2114
2191
  * @remarks
2115
2192
  * Example: `npm-shrinkwrap.json` or `pnpm-lock.yaml`
2116
2193
  */
2117
- get shrinkwrapFilename(): string;
2194
+ readonly shrinkwrapFilename: string;
2195
+ /** @internal */
2196
+ protected constructor(version: string, packageManager: PackageManagerName, shrinkwrapFilename: string);
2118
2197
  }
2119
2198
 
2120
2199
  /**
@@ -2174,6 +2253,8 @@ export declare class PhasedCommandHooks {
2174
2253
  */
2175
2254
  export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfigurationBase {
2176
2255
  private static _jsonSchema;
2256
+ private readonly _json;
2257
+ private _globalPatchedDependencies;
2177
2258
  /**
2178
2259
  * The method used to resolve the store used by PNPM.
2179
2260
  *
@@ -2304,11 +2385,26 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
2304
2385
  * strategy that is known to provide a good experience for large teams with lots of projects.
2305
2386
  */
2306
2387
  readonly unsupportedPackageJsonSettings: unknown | undefined;
2388
+ readonly jsonFilename: string | undefined;
2389
+ /**
2390
+ * (GENERATED BY RUSH-PNPM PATCH-COMMIT) When modifying this property, make sure you know what you are doing.
2391
+ *
2392
+ * The `globalPatchedDependencies` is added/updated automatically when you run pnpm patch-commit
2393
+ * command. It is a dictionary where the key should be the package name and exact version. The value
2394
+ * should be a relative path to a patch file.
2395
+ *
2396
+ * PNPM documentation: https://pnpm.io/package_json#pnpmpatcheddependencies
2397
+ */
2398
+ get globalPatchedDependencies(): Record<string, string> | undefined;
2307
2399
  private constructor();
2308
2400
  /** @internal */
2309
2401
  static loadFromJsonFileOrThrow(jsonFilename: string, commonTempFolder: string): PnpmOptionsConfiguration;
2310
2402
  /** @internal */
2311
2403
  static loadFromJsonObject(json: _IPnpmOptionsJson, commonTempFolder: string): PnpmOptionsConfiguration;
2404
+ /**
2405
+ * Updates patchedDependencies field of the PNPM options in the common/config/rush/pnpm-config.json file.
2406
+ */
2407
+ updateGlobalPatchedDependencies(patchedDependencies: Record<string, string> | undefined): void;
2312
2408
  }
2313
2409
 
2314
2410
  /**
@@ -2377,17 +2473,16 @@ export declare class ProjectChangeAnalyzer {
2377
2473
  */
2378
2474
  export declare class RepoStateFile {
2379
2475
  private static _jsonSchema;
2380
- private _repoStateFilePath;
2381
2476
  private _variant;
2382
2477
  private _pnpmShrinkwrapHash;
2383
2478
  private _preferredVersionsHash;
2384
2479
  private _isValid;
2385
2480
  private _modified;
2386
- private constructor();
2387
2481
  /**
2388
2482
  * Get the absolute file path of the repo-state.json file.
2389
2483
  */
2390
- get filePath(): string;
2484
+ readonly filePath: string;
2485
+ private constructor();
2391
2486
  /**
2392
2487
  * The hash of the pnpm shrinkwrap file at the end of the last update.
2393
2488
  */
@@ -2430,7 +2525,7 @@ export declare class RepoStateFile {
2430
2525
  * @public
2431
2526
  */
2432
2527
  export declare class Rush {
2433
- private static _version;
2528
+ private static __rushLibPackageJson;
2434
2529
  /**
2435
2530
  * This API is used by the `@microsoft/rush` front end to launch the "rush" command-line.
2436
2531
  * Third-party tools should not use this API. Instead, they should execute the "rush" binary
@@ -2460,6 +2555,10 @@ export declare class Rush {
2460
2555
  * This is the same as the Rush tool version for that release.
2461
2556
  */
2462
2557
  static get version(): string;
2558
+ /**
2559
+ * @internal
2560
+ */
2561
+ static get _rushLibPackageJson(): IPackageJson;
2463
2562
  /**
2464
2563
  * Assign the `RUSH_INVOKED_FOLDER` environment variable during startup. This is only applied when
2465
2564
  * Rush is invoked via the CLI, not via the `@microsoft/rush-lib` automation API.
@@ -2485,95 +2584,18 @@ export declare class Rush {
2485
2584
  */
2486
2585
  export declare class RushConfiguration {
2487
2586
  private static _jsonSchema;
2488
- private _rushJsonFile;
2489
- private _rushJsonFolder;
2490
- private _changesFolder;
2491
- private _commonFolder;
2492
- private _commonTempFolder;
2493
- private _commonScriptsFolder;
2494
- private _commonRushConfigFolder;
2495
- private _packageManager;
2496
- private _packageManagerWrapper;
2497
- private _npmCacheFolder;
2498
- private _npmTmpFolder;
2499
- private _yarnCacheFolder;
2500
- private _shrinkwrapFilename;
2501
- private _tempShrinkwrapFilename;
2502
- private _tempShrinkwrapPreinstallFilename;
2503
- private _currentVariantJsonFilename;
2504
- private _packageManagerToolVersion;
2505
- private _packageManagerToolFilename;
2506
- private _projectFolderMinDepth;
2507
- private _projectFolderMaxDepth;
2508
- private _allowMostlyStandardPackageNames;
2509
- private _ensureConsistentVersions;
2510
- private _suppressNodeLtsWarning;
2511
2587
  private _variants;
2512
2588
  private readonly _pathTrees;
2513
- private _approvedPackagesPolicy;
2514
- private _gitAllowedEmailRegExps;
2515
- private _gitSampleEmail;
2516
- private _gitVersionBumpCommitMessage;
2517
- private _gitChangeLogUpdateCommitMessage;
2518
- private _gitChangefilesCommitMessage;
2519
- private _gitTagSeparator;
2520
- private _hotfixChangeEnabled;
2521
- private _repositoryUrls;
2522
- private _repositoryDefaultBranch;
2523
- private _repositoryDefaultRemote;
2524
- private _npmOptions;
2525
- private _pnpmOptions;
2526
- private _yarnOptions;
2527
- private _packageManagerConfigurationOptions;
2528
- private _eventHooks;
2529
- private readonly _packageNameParser;
2530
- private _telemetryEnabled;
2531
2589
  private _projects;
2532
2590
  private _projectsByName;
2533
2591
  private _projectsByTag;
2592
+ private _filteredProjectsCache;
2593
+ private _hasSplitWorkspaceProject;
2534
2594
  private _commonVersionsConfigurationsByVariant;
2535
- private _versionPolicyConfiguration;
2536
- private _versionPolicyConfigurationFilePath;
2537
- private _experimentsConfiguration;
2538
- private __rushPluginsConfiguration;
2539
- private readonly _rushConfigurationJson;
2540
- /**
2541
- * Use RushConfiguration.loadFromConfigurationFile() or Use RushConfiguration.loadFromDefaultLocation()
2542
- * instead.
2543
- */
2544
- private constructor();
2545
- private _initializeAndValidateLocalProjects;
2546
- /**
2547
- * Loads the configuration data from an Rush.json configuration file and returns
2548
- * an RushConfiguration object.
2549
- */
2550
- static loadFromConfigurationFile(rushJsonFilename: string): RushConfiguration;
2551
- static loadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration;
2552
- /**
2553
- * Find the rush.json location and return the path, or undefined if a rush.json can't be found.
2554
- *
2555
- * @privateRemarks
2556
- * Keep this in sync with `findRushJsonLocation` in `rush-sdk/src/index.ts`.
2557
- */
2558
- static tryFindRushJsonLocation(options?: ITryFindRushJsonLocationOptions): string | undefined;
2559
- /**
2560
- * This generates the unique names that are used to create temporary projects
2561
- * in the Rush common folder.
2562
- * NOTE: sortedProjectJsons is sorted by the caller.
2563
- */
2564
- private static _generateTempNameForProject;
2565
- /**
2566
- * If someone adds a config file in the "common/rush/config" folder, it would be a bad
2567
- * experience for Rush to silently ignore their file simply because they misspelled the
2568
- * filename, or maybe it's an old format that's no longer supported. The
2569
- * _validateCommonRushConfigFolder() function makes sure that this folder only contains
2570
- * recognized config files.
2571
- */
2572
- private static _validateCommonRushConfigFolder;
2573
2595
  /**
2574
2596
  * The name of the package manager being used to install dependencies
2575
2597
  */
2576
- get packageManager(): PackageManagerName;
2598
+ readonly packageManager: PackageManagerName;
2577
2599
  /**
2578
2600
  * {@inheritdoc PackageManager}
2579
2601
  *
@@ -2583,31 +2605,31 @@ export declare class RushConfiguration {
2583
2605
  *
2584
2606
  * @beta
2585
2607
  */
2586
- get packageManagerWrapper(): PackageManager;
2608
+ readonly packageManagerWrapper: PackageManager;
2587
2609
  /**
2588
2610
  * Gets the JSON data structure for the "rush.json" configuration file.
2589
2611
  *
2590
2612
  * @internal
2591
2613
  */
2592
- get rushConfigurationJson(): IRushConfigurationJson;
2614
+ readonly rushConfigurationJson: IRushConfigurationJson;
2593
2615
  /**
2594
2616
  * The absolute path to the "rush.json" configuration file that was loaded to construct this object.
2595
2617
  */
2596
- get rushJsonFile(): string;
2618
+ readonly rushJsonFile: string;
2597
2619
  /**
2598
2620
  * The absolute path of the folder that contains rush.json for this project.
2599
2621
  */
2600
- get rushJsonFolder(): string;
2622
+ readonly rushJsonFolder: string;
2601
2623
  /**
2602
2624
  * The folder that contains all change files.
2603
2625
  */
2604
- get changesFolder(): string;
2626
+ readonly changesFolder: string;
2605
2627
  /**
2606
2628
  * The fully resolved path for the "common" folder where Rush will store settings that
2607
2629
  * affect all Rush projects. This is always a subfolder of the folder containing "rush.json".
2608
2630
  * Example: `C:\MyRepo\common`
2609
2631
  */
2610
- get commonFolder(): string;
2632
+ readonly commonFolder: string;
2611
2633
  /**
2612
2634
  * The folder where Rush's additional config files are stored. This folder is always a
2613
2635
  * subfolder called `config\rush` inside the common folder. (The `common\config` folder
@@ -2616,29 +2638,25 @@ export declare class RushConfiguration {
2616
2638
  *
2617
2639
  * Example: `C:\MyRepo\common\config\rush`
2618
2640
  */
2619
- get commonRushConfigFolder(): string;
2641
+ readonly commonRushConfigFolder: string;
2620
2642
  /**
2621
2643
  * The folder where temporary files will be stored. This is always a subfolder called "temp"
2622
2644
  * under the common folder.
2623
2645
  * Example: `C:\MyRepo\common\temp`
2624
2646
  */
2625
- get commonTempFolder(): string;
2647
+ readonly commonTempFolder: string;
2626
2648
  /**
2627
- * The folder where automation scripts are stored. This is always a subfolder called "scripts"
2649
+ * The folder where temporary files will be stored. This is always a subfolder called "temp"
2628
2650
  * under the common folder.
2629
- * Example: `C:\MyRepo\common\scripts`
2630
- */
2631
- get commonScriptsFolder(): string;
2632
- /**
2633
- * The fully resolved path for the "autoinstallers" folder.
2634
- * Example: `C:\MyRepo\common\autoinstallers`
2651
+ * Example: `C:\MyRepo\common\temp-split`
2635
2652
  */
2636
- get commonAutoinstallersFolder(): string;
2653
+ readonly commonTempSplitFolder: string;
2637
2654
  /**
2638
- * The folder where rush-plugin options json files are stored.
2639
- * Example: `C:\MyRepo\common\config\rush-plugins`
2655
+ * The folder where automation scripts are stored. This is always a subfolder called "scripts"
2656
+ * under the common folder.
2657
+ * Example: `C:\MyRepo\common\scripts`
2640
2658
  */
2641
- get rushPluginOptionsFolder(): string;
2659
+ readonly commonScriptsFolder: string;
2642
2660
  /**
2643
2661
  * The local folder that will store the NPM package cache. Rush does not rely on the
2644
2662
  * npm's default global cache folder, because npm's caching implementation does not
@@ -2647,7 +2665,7 @@ export declare class RushConfiguration {
2647
2665
  *
2648
2666
  * Example: `C:\MyRepo\common\temp\npm-cache`
2649
2667
  */
2650
- get npmCacheFolder(): string;
2668
+ readonly npmCacheFolder: string;
2651
2669
  /**
2652
2670
  * The local folder where npm's temporary files will be written during installation.
2653
2671
  * Rush does not rely on the global default folder, because it may be on a different
@@ -2655,31 +2673,20 @@ export declare class RushConfiguration {
2655
2673
  *
2656
2674
  * Example: `C:\MyRepo\common\temp\npm-tmp`
2657
2675
  */
2658
- get npmTmpFolder(): string;
2676
+ readonly npmTmpFolder: string;
2659
2677
  /**
2660
2678
  * The local folder that will store the Yarn package cache.
2661
2679
  *
2662
2680
  * Example: `C:\MyRepo\common\temp\yarn-cache`
2663
2681
  */
2664
- get yarnCacheFolder(): string;
2665
- /**
2666
- * The full path of the shrinkwrap file that is tracked by Git. (The "rush install"
2667
- * command uses a temporary copy, whose path is tempShrinkwrapFilename.)
2668
- * @remarks
2669
- * This property merely reports the filename; the file itself may not actually exist.
2670
- * Example: `C:\MyRepo\common\npm-shrinkwrap.json` or `C:\MyRepo\common\pnpm-lock.yaml`
2671
- *
2672
- * @deprecated Use `getCommittedShrinkwrapFilename` instead, which gets the correct common
2673
- * shrinkwrap file name for a given active variant.
2674
- */
2675
- get committedShrinkwrapFilename(): string;
2682
+ readonly yarnCacheFolder: string;
2676
2683
  /**
2677
2684
  * The filename (without any path) of the shrinkwrap file that is used by the package manager.
2678
2685
  * @remarks
2679
2686
  * This property merely reports the filename; the file itself may not actually exist.
2680
2687
  * Example: `npm-shrinkwrap.json` or `pnpm-lock.yaml`
2681
2688
  */
2682
- get shrinkwrapFilename(): string;
2689
+ readonly shrinkwrapFilename: string;
2683
2690
  /**
2684
2691
  * The full path of the temporary shrinkwrap file that is used during "rush install".
2685
2692
  * This file may get rewritten by the package manager during installation.
@@ -2687,7 +2694,7 @@ export declare class RushConfiguration {
2687
2694
  * This property merely reports the filename; the file itself may not actually exist.
2688
2695
  * Example: `C:\MyRepo\common\temp\npm-shrinkwrap.json` or `C:\MyRepo\common\temp\pnpm-lock.yaml`
2689
2696
  */
2690
- get tempShrinkwrapFilename(): string;
2697
+ readonly tempShrinkwrapFilename: string;
2691
2698
  /**
2692
2699
  * The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
2693
2700
  * before installation begins, and can be compared to determine how the package manager
@@ -2697,24 +2704,22 @@ export declare class RushConfiguration {
2697
2704
  * Example: `C:\MyRepo\common\temp\npm-shrinkwrap-preinstall.json`
2698
2705
  * or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
2699
2706
  */
2700
- get tempShrinkwrapPreinstallFilename(): string;
2707
+ readonly tempShrinkwrapPreinstallFilename: string;
2701
2708
  /**
2702
- * Returns an English phrase such as "shrinkwrap file" that can be used in logging messages
2703
- * to refer to the shrinkwrap file using appropriate terminology for the currently selected
2704
- * package manager.
2709
+ * The filename (without any path) of the shrinkwrap file for split workspace that is used by the package manager.
2710
+ * @remarks
2711
+ * This property merely reports the filename; the file itself may not actually exist.
2712
+ * Example: `pnpm-lock.yaml`
2705
2713
  */
2706
- get shrinkwrapFilePhrase(): string;
2714
+ readonly splitWorkspaceShrinkwrapFilename: string;
2707
2715
  /**
2708
- * The filename of the build dependency data file. By default this is
2709
- * called 'rush-link.json' resides in the Rush common folder.
2710
- * Its data structure is defined by IRushLinkJson.
2711
- *
2712
- * Example: `C:\MyRepo\common\temp\rush-link.json`
2713
- *
2714
- * @deprecated The "rush-link.json" file was removed in Rush 5.30.0.
2715
- * Use `RushConfigurationProject.localDependencyProjects` instead.
2716
+ * The full path of the temporary shrinkwrap file for split workspace that is used during
2717
+ * "rush install". This file may get rewritten by the package manager during installation.
2718
+ * @remarks
2719
+ * This property merely reports the filename; the file itself may not actually exist.
2720
+ * Example: `C:\MyRepo\common\temp-split\pnpm-lock.yaml`
2716
2721
  */
2717
- get rushLinkJsonFilename(): string;
2722
+ readonly tempSplitWorkspaceShrinkwrapFilename: string;
2718
2723
  /**
2719
2724
  * The filename of the variant dependency data file. By default this is
2720
2725
  * called 'current-variant.json' resides in the Rush common folder.
@@ -2722,31 +2727,31 @@ export declare class RushConfiguration {
2722
2727
  *
2723
2728
  * Example: `C:\MyRepo\common\temp\current-variant.json`
2724
2729
  */
2725
- get currentVariantJsonFilename(): string;
2730
+ readonly currentVariantJsonFilename: string;
2726
2731
  /**
2727
2732
  * The version of the locally installed NPM tool. (Example: "1.2.3")
2728
2733
  */
2729
- get packageManagerToolVersion(): string;
2734
+ readonly packageManagerToolVersion: string;
2730
2735
  /**
2731
2736
  * The absolute path to the locally installed NPM tool. If "rush install" has not
2732
2737
  * been run, then this file may not exist yet.
2733
2738
  * Example: `C:\MyRepo\common\temp\npm-local\node_modules\.bin\npm`
2734
2739
  */
2735
- get packageManagerToolFilename(): string;
2740
+ readonly packageManagerToolFilename: string;
2736
2741
  /**
2737
2742
  * The minimum allowable folder depth for the projectFolder field in the rush.json file.
2738
2743
  * This setting provides a way for repository maintainers to discourage nesting of project folders
2739
2744
  * that makes the directory tree more difficult to navigate. The default value is 2,
2740
2745
  * which implements a standard 2-level hierarchy of `<categoryFolder>/<projectFolder>/package.json`.
2741
2746
  */
2742
- get projectFolderMinDepth(): number;
2747
+ readonly projectFolderMinDepth: number;
2743
2748
  /**
2744
2749
  * The maximum allowable folder depth for the projectFolder field in the rush.json file.
2745
2750
  * This setting provides a way for repository maintainers to discourage nesting of project folders
2746
2751
  * that makes the directory tree more difficult to navigate. The default value is 2,
2747
2752
  * which implements on a standard convention of `<categoryFolder>/<projectFolder>/package.json`.
2748
2753
  */
2749
- get projectFolderMaxDepth(): number;
2754
+ readonly projectFolderMaxDepth: number;
2750
2755
  /**
2751
2756
  * Today the npmjs.com registry enforces fairly strict naming rules for packages, but in the early
2752
2757
  * days there was no standard and hardly any enforcement. A few large legacy projects are still using
@@ -2758,11 +2763,11 @@ export declare class RushConfiguration {
2758
2763
  *
2759
2764
  * The default value is false.
2760
2765
  */
2761
- get allowMostlyStandardPackageNames(): boolean;
2766
+ readonly allowMostlyStandardPackageNames: boolean;
2762
2767
  /**
2763
2768
  * The "approvedPackagesPolicy" settings.
2764
2769
  */
2765
- get approvedPackagesPolicy(): ApprovedPackagesPolicy;
2770
+ readonly approvedPackagesPolicy: ApprovedPackagesPolicy;
2766
2771
  /**
2767
2772
  * [Part of the "gitPolicy" feature.]
2768
2773
  * A list of regular expressions describing allowable email patterns for Git commits.
@@ -2770,59 +2775,55 @@ export declare class RushConfiguration {
2770
2775
  * Example: `".*@example\.com"`
2771
2776
  * This array will never be undefined.
2772
2777
  */
2773
- get gitAllowedEmailRegExps(): string[];
2778
+ readonly gitAllowedEmailRegExps: string[];
2774
2779
  /**
2775
2780
  * [Part of the "gitPolicy" feature.]
2776
2781
  * An example valid email address that conforms to one of the allowedEmailRegExps.
2777
2782
  * Example: `"foxtrot@example\.com"`
2778
2783
  * This will never be undefined, and will always be nonempty if gitAllowedEmailRegExps is used.
2779
2784
  */
2780
- get gitSampleEmail(): string;
2785
+ readonly gitSampleEmail: string;
2781
2786
  /**
2782
2787
  * [Part of the "gitPolicy" feature.]
2783
2788
  * The commit message to use when committing changes during 'rush publish'
2784
2789
  */
2785
- get gitVersionBumpCommitMessage(): string | undefined;
2790
+ readonly gitVersionBumpCommitMessage: string | undefined;
2786
2791
  /**
2787
2792
  * [Part of the "gitPolicy" feature.]
2788
2793
  * The commit message to use when committing change log files 'rush version'
2789
2794
  */
2790
- get gitChangeLogUpdateCommitMessage(): string | undefined;
2795
+ readonly gitChangeLogUpdateCommitMessage: string | undefined;
2791
2796
  /**
2792
2797
  * [Part of the "gitPolicy" feature.]
2793
2798
  * The commit message to use when committing change log files 'rush version'
2794
2799
  */
2795
- get gitChangefilesCommitMessage(): string | undefined;
2800
+ readonly gitChangefilesCommitMessage: string | undefined;
2796
2801
  /**
2797
2802
  * [Part of the "gitPolicy" feature.]
2798
2803
  * The separator between package name and version in git tag.
2799
2804
  */
2800
- get gitTagSeparator(): string | undefined;
2805
+ readonly gitTagSeparator: string | undefined;
2801
2806
  /**
2802
2807
  * [Part of the "hotfixChange" feature.]
2803
2808
  * Enables creating hotfix changes
2804
2809
  */
2805
- get hotfixChangeEnabled(): boolean;
2810
+ readonly hotfixChangeEnabled: boolean;
2806
2811
  /**
2807
2812
  * Remote URL(s) of the repository. If a value is provided, \"rush change\" will
2808
2813
  * use one of these to find the right remote to compare against. Specifying multiple URLs
2809
2814
  * is useful if a GitHub repository is renamed or for `<projectName>.visualstudio.com` versus
2810
2815
  * `dev.azure.com/<projectName>` URLs.
2811
2816
  */
2812
- get repositoryUrls(): string[];
2817
+ readonly repositoryUrls: string[];
2813
2818
  /**
2814
2819
  * The default branch name. This tells "rush change" which remote branch to compare against.
2815
2820
  */
2816
- get repositoryDefaultBranch(): string;
2821
+ readonly repositoryDefaultBranch: string;
2817
2822
  /**
2818
2823
  * The default remote. This tells "rush change" which remote to compare against if the remote URL is not set
2819
2824
  * or if a remote matching the provided remote URL is not found.
2820
2825
  */
2821
- get repositoryDefaultRemote(): string;
2822
- /**
2823
- * The default fully-qualified git remote branch of the repository. This helps "rush change" find the right branch to compare against.
2824
- */
2825
- get repositoryDefaultFullyQualifiedRemoteBranch(): string;
2826
+ readonly repositoryDefaultRemote: string;
2826
2827
  /**
2827
2828
  * Odd-numbered major versions of Node.js are experimental. Even-numbered releases
2828
2829
  * spend six months in a stabilization period before the first Long Term Support (LTS) version.
@@ -2834,43 +2835,151 @@ export declare class RushConfiguration {
2834
2835
  * pre-LTS versions in preparation for supporting the first LTS version, you can use this setting
2835
2836
  * to disable Rush's warning.
2836
2837
  */
2837
- get suppressNodeLtsWarning(): boolean;
2838
+ readonly suppressNodeLtsWarning: boolean;
2838
2839
  /**
2839
2840
  * If true, then consistent version specifiers for dependencies will be enforced.
2840
2841
  * I.e. "rush check" is run before some commands.
2841
2842
  */
2842
- get ensureConsistentVersions(): boolean;
2843
+ readonly ensureConsistentVersions: boolean;
2843
2844
  /**
2844
2845
  * Indicates whether telemetry collection is enabled for Rush runs.
2845
2846
  * @beta
2846
2847
  */
2847
- get telemetryEnabled(): boolean;
2848
- get projects(): RushConfigurationProject[];
2849
- get projectsByName(): Map<string, RushConfigurationProject>;
2850
- /**
2851
- * Obtains the mapping from custom tags to projects.
2852
- * @beta
2853
- */
2854
- get projectsByTag(): ReadonlyMap<string, ReadonlySet<RushConfigurationProject>>;
2848
+ readonly telemetryEnabled: boolean;
2855
2849
  /**
2856
2850
  * {@inheritDoc NpmOptionsConfiguration}
2857
2851
  */
2858
- get npmOptions(): NpmOptionsConfiguration;
2852
+ readonly npmOptions: NpmOptionsConfiguration;
2859
2853
  /**
2860
2854
  * {@inheritDoc PnpmOptionsConfiguration}
2861
2855
  */
2862
- get pnpmOptions(): PnpmOptionsConfiguration;
2856
+ readonly pnpmOptions: PnpmOptionsConfiguration;
2863
2857
  /**
2864
2858
  * {@inheritDoc YarnOptionsConfiguration}
2865
2859
  */
2866
- get yarnOptions(): YarnOptionsConfiguration;
2860
+ readonly yarnOptions: YarnOptionsConfiguration;
2867
2861
  /**
2868
2862
  * The configuration options used by the current package manager.
2869
2863
  * @remarks
2870
2864
  * For package manager specific variants, reference {@link RushConfiguration.npmOptions | npmOptions},
2871
2865
  * {@link RushConfiguration.pnpmOptions | pnpmOptions}, or {@link RushConfiguration.yarnOptions | yarnOptions}.
2872
2866
  */
2873
- get packageManagerOptions(): PackageManagerOptionsConfigurationBase;
2867
+ readonly packageManagerOptions: PackageManagerOptionsConfigurationBase;
2868
+ /**
2869
+ * The rush hooks. It allows customized scripts to run at the specified point.
2870
+ * @beta
2871
+ */
2872
+ readonly eventHooks: EventHooks;
2873
+ /**
2874
+ * The rush hooks. It allows customized scripts to run at the specified point.
2875
+ */
2876
+ readonly packageNameParser: PackageNameParser;
2877
+ /**
2878
+ * @beta
2879
+ */
2880
+ readonly versionPolicyConfiguration: VersionPolicyConfiguration;
2881
+ /**
2882
+ * @beta
2883
+ */
2884
+ readonly versionPolicyConfigurationFilePath: string;
2885
+ /**
2886
+ * This configuration object contains settings repo maintainers have specified to enable
2887
+ * and disable experimental Rush features.
2888
+ *
2889
+ * @beta
2890
+ */
2891
+ readonly experimentsConfiguration: ExperimentsConfiguration;
2892
+ /**
2893
+ * @internal
2894
+ */
2895
+ readonly _rushPluginsConfiguration: RushPluginsConfiguration;
2896
+ /**
2897
+ * Use RushConfiguration.loadFromConfigurationFile() or Use RushConfiguration.loadFromDefaultLocation()
2898
+ * instead.
2899
+ */
2900
+ private constructor();
2901
+ private _initializeAndValidateLocalProjects;
2902
+ /**
2903
+ * Loads the configuration data from an Rush.json configuration file and returns
2904
+ * an RushConfiguration object.
2905
+ */
2906
+ static loadFromConfigurationFile(rushJsonFilename: string): RushConfiguration;
2907
+ static loadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration;
2908
+ /**
2909
+ * Find the rush.json location and return the path, or undefined if a rush.json can't be found.
2910
+ *
2911
+ * @privateRemarks
2912
+ * Keep this in sync with `findRushJsonLocation` in `rush-sdk/src/index.ts`.
2913
+ */
2914
+ static tryFindRushJsonLocation(options?: ITryFindRushJsonLocationOptions): string | undefined;
2915
+ /**
2916
+ * This generates the unique names that are used to create temporary projects
2917
+ * in the Rush common folder.
2918
+ * NOTE: sortedProjectJsons is sorted by the caller.
2919
+ */
2920
+ private static _generateTempNameForProject;
2921
+ /**
2922
+ * If someone adds a config file in the "common/rush/config" folder, it would be a bad
2923
+ * experience for Rush to silently ignore their file simply because they misspelled the
2924
+ * filename, or maybe it's an old format that's no longer supported. The
2925
+ * _validateCommonRushConfigFolder() function makes sure that this folder only contains
2926
+ * recognized config files.
2927
+ */
2928
+ private static _validateCommonRushConfigFolder;
2929
+ /**
2930
+ * The fully resolved path for the "autoinstallers" folder.
2931
+ * Example: `C:\MyRepo\common\autoinstallers`
2932
+ */
2933
+ get commonAutoinstallersFolder(): string;
2934
+ /**
2935
+ * The folder where rush-plugin options json files are stored.
2936
+ * Example: `C:\MyRepo\common\config\rush-plugins`
2937
+ */
2938
+ get rushPluginOptionsFolder(): string;
2939
+ /**
2940
+ * The full path of the shrinkwrap file that is tracked by Git. (The "rush install"
2941
+ * command uses a temporary copy, whose path is tempShrinkwrapFilename.)
2942
+ * @remarks
2943
+ * This property merely reports the filename; the file itself may not actually exist.
2944
+ * Example: `C:\MyRepo\common\npm-shrinkwrap.json` or `C:\MyRepo\common\pnpm-lock.yaml`
2945
+ *
2946
+ * @deprecated Use `getCommittedShrinkwrapFilename` instead, which gets the correct common
2947
+ * shrinkwrap file name for a given active variant.
2948
+ */
2949
+ get committedShrinkwrapFilename(): string;
2950
+ /**
2951
+ * Returns an English phrase such as "shrinkwrap file" that can be used in logging messages
2952
+ * to refer to the shrinkwrap file using appropriate terminology for the currently selected
2953
+ * package manager.
2954
+ */
2955
+ get shrinkwrapFilePhrase(): string;
2956
+ /**
2957
+ * The filename of the build dependency data file. By default this is
2958
+ * called 'rush-link.json' resides in the Rush common folder.
2959
+ * Its data structure is defined by IRushLinkJson.
2960
+ *
2961
+ * Example: `C:\MyRepo\common\temp\rush-link.json`
2962
+ *
2963
+ * @deprecated The "rush-link.json" file was removed in Rush 5.30.0.
2964
+ * Use `RushConfigurationProject.localDependencyProjects` instead.
2965
+ */
2966
+ get rushLinkJsonFilename(): string;
2967
+ /**
2968
+ * The default fully-qualified git remote branch of the repository. This helps "rush change" find the right branch to compare against.
2969
+ */
2970
+ get repositoryDefaultFullyQualifiedRemoteBranch(): string;
2971
+ get projects(): RushConfigurationProject[];
2972
+ get projectsByName(): Map<string, RushConfigurationProject>;
2973
+ /**
2974
+ * Obtains the mapping from custom tags to projects.
2975
+ * @beta
2976
+ */
2977
+ get projectsByTag(): ReadonlyMap<string, ReadonlySet<RushConfigurationProject>>;
2978
+ /**
2979
+ * Search for projects according to filter
2980
+ * @beta
2981
+ */
2982
+ getFilteredProjects(filter: IRushConfigurationProjectsFilter): RushConfigurationProject[];
2874
2983
  /**
2875
2984
  * Settings from the common-versions.json config file.
2876
2985
  * @remarks
@@ -2890,14 +2999,9 @@ export declare class RushConfiguration {
2890
2999
  */
2891
3000
  get currentInstalledVariant(): string | undefined;
2892
3001
  /**
2893
- * The rush hooks. It allows customized scripts to run at the specified point.
2894
- * @beta
3002
+ * Is there any split workspace project.
2895
3003
  */
2896
- get eventHooks(): EventHooks;
2897
- /**
2898
- * The rush hooks. It allows customized scripts to run at the specified point.
2899
- */
2900
- get packageNameParser(): PackageNameParser;
3004
+ get hasSplitWorkspaceProject(): boolean;
2901
3005
  /**
2902
3006
  * Gets the path to the common-versions.json config file for a specific variant.
2903
3007
  * @param variant - The name of the current variant in use by the active command.
@@ -2930,6 +3034,11 @@ export declare class RushConfiguration {
2930
3034
  * @param variant - The name of the current variant in use by the active command.
2931
3035
  */
2932
3036
  getCommittedShrinkwrapFilename(variant?: string | undefined): string;
3037
+ /**
3038
+ * Gets the committed shrinkwrap file name for split workspace.
3039
+ * @param variant - The name of the current variant in use by the active command.
3040
+ */
3041
+ getCommittedSplitWorkspaceShrinkwrapFilename(): string;
2933
3042
  /**
2934
3043
  * Gets the absolute path for "pnpmfile.js" for a specific variant.
2935
3044
  * @param variant - The name of the current variant in use by the active command.
@@ -2959,31 +3068,18 @@ export declare class RushConfiguration {
2959
3068
  * @beta
2960
3069
  */
2961
3070
  getProjectLookupForRoot(rootPath: string): LookupByPath<RushConfigurationProject>;
2962
- /**
2963
- * @beta
2964
- */
2965
- get versionPolicyConfiguration(): VersionPolicyConfiguration;
2966
- /**
2967
- * @beta
2968
- */
2969
- get versionPolicyConfigurationFilePath(): string;
2970
- /**
2971
- * This configuration object contains settings repo maintainers have specified to enable
2972
- * and disable experimental Rush features.
2973
- *
2974
- * @beta
2975
- */
2976
- get experimentsConfiguration(): ExperimentsConfiguration;
2977
- /**
2978
- * @internal
2979
- */
2980
- get _rushPluginsConfiguration(): RushPluginsConfiguration;
2981
3071
  /**
2982
3072
  * Returns the project for which the specified path is underneath that project's folder.
2983
3073
  * If the path is not under any project's folder, returns undefined.
2984
3074
  */
2985
3075
  tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
2986
3076
  private _getVariantConfigFolderPath;
3077
+ /**
3078
+ * Split workspace can only works on PNPM with "useWorkspaces" enabled.
3079
+ * The workspace project can NOT depend on a split workspace project.
3080
+ * The split workspace project CAN depend on a workspace project.
3081
+ */
3082
+ private _validateSplitWorkspaceRelationships;
2987
3083
  }
2988
3084
 
2989
3085
  /**
@@ -2992,68 +3088,50 @@ export declare class RushConfiguration {
2992
3088
  * @public
2993
3089
  */
2994
3090
  export declare class RushConfigurationProject {
2995
- private readonly _packageName;
2996
- private readonly _projectFolder;
2997
- private readonly _projectRelativeFolder;
2998
- private readonly _projectRushConfigFolder;
2999
- private readonly _projectRushTempFolder;
3000
- private readonly _reviewCategory;
3001
- private readonly _packageJson;
3002
- private readonly _packageJsonEditor;
3003
- private readonly _tempProjectName;
3004
- private readonly _unscopedTempProjectName;
3005
- private readonly _decoupledLocalDependencies;
3006
- private readonly _versionPolicyName;
3007
3091
  private readonly _shouldPublish;
3008
- private readonly _skipRushCheck;
3009
- private readonly _publishFolder;
3010
- private readonly _rushConfiguration;
3011
- private readonly _tags;
3012
3092
  private _versionPolicy;
3013
3093
  private _dependencyProjects;
3014
3094
  private _consumingProjects;
3015
- /** @internal */
3016
- constructor(options: IRushConfigurationProjectOptions);
3017
3095
  /**
3018
3096
  * The name of the NPM package. An error is reported if this name is not
3019
3097
  * identical to packageJson.name.
3020
3098
  *
3021
3099
  * Example: `@scope/MyProject`
3022
3100
  */
3023
- get packageName(): string;
3101
+ readonly packageName: string;
3024
3102
  /**
3025
3103
  * The full path of the folder that contains the project to be built by Rush.
3026
3104
  *
3027
3105
  * Example: `C:\MyRepo\libraries\my-project`
3028
3106
  */
3029
- get projectFolder(): string;
3107
+ readonly projectFolder: string;
3030
3108
  /**
3031
3109
  * The relative path of the folder that contains the project to be built by Rush.
3032
3110
  *
3033
3111
  * Example: `libraries/my-project`
3034
3112
  */
3035
- get projectRelativeFolder(): string;
3113
+ readonly projectRelativeFolder: string;
3036
3114
  /**
3037
3115
  * The project-specific Rush configuration folder.
3038
3116
  *
3039
3117
  * Example: `C:\MyRepo\libraries\my-project\config\rush`
3040
3118
  */
3041
- get projectRushConfigFolder(): string;
3119
+ readonly projectRushConfigFolder: string;
3042
3120
  /**
3043
3121
  * The project-specific Rush temp folder. This folder is used to store Rush-specific temporary files.
3044
3122
  *
3045
3123
  * Example: `C:\MyRepo\libraries\my-project\.rush\temp`
3046
3124
  */
3047
- get projectRushTempFolder(): string;
3125
+ readonly projectRushTempFolder: string;
3048
3126
  /**
3049
3127
  * The Rush configuration for the monorepo that the project belongs to.
3050
3128
  */
3051
- get rushConfiguration(): RushConfiguration;
3129
+ readonly rushConfiguration: RushConfiguration;
3052
3130
  /**
3053
3131
  * The review category name, or undefined if no category was assigned.
3054
3132
  * This name must be one of the valid choices listed in RushConfiguration.reviewCategories.
3055
3133
  */
3056
- get reviewCategory(): string | undefined;
3134
+ readonly reviewCategory: string | undefined;
3057
3135
  /**
3058
3136
  * A list of local projects that appear as devDependencies for this project, but cannot be
3059
3137
  * locally linked because it would create a cyclic dependency; instead, the last published
@@ -3061,7 +3139,68 @@ export declare class RushConfigurationProject {
3061
3139
  *
3062
3140
  * These are package names that would be found by RushConfiguration.getProjectByName().
3063
3141
  */
3064
- get decoupledLocalDependencies(): Set<string>;
3142
+ readonly decoupledLocalDependencies: Set<string>;
3143
+ /**
3144
+ * The parsed NPM "package.json" file from projectFolder.
3145
+ */
3146
+ readonly packageJson: IPackageJson;
3147
+ /**
3148
+ * A useful wrapper around the package.json file for making modifications
3149
+ * @beta
3150
+ */
3151
+ readonly packageJsonEditor: PackageJsonEditor;
3152
+ /**
3153
+ * The unique name for the temporary project that will be generated in the Common folder.
3154
+ * For example, if the project name is `@scope/MyProject`, the temporary project name
3155
+ * might be `@rush-temp/MyProject-2`.
3156
+ *
3157
+ * Example: `@rush-temp/MyProject-2`
3158
+ */
3159
+ readonly tempProjectName: string;
3160
+ /**
3161
+ * The unscoped temporary project name
3162
+ *
3163
+ * Example: `my-project-2`
3164
+ */
3165
+ readonly unscopedTempProjectName: string;
3166
+ /**
3167
+ * If true, then this project will be ignored by the "rush check" command.
3168
+ * The default value is false.
3169
+ */
3170
+ readonly skipRushCheck: boolean;
3171
+ /**
3172
+ * Name of the version policy used by this project.
3173
+ * @beta
3174
+ */
3175
+ readonly versionPolicyName: string | undefined;
3176
+ /**
3177
+ * The full path of the folder that will get published by Rush.
3178
+ *
3179
+ * @remarks
3180
+ * By default this is the same as the project folder, but a custom folder can be specified
3181
+ * using the the "publishFolder" setting in rush.json.
3182
+ *
3183
+ * Example: `C:\MyRepo\libraries\my-project\temp\publish`
3184
+ */
3185
+ readonly publishFolder: string;
3186
+ /**
3187
+ * An optional set of custom tags that can be used to select this project.
3188
+ *
3189
+ * @remarks
3190
+ * For example, adding `my-custom-tag` will allow this project to be selected by the
3191
+ * command `rush list --only tag:my-custom-tag`. The tag name must be one or more words separated
3192
+ * by hyphens, where a word may contain lowercase letters, digits, and the period character.
3193
+ *
3194
+ * @beta
3195
+ */
3196
+ readonly tags: ReadonlySet<string>;
3197
+ /**
3198
+ * Whether this project is a split workspace project.
3199
+ * @beta
3200
+ */
3201
+ readonly splitWorkspace: boolean;
3202
+ /** @internal */
3203
+ constructor(options: IRushConfigurationProjectOptions);
3065
3204
  /**
3066
3205
  * A list of local projects that appear as devDependencies for this project, but cannot be
3067
3206
  * locally linked because it would create a cyclic dependency; instead, the last published
@@ -3101,55 +3240,12 @@ export declare class RushConfigurationProject {
3101
3240
  * graph to find all projects which will be impacted by changes to this project.
3102
3241
  */
3103
3242
  get consumingProjects(): ReadonlySet<RushConfigurationProject>;
3104
- /**
3105
- * The parsed NPM "package.json" file from projectFolder.
3106
- */
3107
- get packageJson(): IPackageJson;
3108
- /**
3109
- * A useful wrapper around the package.json file for making modifications
3110
- * @beta
3111
- */
3112
- get packageJsonEditor(): PackageJsonEditor;
3113
- /**
3114
- * The unique name for the temporary project that will be generated in the Common folder.
3115
- * For example, if the project name is `@scope/MyProject`, the temporary project name
3116
- * might be `@rush-temp/MyProject-2`.
3117
- *
3118
- * Example: `@rush-temp/MyProject-2`
3119
- */
3120
- get tempProjectName(): string;
3121
- /**
3122
- * The unscoped temporary project name
3123
- *
3124
- * Example: `my-project-2`
3125
- */
3126
- get unscopedTempProjectName(): string;
3127
3243
  /**
3128
3244
  * A flag which indicates whether changes to this project should be published. This controls
3129
3245
  * whether or not the project would show up when running `rush change`, and whether or not it
3130
3246
  * should be published during `rush publish`.
3131
3247
  */
3132
3248
  get shouldPublish(): boolean;
3133
- /**
3134
- * If true, then this project will be ignored by the "rush check" command.
3135
- * The default value is false.
3136
- */
3137
- get skipRushCheck(): boolean;
3138
- /**
3139
- * Name of the version policy used by this project.
3140
- * @beta
3141
- */
3142
- get versionPolicyName(): string | undefined;
3143
- /**
3144
- * The full path of the folder that will get published by Rush.
3145
- *
3146
- * @remarks
3147
- * By default this is the same as the project folder, but a custom folder can be specified
3148
- * using the the "publishFolder" setting in rush.json.
3149
- *
3150
- * Example: `C:\MyRepo\libraries\my-project\temp\publish`
3151
- */
3152
- get publishFolder(): string;
3153
3249
  /**
3154
3250
  * Version policy of the project
3155
3251
  * @beta
@@ -3165,17 +3261,6 @@ export declare class RushConfigurationProject {
3165
3261
  * @beta
3166
3262
  */
3167
3263
  get isMainProject(): boolean;
3168
- /**
3169
- * An optional set of custom tags that can be used to select this project.
3170
- *
3171
- * @remarks
3172
- * For example, adding `my-custom-tag` will allow this project to be selected by the
3173
- * command `rush list --only tag:my-custom-tag`. The tag name must be one or more words separated
3174
- * by hyphens, where a word may contain lowercase letters, digits, and the period character.
3175
- *
3176
- * @beta
3177
- */
3178
- get tags(): ReadonlySet<string>;
3179
3264
  }
3180
3265
 
3181
3266
  /**
@@ -3223,6 +3308,12 @@ export declare class RushConstants {
3223
3308
  * Example: `C:\MyRepo\common\temp`
3224
3309
  */
3225
3310
  static readonly rushTempFolderName: string;
3311
+ /**
3312
+ * The folder name ("temp-split") under the common folder, or under the .rush folder in each project's directory where
3313
+ * temporary files will be stored.
3314
+ * Example: `C:\MyRepo\common\temp-split`
3315
+ */
3316
+ static readonly rushTempSplitFolderName: string;
3226
3317
  /**
3227
3318
  * The folder name ("projects") where temporary projects will be stored.
3228
3319
  * Example: `C:\MyRepo\common\temp\projects`
@@ -3255,6 +3346,12 @@ export declare class RushConstants {
3255
3346
  * The filename (".pnpmfile.cjs") used to add custom configuration to PNPM (PNPM version 6.x and later).
3256
3347
  */
3257
3348
  static readonly pnpmfileV6Filename: string;
3349
+ /**
3350
+ * The folder name used to store patch files for pnpm
3351
+ * Example: `C:\MyRepo\common\config\pnpm-patches`
3352
+ * Example: `C:\MyRepo\common\temp\patches`
3353
+ */
3354
+ static readonly pnpmPatchesFolderName: string;
3258
3355
  /**
3259
3356
  * The filename ("shrinkwrap.yaml") used to store state for pnpm
3260
3357
  */
@@ -3383,6 +3480,12 @@ export declare class RushConstants {
3383
3480
  * The expected prefix for phase names in "common/config/rush/command-line.json"
3384
3481
  */
3385
3482
  static readonly phaseNamePrefix: '_phase:';
3483
+ /**
3484
+ * The default debounce value for Rush multi-project watch mode. When watching, controls
3485
+ * how long to wait after the last encountered file system event before execution. If another
3486
+ * file system event occurs in this interval, the timeout will reset.
3487
+ */
3488
+ static readonly defaultWatchDebounceMs: number;
3386
3489
  }
3387
3490
 
3388
3491
  /**
@@ -3391,8 +3494,6 @@ export declare class RushConstants {
3391
3494
  * @internal
3392
3495
  */
3393
3496
  export declare class _RushGlobalFolder {
3394
- private _rushGlobalFolder;
3395
- private _rushNodeSpecificUserFolder;
3396
3497
  /**
3397
3498
  * The global folder where Rush stores temporary files.
3398
3499
  *
@@ -3410,12 +3511,12 @@ export declare class _RushGlobalFolder {
3410
3511
  *
3411
3512
  * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.
3412
3513
  */
3413
- get path(): string;
3514
+ readonly path: string;
3414
3515
  /**
3415
3516
  * The absolute path to Rush's storage in the home directory for the current user and node version.
3416
3517
  * On Windows, it would be something like `C:\Users\YourName\.rush\node-v3.4.5`.
3417
3518
  */
3418
- get nodeSpecificPath(): string;
3519
+ readonly nodeSpecificPath: string;
3419
3520
  constructor();
3420
3521
  }
3421
3522
 
@@ -3457,10 +3558,9 @@ export declare class RushLifecycleHooks {
3457
3558
 
3458
3559
  declare class RushPluginsConfiguration {
3459
3560
  private static _jsonSchema;
3460
- private _rushPluginsConfigurationJson;
3461
3561
  private _jsonFilename;
3562
+ readonly configuration: Readonly<IRushPluginsConfigurationJson>;
3462
3563
  constructor(jsonFilename: string);
3463
- get configuration(): Readonly<IRushPluginsConfigurationJson>;
3464
3564
  }
3465
3565
 
3466
3566
  /**
@@ -3508,12 +3608,24 @@ declare enum VersionFormatForPublish {
3508
3608
  * @public
3509
3609
  */
3510
3610
  export declare abstract class VersionPolicy {
3511
- private _policyName;
3512
- private _definitionName;
3513
- private _exemptFromRushChange;
3514
- private _includeEmailInChangeFile;
3515
3611
  private _versionFormatForCommit;
3516
3612
  private _versionFormatForPublish;
3613
+ /**
3614
+ * Version policy name
3615
+ */
3616
+ readonly policyName: string;
3617
+ /**
3618
+ * Version policy definition name
3619
+ */
3620
+ readonly definitionName: VersionPolicyDefinitionName;
3621
+ /**
3622
+ * Determines if a version policy wants to opt out of changelog files.
3623
+ */
3624
+ readonly exemptFromRushChange: boolean;
3625
+ /**
3626
+ * Determines if a version policy wants to opt in to including email.
3627
+ */
3628
+ readonly includeEmailInChangeFile: boolean;
3517
3629
  /**
3518
3630
  * @internal
3519
3631
  */
@@ -3526,26 +3638,10 @@ export declare abstract class VersionPolicy {
3526
3638
  * @internal
3527
3639
  */
3528
3640
  static load(versionPolicyJson: IVersionPolicyJson): VersionPolicy | undefined;
3529
- /**
3530
- * Version policy name
3531
- */
3532
- get policyName(): string;
3533
- /**
3534
- * Version policy definition name
3535
- */
3536
- get definitionName(): VersionPolicyDefinitionName;
3537
3641
  /**
3538
3642
  * Whether it is a lockstepped version policy
3539
3643
  */
3540
3644
  get isLockstepped(): boolean;
3541
- /**
3542
- * Determines if a version policy wants to opt out of changelog files.
3543
- */
3544
- get exemptFromRushChange(): boolean;
3545
- /**
3546
- * Determines if a version policy wants to opt in to including email.
3547
- */
3548
- get includeEmailInChangeFile(): boolean;
3549
3645
  /**
3550
3646
  * Returns an updated package json that satisfies the policy.
3551
3647
  *
@@ -3593,8 +3689,11 @@ export declare abstract class VersionPolicy {
3593
3689
  */
3594
3690
  export declare class VersionPolicyConfiguration {
3595
3691
  private static _jsonSchema;
3596
- private _versionPolicies;
3597
3692
  private _jsonFileName;
3693
+ /**
3694
+ * Gets all the version policies
3695
+ */
3696
+ readonly versionPolicies: Map<string, VersionPolicy>;
3598
3697
  /**
3599
3698
  * @internal
3600
3699
  */
@@ -3609,10 +3708,6 @@ export declare class VersionPolicyConfiguration {
3609
3708
  * @param policyName - Name of the version policy
3610
3709
  */
3611
3710
  getVersionPolicy(policyName: string): VersionPolicy;
3612
- /**
3613
- * Gets all the version policies
3614
- */
3615
- get versionPolicies(): Map<string, VersionPolicy>;
3616
3711
  /**
3617
3712
  * Bumps up versions for the specified version policy or all version policies
3618
3713
  *