@rushstack/rush-sdk 5.134.0 → 5.135.0-pr4927.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.
- package/dist/rush-lib.d.ts +151 -31
- package/lib/api/CobuildConfiguration.d.ts +5 -0
- package/lib/api/CommonVersionsConfiguration.d.ts +1 -1
- package/lib/api/EnvironmentConfiguration.d.ts +7 -0
- package/lib/api/ExperimentsConfiguration.d.ts +6 -0
- package/lib/api/RushConfiguration.d.ts +49 -13
- package/lib/api/RushProjectConfiguration.d.ts +7 -9
- package/lib/api/Subspace.d.ts +30 -7
- package/lib/api/Variants.d.ts +8 -0
- package/lib/api/Variants.js +1 -0
- package/lib/cli/actions/AddAction.d.ts +2 -1
- package/lib/cli/actions/BaseAddAndRemoveAction.d.ts +1 -1
- package/lib/cli/actions/BaseInstallAction.d.ts +2 -1
- package/lib/cli/actions/CheckAction.d.ts +1 -0
- package/lib/cli/actions/RemoveAction.d.ts +3 -3
- package/lib/cli/actions/UpgradeInteractiveAction.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/logic/DependencyAnalyzer.d.ts +2 -2
- package/lib/logic/PackageJsonUpdaterTypes.d.ts +4 -0
- package/lib/logic/RepoStateFile.d.ts +1 -1
- package/lib/logic/RushConstants.d.ts +6 -0
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +4 -0
- package/lib/logic/base/BaseShrinkwrapFile.d.ts +2 -1
- package/lib/logic/npm/NpmShrinkwrapFile.d.ts +1 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +3 -4
- package/lib/logic/operations/IOperationExecutionResult.d.ts +5 -0
- package/lib/logic/operations/OperationExecutionRecord.d.ts +2 -0
- package/lib/logic/operations/ProjectLogWritable.d.ts +103 -49
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +1 -1
- package/lib/logic/pnpm/PnpmfileConfiguration.d.ts +2 -2
- package/lib/logic/pnpm/SubspacePnpmfileConfiguration.d.ts +2 -2
- package/lib/logic/policy/PolicyValidator.d.ts +1 -1
- package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +1 -1
- package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +2 -2
- package/lib/pluginFramework/RushLifeCycle.d.ts +2 -2
- package/lib/utilities/Utilities.d.ts +1 -1
- package/lib-shim/index.js +35 -10
- package/lib-shim/index.js.map +1 -1
- package/package.json +3 -3
package/dist/rush-lib.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { IPackageJson } from '@rushstack/node-core-library';
|
|
|
17
17
|
import { IPrefixMatch } from '@rushstack/lookup-by-path';
|
|
18
18
|
import { ITerminal } from '@rushstack/terminal';
|
|
19
19
|
import { ITerminalProvider } from '@rushstack/terminal';
|
|
20
|
+
import { JsonNull } from '@rushstack/node-core-library';
|
|
20
21
|
import { JsonObject } from '@rushstack/node-core-library';
|
|
21
22
|
import { LookupByPath } from '@rushstack/lookup-by-path';
|
|
22
23
|
import { PackageNameParser } from '@rushstack/node-core-library';
|
|
@@ -256,6 +257,11 @@ export declare class CobuildConfiguration {
|
|
|
256
257
|
* to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
257
258
|
*/
|
|
258
259
|
readonly cobuildLeafProjectLogOnlyAllowed: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* If true, operations can opt into leveraging cobuilds without restoring from the build cache.
|
|
262
|
+
* Operations will need to us the allowCobuildWithoutCache flag to opt into this behavior per phase.
|
|
263
|
+
*/
|
|
264
|
+
readonly cobuildWithoutCacheAllowed: boolean;
|
|
259
265
|
private _cobuildLockProvider;
|
|
260
266
|
private readonly _cobuildLockProviderFactory;
|
|
261
267
|
private readonly _cobuildJson;
|
|
@@ -338,7 +344,7 @@ export declare class CommonVersionsConfiguration {
|
|
|
338
344
|
* Loads the common-versions.json data from the specified file path.
|
|
339
345
|
* If the file has not been created yet, then an empty object is returned.
|
|
340
346
|
*/
|
|
341
|
-
static loadFromFile(
|
|
347
|
+
static loadFromFile(jsonFilePath: string, rushConfiguration?: RushConfiguration): CommonVersionsConfiguration;
|
|
342
348
|
private static _deserializeTable;
|
|
343
349
|
private static _serializeTable;
|
|
344
350
|
/**
|
|
@@ -678,6 +684,13 @@ export declare const EnvironmentVariableNames: {
|
|
|
678
684
|
* or `0` to disallow them. (See the comments in the command-line.json file for more information).
|
|
679
685
|
*/
|
|
680
686
|
readonly RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD: "RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD";
|
|
687
|
+
/**
|
|
688
|
+
* This variable selects a specific installation variant for Rush to use when installing
|
|
689
|
+
* and linking package dependencies.
|
|
690
|
+
* For more information, see the command-line help for the `--variant` parameter
|
|
691
|
+
* and this article: https://rushjs.io/pages/advanced/installation_variants/
|
|
692
|
+
*/
|
|
693
|
+
readonly RUSH_VARIANT: "RUSH_VARIANT";
|
|
681
694
|
/**
|
|
682
695
|
* Specifies the maximum number of concurrent processes to launch during a build.
|
|
683
696
|
* For more information, see the command-line help for the `--parallelism` parameter for "rush build".
|
|
@@ -1231,6 +1244,13 @@ export declare interface ICredentialCacheOptions {
|
|
|
1231
1244
|
supportEditing: boolean;
|
|
1232
1245
|
}
|
|
1233
1246
|
|
|
1247
|
+
/**
|
|
1248
|
+
* This represents the JSON data structure for the "current-variant.json" data file.
|
|
1249
|
+
*/
|
|
1250
|
+
declare interface ICurrentVariantJson {
|
|
1251
|
+
variant: string | JsonNull;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1234
1254
|
/**
|
|
1235
1255
|
* Metadata for a custom tip.
|
|
1236
1256
|
*
|
|
@@ -1428,6 +1448,12 @@ export declare interface IExperimentsJson {
|
|
|
1428
1448
|
* ignore normal discussion group messages or don't know to subscribe.
|
|
1429
1449
|
*/
|
|
1430
1450
|
rushAlerts?: boolean;
|
|
1451
|
+
/**
|
|
1452
|
+
* Allow cobuilds without using the build cache to store previous execution info. When setting up
|
|
1453
|
+
* distributed builds, Rush will allow uncacheable projects to still leverage the cobuild feature.
|
|
1454
|
+
* This is useful when you want to speed up operations that can't (or shouldn't) be cached.
|
|
1455
|
+
*/
|
|
1456
|
+
allowCobuildWithoutCache?: boolean;
|
|
1431
1457
|
}
|
|
1432
1458
|
|
|
1433
1459
|
/**
|
|
@@ -1543,6 +1569,38 @@ declare interface ILockStepVersionJson extends IVersionPolicyJson {
|
|
|
1543
1569
|
mainProject?: string;
|
|
1544
1570
|
}
|
|
1545
1571
|
|
|
1572
|
+
/**
|
|
1573
|
+
* Information about the log files for an operation.
|
|
1574
|
+
*
|
|
1575
|
+
* @alpha
|
|
1576
|
+
*/
|
|
1577
|
+
export declare interface ILogFilePaths {
|
|
1578
|
+
/**
|
|
1579
|
+
* The absolute path to the folder containing the text log files.
|
|
1580
|
+
* Provided as a convenience since it is an intermediary value of producing the text log file path.
|
|
1581
|
+
*/
|
|
1582
|
+
textFolder: string;
|
|
1583
|
+
/**
|
|
1584
|
+
* The absolute path to the folder containing the JSONL log files.
|
|
1585
|
+
* Provided as a convenience since it is an intermediary value of producing the jsonl log file path.
|
|
1586
|
+
*/
|
|
1587
|
+
jsonlFolder: string;
|
|
1588
|
+
/**
|
|
1589
|
+
* The absolute path to the merged (interleaved stdout and stderr) text log.
|
|
1590
|
+
* ANSI escape codes have been stripped.
|
|
1591
|
+
*/
|
|
1592
|
+
text: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* The absolute path to the stderr text log.
|
|
1595
|
+
* ANSI escape codes have been stripped.
|
|
1596
|
+
*/
|
|
1597
|
+
error: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* The absolute path to the JSONL log. ANSI escape codes are left intact to be able to reproduce the console output.
|
|
1600
|
+
*/
|
|
1601
|
+
jsonl: string;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1546
1604
|
/**
|
|
1547
1605
|
* @beta
|
|
1548
1606
|
*/
|
|
@@ -1645,6 +1703,10 @@ export declare interface IOperationExecutionResult {
|
|
|
1645
1703
|
* The id of the runner which actually runs the building process in cobuild mode.
|
|
1646
1704
|
*/
|
|
1647
1705
|
readonly cobuildRunnerId: string | undefined;
|
|
1706
|
+
/**
|
|
1707
|
+
* The paths to the log files, if applicable.
|
|
1708
|
+
*/
|
|
1709
|
+
readonly logFilePaths: ILogFilePaths | undefined;
|
|
1648
1710
|
}
|
|
1649
1711
|
|
|
1650
1712
|
/**
|
|
@@ -1849,6 +1911,10 @@ export declare interface IOperationSettings {
|
|
|
1849
1911
|
* determined by the -p flag.
|
|
1850
1912
|
*/
|
|
1851
1913
|
weight?: number;
|
|
1914
|
+
/**
|
|
1915
|
+
* If true, this operation can use cobuilds for orchestration without restoring build cache entries.
|
|
1916
|
+
*/
|
|
1917
|
+
allowCobuildWithoutCache?: boolean;
|
|
1852
1918
|
}
|
|
1853
1919
|
|
|
1854
1920
|
/**
|
|
@@ -2163,7 +2229,7 @@ declare interface IRushConfigurationJson {
|
|
|
2163
2229
|
pnpmOptions?: _IPnpmOptionsJson;
|
|
2164
2230
|
yarnOptions?: _IYarnOptionsJson;
|
|
2165
2231
|
ensureConsistentVersions?: boolean;
|
|
2166
|
-
variants?:
|
|
2232
|
+
variants?: IRushVariantOptionsJson[];
|
|
2167
2233
|
}
|
|
2168
2234
|
|
|
2169
2235
|
/**
|
|
@@ -2241,15 +2307,9 @@ export declare interface IRushPhaseSharding {
|
|
|
2241
2307
|
*/
|
|
2242
2308
|
outputFolderArgumentFormat?: string;
|
|
2243
2309
|
/**
|
|
2244
|
-
*
|
|
2310
|
+
* @deprecated Create a separate operation settings object for the shard operation settings with the name `{operationName}:shard`.
|
|
2245
2311
|
*/
|
|
2246
|
-
shardOperationSettings?:
|
|
2247
|
-
/**
|
|
2248
|
-
* How many concurrency units this operation should take up during execution. The maximum concurrent units is
|
|
2249
|
-
* determined by the -p flag.
|
|
2250
|
-
*/
|
|
2251
|
-
weight?: number;
|
|
2252
|
-
};
|
|
2312
|
+
shardOperationSettings?: unknown;
|
|
2253
2313
|
}
|
|
2254
2314
|
|
|
2255
2315
|
/**
|
|
@@ -2347,6 +2407,14 @@ export declare interface IRushSessionOptions {
|
|
|
2347
2407
|
getIsDebugMode: () => boolean;
|
|
2348
2408
|
}
|
|
2349
2409
|
|
|
2410
|
+
/**
|
|
2411
|
+
* Options defining an allowed variant as part of IRushConfigurationJson.
|
|
2412
|
+
*/
|
|
2413
|
+
declare interface IRushVariantOptionsJson {
|
|
2414
|
+
variantName: string;
|
|
2415
|
+
description: string;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2350
2418
|
/**
|
|
2351
2419
|
* Represents a readonly view of a `Stopwatch`.
|
|
2352
2420
|
* @beta
|
|
@@ -3318,7 +3386,7 @@ export declare class RepoStateFile {
|
|
|
3318
3386
|
*
|
|
3319
3387
|
* @returns true if the file was modified, otherwise false.
|
|
3320
3388
|
*/
|
|
3321
|
-
refreshState(rushConfiguration: RushConfiguration, subspace: Subspace | undefined): boolean;
|
|
3389
|
+
refreshState(rushConfiguration: RushConfiguration, subspace: Subspace | undefined, variant?: string): boolean;
|
|
3322
3390
|
/**
|
|
3323
3391
|
* Writes the "repo-state.json" file to disk, using the filename that was passed to loadFromFile().
|
|
3324
3392
|
*/
|
|
@@ -3404,6 +3472,10 @@ export declare class RushCommandLine {
|
|
|
3404
3472
|
export declare class RushConfiguration {
|
|
3405
3473
|
private static _jsonSchema;
|
|
3406
3474
|
private readonly _pathTrees;
|
|
3475
|
+
/**
|
|
3476
|
+
* @internal
|
|
3477
|
+
*/
|
|
3478
|
+
_currentVariantJsonLoadingPromise: Promise<ICurrentVariantJson | undefined> | undefined;
|
|
3407
3479
|
private _projects;
|
|
3408
3480
|
private _projectsByName;
|
|
3409
3481
|
private _projectsByTag;
|
|
@@ -3508,12 +3580,13 @@ export declare class RushConfiguration {
|
|
|
3508
3580
|
*/
|
|
3509
3581
|
readonly subspacesFeatureEnabled: boolean;
|
|
3510
3582
|
/**
|
|
3511
|
-
*
|
|
3583
|
+
* The filename of the variant dependency data file. By default this is
|
|
3584
|
+
* called 'current-variant.json' resides in the Rush common folder.
|
|
3585
|
+
* Its data structure is defined by ICurrentVariantJson.
|
|
3512
3586
|
*
|
|
3513
|
-
*
|
|
3514
|
-
* @deprecated - Remove when the field is removed from the rush.json schema.
|
|
3587
|
+
* Example: `C:\MyRepo\common\temp\current-variant.json`
|
|
3515
3588
|
*/
|
|
3516
|
-
readonly
|
|
3589
|
+
readonly currentVariantJsonFilePath: string;
|
|
3517
3590
|
/**
|
|
3518
3591
|
* The version of the locally package manager tool. (Example: "1.2.3")
|
|
3519
3592
|
*/
|
|
@@ -3699,6 +3772,12 @@ export declare class RushConfiguration {
|
|
|
3699
3772
|
* @internal
|
|
3700
3773
|
*/
|
|
3701
3774
|
readonly _rushPluginsConfiguration: RushPluginsConfiguration;
|
|
3775
|
+
/**
|
|
3776
|
+
* The variants specified in the rush.json configuration file.
|
|
3777
|
+
*
|
|
3778
|
+
* @beta
|
|
3779
|
+
*/
|
|
3780
|
+
readonly variants: ReadonlySet<string>;
|
|
3702
3781
|
/**
|
|
3703
3782
|
* Use RushConfiguration.loadFromConfigurationFile() or Use RushConfiguration.loadFromDefaultLocation()
|
|
3704
3783
|
* instead.
|
|
@@ -3825,23 +3904,34 @@ export declare class RushConfiguration {
|
|
|
3825
3904
|
* Instead it will be initialized in an empty state, and calling CommonVersionsConfiguration.save()
|
|
3826
3905
|
* will create the file.
|
|
3827
3906
|
*
|
|
3828
|
-
* @deprecated Use `getCommonVersions` instead, which gets the correct common version data
|
|
3907
|
+
* @deprecated Use `getCommonVersions` instead, which gets the correct common version data
|
|
3908
|
+
* for a given active variant.
|
|
3829
3909
|
*/
|
|
3830
3910
|
get commonVersions(): CommonVersionsConfiguration;
|
|
3911
|
+
/**
|
|
3912
|
+
* Gets the currently-installed variant, if an installation has occurred.
|
|
3913
|
+
* For Rush operations which do not take a --variant parameter, this method
|
|
3914
|
+
* determines which variant, if any, was last specified when performing "rush install"
|
|
3915
|
+
* or "rush update".
|
|
3916
|
+
*/
|
|
3917
|
+
getCurrentlyInstalledVariantAsync(): Promise<string | undefined>;
|
|
3831
3918
|
/**
|
|
3832
3919
|
* @deprecated Use {@link Subspace.getCommonVersionsFilePath} instead
|
|
3833
3920
|
*/
|
|
3834
|
-
getCommonVersionsFilePath(subspace?: Subspace): string;
|
|
3921
|
+
getCommonVersionsFilePath(subspace?: Subspace, variant?: string): string;
|
|
3835
3922
|
/**
|
|
3836
3923
|
* @deprecated Use {@link Subspace.getCommonVersions} instead
|
|
3837
3924
|
*/
|
|
3838
|
-
getCommonVersions(subspace?: Subspace): CommonVersionsConfiguration;
|
|
3925
|
+
getCommonVersions(subspace?: Subspace, variant?: string): CommonVersionsConfiguration;
|
|
3839
3926
|
/**
|
|
3840
3927
|
* Returns a map of all direct dependencies that only have a single semantic version specifier.
|
|
3841
3928
|
*
|
|
3929
|
+
* @param subspace - The subspace to use
|
|
3930
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
3931
|
+
*
|
|
3842
3932
|
* @returns A map of dependency name --\> version specifier for implicitly preferred versions.
|
|
3843
3933
|
*/
|
|
3844
|
-
getImplicitlyPreferredVersions(subspace?: Subspace): Map<string, string>;
|
|
3934
|
+
getImplicitlyPreferredVersions(subspace?: Subspace, variant?: string): Map<string, string>;
|
|
3845
3935
|
/**
|
|
3846
3936
|
* @deprecated Use {@link Subspace.getRepoStateFilePath} instead
|
|
3847
3937
|
*/
|
|
@@ -3851,11 +3941,11 @@ export declare class RushConfiguration {
|
|
|
3851
3941
|
*/
|
|
3852
3942
|
getRepoState(subspace?: Subspace): RepoStateFile;
|
|
3853
3943
|
/**
|
|
3854
|
-
* @deprecated Use {@link Subspace.
|
|
3944
|
+
* @deprecated Use {@link Subspace.getCommittedShrinkwrapFilePath} instead
|
|
3855
3945
|
*/
|
|
3856
|
-
getCommittedShrinkwrapFilename(subspace?: Subspace): string;
|
|
3946
|
+
getCommittedShrinkwrapFilename(subspace?: Subspace, variant?: string): string;
|
|
3857
3947
|
/**
|
|
3858
|
-
* @deprecated Use {@link Subspace.
|
|
3948
|
+
* @deprecated Use {@link Subspace.getPnpmfilePath} instead
|
|
3859
3949
|
*/
|
|
3860
3950
|
getPnpmfilePath(subspace?: Subspace): string;
|
|
3861
3951
|
/**
|
|
@@ -3885,6 +3975,7 @@ export declare class RushConfiguration {
|
|
|
3885
3975
|
* If the path is not under any project's folder, returns undefined.
|
|
3886
3976
|
*/
|
|
3887
3977
|
tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
|
|
3978
|
+
private _loadCurrentVariantJsonAsync;
|
|
3888
3979
|
}
|
|
3889
3980
|
|
|
3890
3981
|
/**
|
|
@@ -4120,6 +4211,12 @@ export declare class RushConstants {
|
|
|
4120
4211
|
* The NPM scope ("\@rush-temp") that is used for Rush's temporary projects.
|
|
4121
4212
|
*/
|
|
4122
4213
|
static readonly rushTempNpmScope: '@rush-temp';
|
|
4214
|
+
/**
|
|
4215
|
+
* The folder name ("variants") under which named variant configurations for
|
|
4216
|
+
* alternate dependency sets may be found.
|
|
4217
|
+
* Example: `C:\MyRepo\common\config\rush\variants`
|
|
4218
|
+
*/
|
|
4219
|
+
static readonly rushVariantsFolderName: 'variants';
|
|
4123
4220
|
/**
|
|
4124
4221
|
* The folder name ("temp") under the common folder, or under the .rush folder in each project's directory where
|
|
4125
4222
|
* temporary files will be stored.
|
|
@@ -4425,11 +4522,11 @@ export declare class RushLifecycleHooks {
|
|
|
4425
4522
|
/**
|
|
4426
4523
|
* The hook to run between preparing the common/temp folder and invoking the package manager during "rush install" or "rush update".
|
|
4427
4524
|
*/
|
|
4428
|
-
readonly beforeInstall: AsyncSeriesHook<[IGlobalCommand, Subspace]>;
|
|
4525
|
+
readonly beforeInstall: AsyncSeriesHook<[IGlobalCommand, Subspace, string | undefined]>;
|
|
4429
4526
|
/**
|
|
4430
4527
|
* The hook to run after a successful install.
|
|
4431
4528
|
*/
|
|
4432
|
-
readonly afterInstall: AsyncSeriesHook<[IRushCommand, Subspace]>;
|
|
4529
|
+
readonly afterInstall: AsyncSeriesHook<[IRushCommand, Subspace, string | undefined]>;
|
|
4433
4530
|
/**
|
|
4434
4531
|
* A hook to allow plugins to hook custom logic to process telemetry data.
|
|
4435
4532
|
*/
|
|
@@ -4568,6 +4665,20 @@ export declare class Subspace {
|
|
|
4568
4665
|
*/
|
|
4569
4666
|
getPnpmOptions(): PnpmOptionsConfiguration | undefined;
|
|
4570
4667
|
private _ensureDetail;
|
|
4668
|
+
/**
|
|
4669
|
+
* Returns the full path of the folder containing this subspace's variant-dependent configuration files
|
|
4670
|
+
* such as `pnpm-lock.yaml`.
|
|
4671
|
+
*
|
|
4672
|
+
* Example: `common/config/subspaces/my-subspace` or `common/config/subspaces/my-subspace/variants/my-variant`
|
|
4673
|
+
* @beta
|
|
4674
|
+
*
|
|
4675
|
+
* @remarks
|
|
4676
|
+
* The following files may be variant-dependent:
|
|
4677
|
+
* - Lockfiles: (i.e. - `pnpm-lock.yaml`, `npm-shrinkwrap.json`, `yarn.lock`, etc)
|
|
4678
|
+
* - 'common-versions.json'
|
|
4679
|
+
* - 'pnpmfile.js'/'.pnpmfile.cjs'
|
|
4680
|
+
*/
|
|
4681
|
+
getVariantDependentSubspaceConfigFolderPath(variant: string | undefined): string;
|
|
4571
4682
|
/**
|
|
4572
4683
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
4573
4684
|
*
|
|
@@ -4602,6 +4713,10 @@ export declare class Subspace {
|
|
|
4602
4713
|
* @beta
|
|
4603
4714
|
*/
|
|
4604
4715
|
getTempShrinkwrapFilename(): string;
|
|
4716
|
+
/**
|
|
4717
|
+
* @deprecated - Use {@link Subspace.getTempShrinkwrapPreinstallFilePath} instead.
|
|
4718
|
+
*/
|
|
4719
|
+
getTempShrinkwrapPreinstallFilename(subspaceName?: string | undefined): string;
|
|
4605
4720
|
/**
|
|
4606
4721
|
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
|
|
4607
4722
|
* before installation begins, and can be compared to determine how the package manager
|
|
@@ -4612,14 +4727,14 @@ export declare class Subspace {
|
|
|
4612
4727
|
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
4613
4728
|
* @beta
|
|
4614
4729
|
*/
|
|
4615
|
-
|
|
4730
|
+
getTempShrinkwrapPreinstallFilePath(): string;
|
|
4616
4731
|
/**
|
|
4617
4732
|
* Gets the path to the common-versions.json config file for this subspace.
|
|
4618
4733
|
*
|
|
4619
4734
|
* Example: `C:\MyRepo\common\subspaces\my-subspace\common-versions.json`
|
|
4620
4735
|
* @beta
|
|
4621
4736
|
*/
|
|
4622
|
-
getCommonVersionsFilePath(): string;
|
|
4737
|
+
getCommonVersionsFilePath(variant?: string): string;
|
|
4623
4738
|
/**
|
|
4624
4739
|
* Gets the path to the pnpm-config.json config file for this subspace.
|
|
4625
4740
|
*
|
|
@@ -4631,13 +4746,13 @@ export declare class Subspace {
|
|
|
4631
4746
|
* Gets the settings from the common-versions.json config file.
|
|
4632
4747
|
* @beta
|
|
4633
4748
|
*/
|
|
4634
|
-
getCommonVersions(): CommonVersionsConfiguration;
|
|
4749
|
+
getCommonVersions(variant?: string): CommonVersionsConfiguration;
|
|
4635
4750
|
/**
|
|
4636
4751
|
* Gets the ensureConsistentVersions property from the common-versions.json config file,
|
|
4637
4752
|
* or from the rush.json file if it isn't defined in common-versions.json
|
|
4638
4753
|
* @beta
|
|
4639
4754
|
*/
|
|
4640
|
-
|
|
4755
|
+
shouldEnsureConsistentVersions(variant?: string): boolean;
|
|
4641
4756
|
/**
|
|
4642
4757
|
* Gets the path to the repo-state.json file.
|
|
4643
4758
|
* @beta
|
|
@@ -4650,10 +4765,15 @@ export declare class Subspace {
|
|
|
4650
4765
|
*/
|
|
4651
4766
|
getRepoState(): RepoStateFile;
|
|
4652
4767
|
/**
|
|
4653
|
-
*
|
|
4654
|
-
* @beta
|
|
4768
|
+
* @deprecated - Use {@link Subspace.getCommittedShrinkwrapFilePath} instead.
|
|
4655
4769
|
*/
|
|
4656
4770
|
getCommittedShrinkwrapFilename(): string;
|
|
4771
|
+
/**
|
|
4772
|
+
* Gets the committed shrinkwrap file name for a specific variant.
|
|
4773
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
4774
|
+
* @beta
|
|
4775
|
+
*/
|
|
4776
|
+
getCommittedShrinkwrapFilePath(variant?: string): string;
|
|
4657
4777
|
/**
|
|
4658
4778
|
* Gets the absolute path for "pnpmfile.js" for a specific subspace.
|
|
4659
4779
|
* @param subspace - The name of the current subspace in use by the active command.
|
|
@@ -4673,7 +4793,7 @@ export declare class Subspace {
|
|
|
4673
4793
|
* Returns hash value of injected dependencies in related package.json.
|
|
4674
4794
|
* @beta
|
|
4675
4795
|
*/
|
|
4676
|
-
getPackageJsonInjectedDependenciesHash(): string | undefined;
|
|
4796
|
+
getPackageJsonInjectedDependenciesHash(variant?: string): string | undefined;
|
|
4677
4797
|
}
|
|
4678
4798
|
|
|
4679
4799
|
/**
|
|
@@ -53,6 +53,11 @@ export declare class CobuildConfiguration {
|
|
|
53
53
|
* to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
54
54
|
*/
|
|
55
55
|
readonly cobuildLeafProjectLogOnlyAllowed: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* If true, operations can opt into leveraging cobuilds without restoring from the build cache.
|
|
58
|
+
* Operations will need to us the allowCobuildWithoutCache flag to opt into this behavior per phase.
|
|
59
|
+
*/
|
|
60
|
+
readonly cobuildWithoutCacheAllowed: boolean;
|
|
56
61
|
private _cobuildLockProvider;
|
|
57
62
|
private readonly _cobuildLockProviderFactory;
|
|
58
63
|
private readonly _cobuildJson;
|
|
@@ -80,7 +80,7 @@ export declare class CommonVersionsConfiguration {
|
|
|
80
80
|
* Loads the common-versions.json data from the specified file path.
|
|
81
81
|
* If the file has not been created yet, then an empty object is returned.
|
|
82
82
|
*/
|
|
83
|
-
static loadFromFile(
|
|
83
|
+
static loadFromFile(jsonFilePath: string, rushConfiguration?: RushConfiguration): CommonVersionsConfiguration;
|
|
84
84
|
private static _deserializeTable;
|
|
85
85
|
private static _serializeTable;
|
|
86
86
|
/**
|
|
@@ -36,6 +36,13 @@ export declare const EnvironmentVariableNames: {
|
|
|
36
36
|
* or `0` to disallow them. (See the comments in the command-line.json file for more information).
|
|
37
37
|
*/
|
|
38
38
|
readonly RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD: "RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD";
|
|
39
|
+
/**
|
|
40
|
+
* This variable selects a specific installation variant for Rush to use when installing
|
|
41
|
+
* and linking package dependencies.
|
|
42
|
+
* For more information, see the command-line help for the `--variant` parameter
|
|
43
|
+
* and this article: https://rushjs.io/pages/advanced/installation_variants/
|
|
44
|
+
*/
|
|
45
|
+
readonly RUSH_VARIANT: "RUSH_VARIANT";
|
|
39
46
|
/**
|
|
40
47
|
* Specifies the maximum number of concurrent processes to launch during a build.
|
|
41
48
|
* For more information, see the command-line help for the `--parallelism` parameter for "rush build".
|
|
@@ -83,6 +83,12 @@ export interface IExperimentsJson {
|
|
|
83
83
|
* ignore normal discussion group messages or don't know to subscribe.
|
|
84
84
|
*/
|
|
85
85
|
rushAlerts?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Allow cobuilds without using the build cache to store previous execution info. When setting up
|
|
88
|
+
* distributed builds, Rush will allow uncacheable projects to still leverage the cobuild feature.
|
|
89
|
+
* This is useful when you want to speed up operations that can't (or shouldn't) be cached.
|
|
90
|
+
*/
|
|
91
|
+
allowCobuildWithoutCache?: boolean;
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
88
94
|
* Use this class to load the "common/config/rush/experiments.json" config file.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PackageNameParser } from '@rushstack/node-core-library';
|
|
1
|
+
import { type PackageNameParser, type JsonNull } from '@rushstack/node-core-library';
|
|
2
2
|
import { LookupByPath } from '@rushstack/lookup-by-path';
|
|
3
3
|
import { RushConfigurationProject, type IRushConfigurationProjectJson } from './RushConfigurationProject';
|
|
4
4
|
import { ApprovedPackagesPolicy } from './ApprovedPackagesPolicy';
|
|
@@ -77,6 +77,13 @@ export interface IRushRepositoryJsonMultipleUrls extends IRushRepositoryJsonBase
|
|
|
77
77
|
urls?: string[];
|
|
78
78
|
}
|
|
79
79
|
export type IRushRepositoryJson = IRushRepositoryJsonSingleUrl | IRushRepositoryJsonMultipleUrls;
|
|
80
|
+
/**
|
|
81
|
+
* Options defining an allowed variant as part of IRushConfigurationJson.
|
|
82
|
+
*/
|
|
83
|
+
export interface IRushVariantOptionsJson {
|
|
84
|
+
variantName: string;
|
|
85
|
+
description: string;
|
|
86
|
+
}
|
|
80
87
|
/**
|
|
81
88
|
* This represents the JSON data structure for the "rush.json" configuration file.
|
|
82
89
|
* See rush.schema.json for documentation.
|
|
@@ -106,7 +113,13 @@ export interface IRushConfigurationJson {
|
|
|
106
113
|
pnpmOptions?: IPnpmOptionsJson;
|
|
107
114
|
yarnOptions?: IYarnOptionsJson;
|
|
108
115
|
ensureConsistentVersions?: boolean;
|
|
109
|
-
variants?:
|
|
116
|
+
variants?: IRushVariantOptionsJson[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* This represents the JSON data structure for the "current-variant.json" data file.
|
|
120
|
+
*/
|
|
121
|
+
export interface ICurrentVariantJson {
|
|
122
|
+
variant: string | JsonNull;
|
|
110
123
|
}
|
|
111
124
|
/**
|
|
112
125
|
* The filter parameters to search from all projects
|
|
@@ -139,6 +152,10 @@ export interface ITryFindRushJsonLocationOptions {
|
|
|
139
152
|
export declare class RushConfiguration {
|
|
140
153
|
private static _jsonSchema;
|
|
141
154
|
private readonly _pathTrees;
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
_currentVariantJsonLoadingPromise: Promise<ICurrentVariantJson | undefined> | undefined;
|
|
142
159
|
private _projects;
|
|
143
160
|
private _projectsByName;
|
|
144
161
|
private _projectsByTag;
|
|
@@ -243,12 +260,13 @@ export declare class RushConfiguration {
|
|
|
243
260
|
*/
|
|
244
261
|
readonly subspacesFeatureEnabled: boolean;
|
|
245
262
|
/**
|
|
246
|
-
*
|
|
263
|
+
* The filename of the variant dependency data file. By default this is
|
|
264
|
+
* called 'current-variant.json' resides in the Rush common folder.
|
|
265
|
+
* Its data structure is defined by ICurrentVariantJson.
|
|
247
266
|
*
|
|
248
|
-
*
|
|
249
|
-
* @deprecated - Remove when the field is removed from the rush.json schema.
|
|
267
|
+
* Example: `C:\MyRepo\common\temp\current-variant.json`
|
|
250
268
|
*/
|
|
251
|
-
readonly
|
|
269
|
+
readonly currentVariantJsonFilePath: string;
|
|
252
270
|
/**
|
|
253
271
|
* The version of the locally package manager tool. (Example: "1.2.3")
|
|
254
272
|
*/
|
|
@@ -434,6 +452,12 @@ export declare class RushConfiguration {
|
|
|
434
452
|
* @internal
|
|
435
453
|
*/
|
|
436
454
|
readonly _rushPluginsConfiguration: RushPluginsConfiguration;
|
|
455
|
+
/**
|
|
456
|
+
* The variants specified in the rush.json configuration file.
|
|
457
|
+
*
|
|
458
|
+
* @beta
|
|
459
|
+
*/
|
|
460
|
+
readonly variants: ReadonlySet<string>;
|
|
437
461
|
/**
|
|
438
462
|
* Use RushConfiguration.loadFromConfigurationFile() or Use RushConfiguration.loadFromDefaultLocation()
|
|
439
463
|
* instead.
|
|
@@ -560,23 +584,34 @@ export declare class RushConfiguration {
|
|
|
560
584
|
* Instead it will be initialized in an empty state, and calling CommonVersionsConfiguration.save()
|
|
561
585
|
* will create the file.
|
|
562
586
|
*
|
|
563
|
-
* @deprecated Use `getCommonVersions` instead, which gets the correct common version data
|
|
587
|
+
* @deprecated Use `getCommonVersions` instead, which gets the correct common version data
|
|
588
|
+
* for a given active variant.
|
|
564
589
|
*/
|
|
565
590
|
get commonVersions(): CommonVersionsConfiguration;
|
|
591
|
+
/**
|
|
592
|
+
* Gets the currently-installed variant, if an installation has occurred.
|
|
593
|
+
* For Rush operations which do not take a --variant parameter, this method
|
|
594
|
+
* determines which variant, if any, was last specified when performing "rush install"
|
|
595
|
+
* or "rush update".
|
|
596
|
+
*/
|
|
597
|
+
getCurrentlyInstalledVariantAsync(): Promise<string | undefined>;
|
|
566
598
|
/**
|
|
567
599
|
* @deprecated Use {@link Subspace.getCommonVersionsFilePath} instead
|
|
568
600
|
*/
|
|
569
|
-
getCommonVersionsFilePath(subspace?: Subspace): string;
|
|
601
|
+
getCommonVersionsFilePath(subspace?: Subspace, variant?: string): string;
|
|
570
602
|
/**
|
|
571
603
|
* @deprecated Use {@link Subspace.getCommonVersions} instead
|
|
572
604
|
*/
|
|
573
|
-
getCommonVersions(subspace?: Subspace): CommonVersionsConfiguration;
|
|
605
|
+
getCommonVersions(subspace?: Subspace, variant?: string): CommonVersionsConfiguration;
|
|
574
606
|
/**
|
|
575
607
|
* Returns a map of all direct dependencies that only have a single semantic version specifier.
|
|
576
608
|
*
|
|
609
|
+
* @param subspace - The subspace to use
|
|
610
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
611
|
+
*
|
|
577
612
|
* @returns A map of dependency name --\> version specifier for implicitly preferred versions.
|
|
578
613
|
*/
|
|
579
|
-
getImplicitlyPreferredVersions(subspace?: Subspace): Map<string, string>;
|
|
614
|
+
getImplicitlyPreferredVersions(subspace?: Subspace, variant?: string): Map<string, string>;
|
|
580
615
|
/**
|
|
581
616
|
* @deprecated Use {@link Subspace.getRepoStateFilePath} instead
|
|
582
617
|
*/
|
|
@@ -586,11 +621,11 @@ export declare class RushConfiguration {
|
|
|
586
621
|
*/
|
|
587
622
|
getRepoState(subspace?: Subspace): RepoStateFile;
|
|
588
623
|
/**
|
|
589
|
-
* @deprecated Use {@link Subspace.
|
|
624
|
+
* @deprecated Use {@link Subspace.getCommittedShrinkwrapFilePath} instead
|
|
590
625
|
*/
|
|
591
|
-
getCommittedShrinkwrapFilename(subspace?: Subspace): string;
|
|
626
|
+
getCommittedShrinkwrapFilename(subspace?: Subspace, variant?: string): string;
|
|
592
627
|
/**
|
|
593
|
-
* @deprecated Use {@link Subspace.
|
|
628
|
+
* @deprecated Use {@link Subspace.getPnpmfilePath} instead
|
|
594
629
|
*/
|
|
595
630
|
getPnpmfilePath(subspace?: Subspace): string;
|
|
596
631
|
/**
|
|
@@ -620,5 +655,6 @@ export declare class RushConfiguration {
|
|
|
620
655
|
* If the path is not under any project's folder, returns undefined.
|
|
621
656
|
*/
|
|
622
657
|
tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
|
|
658
|
+
private _loadCurrentVariantJsonAsync;
|
|
623
659
|
}
|
|
624
660
|
//# sourceMappingURL=RushConfiguration.d.ts.map
|
|
@@ -47,15 +47,9 @@ export interface IRushPhaseSharding {
|
|
|
47
47
|
*/
|
|
48
48
|
outputFolderArgumentFormat?: string;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
*/
|
|
52
|
-
shardOperationSettings?:
|
|
53
|
-
/**
|
|
54
|
-
* How many concurrency units this operation should take up during execution. The maximum concurrent units is
|
|
55
|
-
* determined by the -p flag.
|
|
56
|
-
*/
|
|
57
|
-
weight?: number;
|
|
58
|
-
};
|
|
50
|
+
* @deprecated Create a separate operation settings object for the shard operation settings with the name `{operationName}:shard`.
|
|
51
|
+
*/
|
|
52
|
+
shardOperationSettings?: unknown;
|
|
59
53
|
}
|
|
60
54
|
/**
|
|
61
55
|
* @alpha
|
|
@@ -115,6 +109,10 @@ export interface IOperationSettings {
|
|
|
115
109
|
* determined by the -p flag.
|
|
116
110
|
*/
|
|
117
111
|
weight?: number;
|
|
112
|
+
/**
|
|
113
|
+
* If true, this operation can use cobuilds for orchestration without restoring build cache entries.
|
|
114
|
+
*/
|
|
115
|
+
allowCobuildWithoutCache?: boolean;
|
|
118
116
|
}
|
|
119
117
|
/**
|
|
120
118
|
* Use this class to load the "config/rush-project.json" config file.
|