@rushstack/rush-sdk 5.112.2-pr4485.2 → 5.113.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 +250 -104
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/LastInstallFlag.d.ts +2 -1
- package/lib/api/LastLinkFlag.d.ts +2 -2
- package/lib/api/PackageJsonEditor.d.ts +15 -0
- package/lib/api/RushConfiguration.d.ts +56 -74
- package/lib/api/RushConfigurationProject.d.ts +14 -8
- package/lib/api/RushProjectConfiguration.d.ts +0 -7
- package/lib/api/Subspace.d.ts +117 -0
- package/lib/api/{SubspaceConfiguration.js → Subspace.js} +1 -1
- package/lib/api/SubspacesConfiguration.d.ts +58 -0
- package/lib/api/SubspacesConfiguration.js +1 -0
- package/lib/api/VersionPolicyConfiguration.d.ts +1 -1
- package/lib/api/packageManager/PnpmPackageManager.d.ts +7 -0
- package/lib/cli/actions/BaseInstallAction.d.ts +4 -0
- package/lib/index.d.ts +3 -2
- package/lib/logic/ChangeManager.d.ts +1 -1
- package/lib/logic/ChangelogGenerator.d.ts +2 -2
- package/lib/logic/PublishUtilities.d.ts +2 -2
- package/lib/logic/RepoStateFile.d.ts +5 -3
- package/lib/logic/RushConstants.d.ts +8 -0
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +5 -0
- package/lib/logic/base/BaseShrinkwrapFile.d.ts +3 -2
- package/lib/logic/installManager/InstallHelpers.d.ts +2 -1
- package/lib/logic/npm/NpmShrinkwrapFile.d.ts +2 -1
- package/lib/logic/operations/IOperationRunner.d.ts +10 -5
- package/lib/logic/operations/OperationExecutionRecord.d.ts +3 -6
- package/lib/logic/operations/ProjectLogWritable.d.ts +1 -0
- package/lib/logic/operations/ShellOperationRunner.d.ts +10 -3
- package/lib/logic/pnpm/IPnpmfile.d.ts +15 -0
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +8 -2
- package/lib/logic/pnpm/PnpmfileConfiguration.d.ts +3 -2
- package/lib/logic/policy/PolicyValidator.d.ts +2 -1
- package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +2 -1
- package/lib/logic/selectors/SubspaceSelectorParser.d.ts +10 -0
- package/lib/logic/selectors/SubspaceSelectorParser.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +2 -0
- package/lib/logic/yarn/YarnShrinkwrapFile.d.ts +2 -1
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +0 -6
- package/lib/utilities/PathConstants.d.ts +1 -0
- package/lib/utilities/Utilities.d.ts +0 -4
- package/lib/utilities/npmrcUtilities.d.ts +1 -1
- package/package.json +6 -6
- package/lib/api/SubspaceConfiguration.d.ts +0 -26
package/dist/rush-lib.d.ts
CHANGED
|
@@ -1155,12 +1155,6 @@ export declare interface ICreateOperationsContext {
|
|
|
1155
1155
|
* The Rush configuration
|
|
1156
1156
|
*/
|
|
1157
1157
|
readonly rushConfiguration: RushConfiguration;
|
|
1158
|
-
/**
|
|
1159
|
-
* Marks an operation's result as invalid, potentially triggering a new build. Only applicable in watch mode.
|
|
1160
|
-
* @param operation - The operation to invalidate
|
|
1161
|
-
* @param reason - The reason for invalidating the operation
|
|
1162
|
-
*/
|
|
1163
|
-
readonly invalidateOperation?: ((operation: Operation, reason: string) => void) | undefined;
|
|
1164
1158
|
}
|
|
1165
1159
|
|
|
1166
1160
|
/**
|
|
@@ -1667,6 +1661,10 @@ export declare interface IOperationRunnerContext {
|
|
|
1667
1661
|
* Defaults to `true`. Will be `false` if Rush was invoked with `--verbose`.
|
|
1668
1662
|
*/
|
|
1669
1663
|
quietMode: boolean;
|
|
1664
|
+
/**
|
|
1665
|
+
* Object used to report a summary at the end of the Rush invocation.
|
|
1666
|
+
*/
|
|
1667
|
+
stdioSummarizer: StdioSummarizer;
|
|
1670
1668
|
/**
|
|
1671
1669
|
* Object used to manage metadata of the operation.
|
|
1672
1670
|
*
|
|
@@ -1690,11 +1688,12 @@ export declare interface IOperationRunnerContext {
|
|
|
1690
1688
|
*/
|
|
1691
1689
|
error?: Error;
|
|
1692
1690
|
/**
|
|
1693
|
-
*
|
|
1694
|
-
*
|
|
1695
|
-
*
|
|
1691
|
+
* Normally the incremental build logic will rebuild changed projects as well as
|
|
1692
|
+
* any projects that directly or indirectly depend on a changed project.
|
|
1693
|
+
* If true, then the incremental build logic will only rebuild changed projects and
|
|
1694
|
+
* ignore dependent projects.
|
|
1696
1695
|
*/
|
|
1697
|
-
|
|
1696
|
+
readonly changedProjectsOnly: boolean;
|
|
1698
1697
|
}
|
|
1699
1698
|
|
|
1700
1699
|
/**
|
|
@@ -1743,13 +1742,6 @@ export declare interface IOperationSettings {
|
|
|
1743
1742
|
* calculating final hash value when reading and writing the build cache
|
|
1744
1743
|
*/
|
|
1745
1744
|
dependsOnAdditionalFiles?: string[];
|
|
1746
|
-
/**
|
|
1747
|
-
* When running this operation in watch mode, enable IPC functionality. This allows reusing a long-lived child
|
|
1748
|
-
* process instead of spawning a new child process for each incremental build.
|
|
1749
|
-
*
|
|
1750
|
-
* Implicitly disables the build cache for this operation.
|
|
1751
|
-
*/
|
|
1752
|
-
useIPCInWatchMode?: boolean;
|
|
1753
1745
|
}
|
|
1754
1746
|
|
|
1755
1747
|
/**
|
|
@@ -2028,6 +2020,10 @@ declare interface IRushConfigurationProjectOptions {
|
|
|
2028
2020
|
* If specified, validate project tags against this list.
|
|
2029
2021
|
*/
|
|
2030
2022
|
allowedProjectTags: Set<string> | undefined;
|
|
2023
|
+
/**
|
|
2024
|
+
* The containing subspace.
|
|
2025
|
+
*/
|
|
2026
|
+
subspace: Subspace;
|
|
2031
2027
|
}
|
|
2032
2028
|
|
|
2033
2029
|
/**
|
|
@@ -2168,6 +2164,15 @@ export declare interface IStopwatchResult {
|
|
|
2168
2164
|
get endTime(): number | undefined;
|
|
2169
2165
|
}
|
|
2170
2166
|
|
|
2167
|
+
/**
|
|
2168
|
+
* @internal
|
|
2169
|
+
*/
|
|
2170
|
+
declare interface ISubspaceOptions {
|
|
2171
|
+
subspaceName: string;
|
|
2172
|
+
rushConfiguration: RushConfiguration;
|
|
2173
|
+
splitWorkspaceCompatibility: boolean;
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2171
2176
|
/**
|
|
2172
2177
|
* @beta
|
|
2173
2178
|
*/
|
|
@@ -2727,12 +2732,24 @@ export declare class PackageJsonDependency {
|
|
|
2727
2732
|
setVersion(newVersion: string): void;
|
|
2728
2733
|
}
|
|
2729
2734
|
|
|
2735
|
+
/**
|
|
2736
|
+
* @public
|
|
2737
|
+
*/
|
|
2738
|
+
export declare class PackageJsonDependencyMeta {
|
|
2739
|
+
private _injected;
|
|
2740
|
+
private _onChange;
|
|
2741
|
+
readonly name: string;
|
|
2742
|
+
constructor(name: string, injected: boolean, onChange: () => void);
|
|
2743
|
+
get injected(): boolean;
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2730
2746
|
/**
|
|
2731
2747
|
* @public
|
|
2732
2748
|
*/
|
|
2733
2749
|
export declare class PackageJsonEditor {
|
|
2734
2750
|
private readonly _dependencies;
|
|
2735
2751
|
private readonly _devDependencies;
|
|
2752
|
+
private readonly _dependenciesMeta;
|
|
2736
2753
|
private readonly _resolutions;
|
|
2737
2754
|
private _modified;
|
|
2738
2755
|
private _sourceData;
|
|
@@ -2753,6 +2770,10 @@ export declare class PackageJsonEditor {
|
|
|
2753
2770
|
* The list of dependencies of type DependencyType.Dev.
|
|
2754
2771
|
*/
|
|
2755
2772
|
get devDependencyList(): ReadonlyArray<PackageJsonDependency>;
|
|
2773
|
+
/**
|
|
2774
|
+
* The list of dependenciesMeta in package.json.
|
|
2775
|
+
*/
|
|
2776
|
+
get dependencyMetaList(): ReadonlyArray<PackageJsonDependencyMeta>;
|
|
2756
2777
|
/**
|
|
2757
2778
|
* This field is a Yarn-specific feature that allows overriding of package resolution.
|
|
2758
2779
|
*
|
|
@@ -3162,7 +3183,6 @@ export declare class ProjectChangeAnalyzer {
|
|
|
3162
3183
|
*/
|
|
3163
3184
|
export declare class RepoStateFile {
|
|
3164
3185
|
private static _jsonSchema;
|
|
3165
|
-
private _variant;
|
|
3166
3186
|
private _pnpmShrinkwrapHash;
|
|
3167
3187
|
private _preferredVersionsHash;
|
|
3168
3188
|
private _isValid;
|
|
@@ -3191,16 +3211,18 @@ export declare class RepoStateFile {
|
|
|
3191
3211
|
* @param jsonFilename - The path to the repo-state.json file.
|
|
3192
3212
|
* @param variant - The variant currently being used by Rush.
|
|
3193
3213
|
*/
|
|
3194
|
-
static loadFromFile(jsonFilename: string
|
|
3214
|
+
static loadFromFile(jsonFilename: string): RepoStateFile;
|
|
3195
3215
|
/**
|
|
3196
3216
|
* Refresh the data contained in repo-state.json using the current state
|
|
3197
3217
|
* of the Rush repo, and save the file if changes were made.
|
|
3198
3218
|
*
|
|
3199
3219
|
* @param rushConfiguration - The Rush configuration for the repo.
|
|
3220
|
+
* @param subspace - The subspace that repo-state.json was loaded from,
|
|
3221
|
+
* or `undefined` for the default subspace.
|
|
3200
3222
|
*
|
|
3201
3223
|
* @returns true if the file was modified, otherwise false.
|
|
3202
3224
|
*/
|
|
3203
|
-
refreshState(rushConfiguration: RushConfiguration): boolean;
|
|
3225
|
+
refreshState(rushConfiguration: RushConfiguration, subspace: Subspace | undefined): boolean;
|
|
3204
3226
|
/**
|
|
3205
3227
|
* Writes the "repo-state.json" file to disk, using the filename that was passed to loadFromFile().
|
|
3206
3228
|
*/
|
|
@@ -3281,8 +3303,9 @@ export declare class RushConfiguration {
|
|
|
3281
3303
|
private _projects;
|
|
3282
3304
|
private _projectsByName;
|
|
3283
3305
|
private _projectsByTag;
|
|
3284
|
-
private _rushProjectsBySubspaceName;
|
|
3285
3306
|
private _commonVersionsConfigurationsByVariant;
|
|
3307
|
+
private readonly _subspacesByName;
|
|
3308
|
+
private readonly _subspaces;
|
|
3286
3309
|
/**
|
|
3287
3310
|
* The name of the package manager being used to install dependencies
|
|
3288
3311
|
*/
|
|
@@ -3372,29 +3395,15 @@ export declare class RushConfiguration {
|
|
|
3372
3395
|
* Example: `npm-shrinkwrap.json` or `pnpm-lock.yaml`
|
|
3373
3396
|
*/
|
|
3374
3397
|
readonly shrinkwrapFilename: string;
|
|
3375
|
-
/**
|
|
3376
|
-
* The full path of the temporary shrinkwrap file that is used during "rush install".
|
|
3377
|
-
* This file may get rewritten by the package manager during installation.
|
|
3378
|
-
* @remarks
|
|
3379
|
-
* This property merely reports the filename; the file itself may not actually exist.
|
|
3380
|
-
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap.json` or `C:\MyRepo\common\temp\pnpm-lock.yaml`
|
|
3381
|
-
*/
|
|
3382
|
-
readonly tempShrinkwrapFilename: string;
|
|
3383
|
-
/**
|
|
3384
|
-
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
|
|
3385
|
-
* before installation begins, and can be compared to determine how the package manager
|
|
3386
|
-
* modified tempShrinkwrapFilename.
|
|
3387
|
-
* @remarks
|
|
3388
|
-
* This property merely reports the filename; the file itself may not actually exist.
|
|
3389
|
-
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap-preinstall.json`
|
|
3390
|
-
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
3391
|
-
*/
|
|
3392
|
-
readonly tempShrinkwrapPreinstallFilename: string;
|
|
3393
3398
|
/**
|
|
3394
3399
|
* The object that specifies subspace configurations if they are provided in the rush workspace.
|
|
3395
3400
|
* @beta
|
|
3396
3401
|
*/
|
|
3397
|
-
readonly
|
|
3402
|
+
readonly subspacesConfiguration: SubspacesConfiguration | undefined;
|
|
3403
|
+
/**
|
|
3404
|
+
* Returns true if subspaces.json is present with "enabled=true".
|
|
3405
|
+
*/
|
|
3406
|
+
readonly subspacesFeatureEnabled: boolean;
|
|
3398
3407
|
/**
|
|
3399
3408
|
* The filename of the variant dependency data file. By default this is
|
|
3400
3409
|
* called 'current-variant.json' resides in the Rush common folder.
|
|
@@ -3623,35 +3632,27 @@ export declare class RushConfiguration {
|
|
|
3623
3632
|
*/
|
|
3624
3633
|
get rushPluginOptionsFolder(): string;
|
|
3625
3634
|
/**
|
|
3626
|
-
* The full path of the shrinkwrap file that is
|
|
3627
|
-
*
|
|
3635
|
+
* The full path of the temporary shrinkwrap file that is used during "rush install".
|
|
3636
|
+
* This file may get rewritten by the package manager during installation.
|
|
3628
3637
|
* @remarks
|
|
3629
3638
|
* This property merely reports the filename; the file itself may not actually exist.
|
|
3630
|
-
* Example: `C:\MyRepo\common\npm-shrinkwrap.json` or `C:\MyRepo\common\pnpm-lock.yaml`
|
|
3639
|
+
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap.json` or `C:\MyRepo\common\temp\pnpm-lock.yaml`
|
|
3631
3640
|
*
|
|
3632
|
-
* @deprecated
|
|
3633
|
-
* shrinkwrap file name for a given active variant.
|
|
3641
|
+
* @deprecated Introduced with subspaces is subspace specific tempShrinkwrapFilename accessible from the Subspace class.
|
|
3634
3642
|
*/
|
|
3635
|
-
get
|
|
3643
|
+
get tempShrinkwrapFilename(): string;
|
|
3636
3644
|
/**
|
|
3637
|
-
*
|
|
3638
|
-
*
|
|
3639
|
-
*
|
|
3640
|
-
* This function also consults the deprecated option to allow for shrinkwraps to be stored under a package folder.
|
|
3641
|
-
* This shrinkwrap file is used during "rush install", and may be rewritten by the package manager during installation
|
|
3642
|
-
* This property merely reports the filename, the file itself may not actually exist.
|
|
3643
|
-
* example: `C:\MyRepo\common\<subspace_name>\pnpm-lock.yaml`
|
|
3644
|
-
* @beta
|
|
3645
|
-
*/
|
|
3646
|
-
getTempSubspaceShrinkwrapFileName(subspaceName: string): string;
|
|
3647
|
-
/**
|
|
3648
|
-
* The filename (without any path) of the shrinkwrap file used for individual subspaces, used by the package manager.
|
|
3645
|
+
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
|
|
3646
|
+
* before installation begins, and can be compared to determine how the package manager
|
|
3647
|
+
* modified tempShrinkwrapFilename.
|
|
3649
3648
|
* @remarks
|
|
3650
|
-
* This property merely reports the filename;
|
|
3651
|
-
* Example:
|
|
3652
|
-
*
|
|
3649
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
3650
|
+
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap-preinstall.json`
|
|
3651
|
+
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
3652
|
+
*
|
|
3653
|
+
* @deprecated Introduced with subspaces is subspace specific tempShrinkwrapPreinstallFilename accessible from the Subspace class.
|
|
3653
3654
|
*/
|
|
3654
|
-
|
|
3655
|
+
get tempShrinkwrapPreinstallFilename(): string;
|
|
3655
3656
|
/**
|
|
3656
3657
|
* Returns an English phrase such as "shrinkwrap file" that can be used in logging messages
|
|
3657
3658
|
* to refer to the shrinkwrap file using appropriate terminology for the currently selected
|
|
@@ -3674,15 +3675,32 @@ export declare class RushConfiguration {
|
|
|
3674
3675
|
*/
|
|
3675
3676
|
get repositoryDefaultFullyQualifiedRemoteBranch(): string;
|
|
3676
3677
|
get projects(): RushConfigurationProject[];
|
|
3678
|
+
/**
|
|
3679
|
+
* @beta
|
|
3680
|
+
*/
|
|
3681
|
+
get defaultSubspace(): Subspace;
|
|
3677
3682
|
/**
|
|
3678
3683
|
* A list of all the available subspaces in this workspace.
|
|
3679
3684
|
* @beta
|
|
3680
3685
|
*/
|
|
3681
|
-
get
|
|
3686
|
+
get subspaces(): readonly Subspace[];
|
|
3687
|
+
/**
|
|
3688
|
+
* @beta
|
|
3689
|
+
*/
|
|
3690
|
+
tryGetSubspace(subspaceName: string): Subspace | undefined;
|
|
3682
3691
|
/**
|
|
3683
3692
|
* @beta
|
|
3684
3693
|
*/
|
|
3685
|
-
|
|
3694
|
+
getSubspace(subspaceName: string): Subspace;
|
|
3695
|
+
/**
|
|
3696
|
+
* Returns the set of subspaces that the given projects belong to
|
|
3697
|
+
* @beta
|
|
3698
|
+
*/
|
|
3699
|
+
getSubspacesForProjects(projects: ReadonlySet<RushConfigurationProject>): ReadonlySet<Subspace>;
|
|
3700
|
+
/**
|
|
3701
|
+
* @beta
|
|
3702
|
+
*/
|
|
3703
|
+
get projectsByName(): ReadonlyMap<string, RushConfigurationProject>;
|
|
3686
3704
|
/**
|
|
3687
3705
|
* Obtains the mapping from custom tags to projects.
|
|
3688
3706
|
* @beta
|
|
@@ -3707,21 +3725,13 @@ export declare class RushConfiguration {
|
|
|
3707
3725
|
*/
|
|
3708
3726
|
get currentInstalledVariant(): string | undefined;
|
|
3709
3727
|
/**
|
|
3710
|
-
*
|
|
3711
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
3712
|
-
*/
|
|
3713
|
-
getCommonVersionsFilePath(variant?: string | undefined): string;
|
|
3714
|
-
/**
|
|
3715
|
-
* Returns `true` if the subspaces feature is enabled and at least one subspaces is defined
|
|
3716
|
-
* in the `subspaces.json` config file.
|
|
3717
|
-
* @beta
|
|
3728
|
+
* @deprecated Use {@link Subspace.getCommonVersionsFilePath} instead
|
|
3718
3729
|
*/
|
|
3719
|
-
|
|
3730
|
+
getCommonVersionsFilePath(subspace?: Subspace): string;
|
|
3720
3731
|
/**
|
|
3721
|
-
*
|
|
3722
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
3732
|
+
* @deprecated Use {@link Subspace.getCommonVersions} instead
|
|
3723
3733
|
*/
|
|
3724
|
-
getCommonVersions(
|
|
3734
|
+
getCommonVersions(subspace?: Subspace): CommonVersionsConfiguration;
|
|
3725
3735
|
/**
|
|
3726
3736
|
* Returns a map of all direct dependencies that only have a single semantic version specifier.
|
|
3727
3737
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -3730,27 +3740,21 @@ export declare class RushConfiguration {
|
|
|
3730
3740
|
*/
|
|
3731
3741
|
getImplicitlyPreferredVersions(variant?: string | undefined): Map<string, string>;
|
|
3732
3742
|
/**
|
|
3733
|
-
*
|
|
3734
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
3743
|
+
* @deprecated Use {@link Subspace.getRepoStateFilePath} instead
|
|
3735
3744
|
*/
|
|
3736
|
-
getRepoStateFilePath(
|
|
3745
|
+
getRepoStateFilePath(subspace?: Subspace): string;
|
|
3737
3746
|
/**
|
|
3738
|
-
*
|
|
3739
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
3747
|
+
* @deprecated Use {@link Subspace.getRepoState} instead
|
|
3740
3748
|
*/
|
|
3741
|
-
getRepoState(
|
|
3749
|
+
getRepoState(subspace?: Subspace): RepoStateFile;
|
|
3742
3750
|
/**
|
|
3743
|
-
*
|
|
3744
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
3751
|
+
* @deprecated Use {@link Subspace.getCommittedShrinkwrapFilename} instead
|
|
3745
3752
|
*/
|
|
3746
|
-
getCommittedShrinkwrapFilename(
|
|
3753
|
+
getCommittedShrinkwrapFilename(subspace?: Subspace): string;
|
|
3747
3754
|
/**
|
|
3748
|
-
*
|
|
3749
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
3750
|
-
* @remarks
|
|
3751
|
-
* The file path is returned even if PNPM is not configured as the package manager.
|
|
3755
|
+
* @deprecated Use {@link Subspace.getRepoStateFilePath} instead
|
|
3752
3756
|
*/
|
|
3753
|
-
getPnpmfilePath(
|
|
3757
|
+
getPnpmfilePath(subspace?: Subspace): string;
|
|
3754
3758
|
/**
|
|
3755
3759
|
* Looks up a project in the projectsByName map. If the project is not found,
|
|
3756
3760
|
* then undefined is returned.
|
|
@@ -3778,7 +3782,6 @@ export declare class RushConfiguration {
|
|
|
3778
3782
|
* If the path is not under any project's folder, returns undefined.
|
|
3779
3783
|
*/
|
|
3780
3784
|
tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
|
|
3781
|
-
private _getVariantConfigFolderPath;
|
|
3782
3785
|
}
|
|
3783
3786
|
|
|
3784
3787
|
/**
|
|
@@ -3827,6 +3830,11 @@ export declare class RushConfigurationProject {
|
|
|
3827
3830
|
* The Rush configuration for the monorepo that the project belongs to.
|
|
3828
3831
|
*/
|
|
3829
3832
|
readonly rushConfiguration: RushConfiguration;
|
|
3833
|
+
/**
|
|
3834
|
+
* Returns the subspace name that a project belongs to.
|
|
3835
|
+
* If subspaces is not enabled, returns the default subspace.
|
|
3836
|
+
*/
|
|
3837
|
+
readonly subspace: Subspace;
|
|
3830
3838
|
/**
|
|
3831
3839
|
* The review category name, or undefined if no category was assigned.
|
|
3832
3840
|
* This name must be one of the valid choices listed in RushConfiguration.reviewCategories.
|
|
@@ -3895,17 +3903,13 @@ export declare class RushConfigurationProject {
|
|
|
3895
3903
|
*/
|
|
3896
3904
|
readonly tags: ReadonlySet<string>;
|
|
3897
3905
|
/**
|
|
3898
|
-
* Returns the
|
|
3899
|
-
*
|
|
3900
|
-
*
|
|
3901
|
-
* @remarks
|
|
3902
|
-
* If the Rush subspaces feature is disabled, the value is still return.
|
|
3903
|
-
* When the Rush subspaces feature is enabled, an undefined `subspaceName` specifies that
|
|
3904
|
-
* the project belongs to the default subspace (whose name is `"default"`).
|
|
3906
|
+
* Returns the subspace name specified in the `"subspaceName"` field in `rush.json`.
|
|
3907
|
+
* Note that this field may be undefined, if the `default` subspace is being used,
|
|
3908
|
+
* and this field may be ignored if the subspaces feature is disabled.
|
|
3905
3909
|
*
|
|
3906
3910
|
* @beta
|
|
3907
3911
|
*/
|
|
3908
|
-
readonly
|
|
3912
|
+
readonly configuredSubspaceName: string | undefined;
|
|
3909
3913
|
/** @internal */
|
|
3910
3914
|
constructor(options: IRushConfigurationProjectOptions);
|
|
3911
3915
|
/**
|
|
@@ -4047,6 +4051,10 @@ export declare class RushConstants {
|
|
|
4047
4051
|
* The filename (".pnpmfile.cjs") used to add custom configuration to PNPM (PNPM version 6.x and later).
|
|
4048
4052
|
*/
|
|
4049
4053
|
static readonly pnpmfileV6Filename: string;
|
|
4054
|
+
/**
|
|
4055
|
+
* The filename ("global-pnpmfile.cjs") used to add custom configuration to subspaces
|
|
4056
|
+
*/
|
|
4057
|
+
static readonly pnpmfileGlobalFilename: string;
|
|
4050
4058
|
/**
|
|
4051
4059
|
* The folder name used to store patch files for pnpm
|
|
4052
4060
|
* Example: `C:\MyRepo\common\config\pnpm-patches`
|
|
@@ -4121,6 +4129,10 @@ export declare class RushConstants {
|
|
|
4121
4129
|
* The subspaces.json configuration file name
|
|
4122
4130
|
*/
|
|
4123
4131
|
static readonly subspacesConfigFilename: string;
|
|
4132
|
+
/**
|
|
4133
|
+
* The name of the default subspace if one isn't specified but subspaces is enabled.
|
|
4134
|
+
*/
|
|
4135
|
+
static readonly defaultSubspaceName: string;
|
|
4124
4136
|
/**
|
|
4125
4137
|
* Build cache configuration file.
|
|
4126
4138
|
*/
|
|
@@ -4385,24 +4397,158 @@ export declare class RushUserConfiguration {
|
|
|
4385
4397
|
static getRushUserFolderPath(): string;
|
|
4386
4398
|
}
|
|
4387
4399
|
|
|
4400
|
+
/**
|
|
4401
|
+
* This represents the subspace configurations for a repository, based on the "subspaces.json"
|
|
4402
|
+
* configuration file.
|
|
4403
|
+
* @public
|
|
4404
|
+
*/
|
|
4405
|
+
export declare class Subspace {
|
|
4406
|
+
readonly subspaceName: string;
|
|
4407
|
+
private readonly _rushConfiguration;
|
|
4408
|
+
private readonly _projects;
|
|
4409
|
+
private readonly _splitWorkspaceCompatibility;
|
|
4410
|
+
private _commonVersionsConfiguration;
|
|
4411
|
+
private _detail;
|
|
4412
|
+
constructor(options: ISubspaceOptions);
|
|
4413
|
+
/**
|
|
4414
|
+
* Returns the list of projects belonging to this subspace.
|
|
4415
|
+
* @beta
|
|
4416
|
+
*/
|
|
4417
|
+
getProjects(): RushConfigurationProject[];
|
|
4418
|
+
private _ensureDetail;
|
|
4419
|
+
/**
|
|
4420
|
+
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
4421
|
+
*
|
|
4422
|
+
* Example: `common/config/subspaces/my-subspace`
|
|
4423
|
+
* @beta
|
|
4424
|
+
*/
|
|
4425
|
+
getSubspaceConfigFolder(): string;
|
|
4426
|
+
/**
|
|
4427
|
+
* The folder where the subspace's node_modules and other temporary files will be stored.
|
|
4428
|
+
*
|
|
4429
|
+
* Example: `common/temp/subspaces/my-subspace`
|
|
4430
|
+
* @beta
|
|
4431
|
+
*/
|
|
4432
|
+
getSubspaceTempFolder(): string;
|
|
4433
|
+
/**
|
|
4434
|
+
* Returns full path of the temporary shrinkwrap file for a specific subspace and returns the common workspace
|
|
4435
|
+
* shrinkwrap if no subspaceName is provided.
|
|
4436
|
+
* @remarks
|
|
4437
|
+
* This function takes the subspace name, and returns the full path for the subspace's shrinkwrap file.
|
|
4438
|
+
* This function also consults the deprecated option to allow for shrinkwraps to be stored under a package folder.
|
|
4439
|
+
* This shrinkwrap file is used during "rush install", and may be rewritten by the package manager during installation
|
|
4440
|
+
* This property merely reports the filename, the file itself may not actually exist.
|
|
4441
|
+
* example: `C:\MyRepo\common\<subspace_name>\pnpm-lock.yaml`
|
|
4442
|
+
* @beta
|
|
4443
|
+
*/
|
|
4444
|
+
getTempShrinkwrapFilename(): string;
|
|
4445
|
+
/**
|
|
4446
|
+
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
|
|
4447
|
+
* before installation begins, and can be compared to determine how the package manager
|
|
4448
|
+
* modified tempShrinkwrapFilename.
|
|
4449
|
+
* @remarks
|
|
4450
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
4451
|
+
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap-preinstall.json`
|
|
4452
|
+
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
4453
|
+
* @beta
|
|
4454
|
+
*/
|
|
4455
|
+
getTempShrinkwrapPreinstallFilename(subspaceName?: string | undefined): string;
|
|
4456
|
+
/**
|
|
4457
|
+
* Gets the path to the common-versions.json config file for this subspace.
|
|
4458
|
+
*
|
|
4459
|
+
* Example: `C:\MyRepo\common\subspaces\my-subspace\common-versions.json`
|
|
4460
|
+
* @beta
|
|
4461
|
+
*/
|
|
4462
|
+
getCommonVersionsFilePath(): string;
|
|
4463
|
+
/**
|
|
4464
|
+
* Gets the settings from the common-versions.json config file for a specific variant.
|
|
4465
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
4466
|
+
* @beta
|
|
4467
|
+
*/
|
|
4468
|
+
getCommonVersions(): CommonVersionsConfiguration;
|
|
4469
|
+
/**
|
|
4470
|
+
* Gets the path to the repo-state.json file for a specific variant.
|
|
4471
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
4472
|
+
* @beta
|
|
4473
|
+
*/
|
|
4474
|
+
getRepoStateFilePath(): string;
|
|
4475
|
+
/**
|
|
4476
|
+
* Gets the contents from the repo-state.json file for a specific variant.
|
|
4477
|
+
* @param subspaceName - The name of the subspace in use by the active command.
|
|
4478
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
4479
|
+
* @beta
|
|
4480
|
+
*/
|
|
4481
|
+
getRepoState(): RepoStateFile;
|
|
4482
|
+
/**
|
|
4483
|
+
* Gets the committed shrinkwrap file name for a specific variant.
|
|
4484
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
4485
|
+
* @beta
|
|
4486
|
+
*/
|
|
4487
|
+
getCommittedShrinkwrapFilename(): string;
|
|
4488
|
+
/**
|
|
4489
|
+
* Gets the absolute path for "pnpmfile.js" for a specific subspace.
|
|
4490
|
+
* @param subspace - The name of the current subspace in use by the active command.
|
|
4491
|
+
* @remarks
|
|
4492
|
+
* The file path is returned even if PNPM is not configured as the package manager.
|
|
4493
|
+
* @beta
|
|
4494
|
+
*/
|
|
4495
|
+
getPnpmfilePath(): string;
|
|
4496
|
+
/**
|
|
4497
|
+
* Returns true if the specified project belongs to this subspace.
|
|
4498
|
+
* @beta
|
|
4499
|
+
*/
|
|
4500
|
+
contains(project: RushConfigurationProject): boolean;
|
|
4501
|
+
/** @internal */
|
|
4502
|
+
_addProject(project: RushConfigurationProject): void;
|
|
4503
|
+
}
|
|
4504
|
+
|
|
4388
4505
|
/**
|
|
4389
4506
|
* This represents the subspace configurations for a repository, based on the "subspaces.json"
|
|
4390
4507
|
* configuration file.
|
|
4391
4508
|
* @beta
|
|
4392
4509
|
*/
|
|
4393
|
-
export declare class
|
|
4510
|
+
export declare class SubspacesConfiguration {
|
|
4394
4511
|
private static _jsonSchema;
|
|
4395
4512
|
/**
|
|
4396
4513
|
* The absolute path to the "subspaces.json" configuration file that was loaded to construct this object.
|
|
4397
4514
|
*/
|
|
4398
4515
|
readonly subspaceJsonFilePath: string;
|
|
4516
|
+
/**
|
|
4517
|
+
* Determines if the subspace feature is enabled
|
|
4518
|
+
*/
|
|
4519
|
+
readonly enabled: boolean;
|
|
4520
|
+
/**
|
|
4521
|
+
* This determines if the subspaces feature supports adding configuration files under the project folder itself
|
|
4522
|
+
*/
|
|
4523
|
+
readonly splitWorkspaceCompatibility: boolean;
|
|
4399
4524
|
/**
|
|
4400
4525
|
* A set of the available subspaces
|
|
4401
4526
|
*/
|
|
4402
|
-
readonly subspaceNames:
|
|
4527
|
+
readonly subspaceNames: ReadonlySet<string>;
|
|
4403
4528
|
private constructor();
|
|
4404
|
-
|
|
4405
|
-
|
|
4529
|
+
/**
|
|
4530
|
+
* Checks whether the provided string could be used as a subspace name.
|
|
4531
|
+
* Returns `undefined` if the name is valid; otherwise returns an error message.
|
|
4532
|
+
* @remarks
|
|
4533
|
+
* This is a syntax check only; it does not test whether the subspace is actually defined in the Rush configuration.
|
|
4534
|
+
*/
|
|
4535
|
+
static explainIfInvalidSubspaceName(subspaceName: string, splitWorkspaceCompatibility?: boolean): string | undefined;
|
|
4536
|
+
/**
|
|
4537
|
+
* Checks whether the provided string could be used as a subspace name.
|
|
4538
|
+
* If not, an exception is thrown.
|
|
4539
|
+
* @remarks
|
|
4540
|
+
* This is a syntax check only; it does not test whether the subspace is actually defined in the Rush configuration.
|
|
4541
|
+
*/
|
|
4542
|
+
static requireValidSubspaceName(subspaceName: string, splitWorkspaceCompatibility?: boolean): void;
|
|
4543
|
+
static tryLoadFromConfigurationFile(subspaceJsonFilePath: string): SubspacesConfiguration | undefined;
|
|
4544
|
+
static tryLoadFromDefaultLocation(rushConfiguration: RushConfiguration): SubspacesConfiguration | undefined;
|
|
4545
|
+
/**
|
|
4546
|
+
* Returns a name of the form `_RUSH_SUBSPACE_XYZ_TEMP_FOLDER` where `XYZ` is
|
|
4547
|
+
* derived from the subspace name.
|
|
4548
|
+
*
|
|
4549
|
+
* @internal
|
|
4550
|
+
*/
|
|
4551
|
+
static _convertNameToEnvironmentVariable(subspaceName: string, splitWorkspaceCompatibility: boolean): string;
|
|
4406
4552
|
}
|
|
4407
4553
|
|
|
4408
4554
|
declare enum VersionFormatForCommit {
|
|
@@ -4513,7 +4659,7 @@ export declare class VersionPolicyConfiguration {
|
|
|
4513
4659
|
/**
|
|
4514
4660
|
* Validate the version policy configuration against the rush config
|
|
4515
4661
|
*/
|
|
4516
|
-
validate(projectsByName:
|
|
4662
|
+
validate(projectsByName: ReadonlyMap<string, RushConfigurationProject>): void;
|
|
4517
4663
|
/**
|
|
4518
4664
|
* Gets the version policy by its name.
|
|
4519
4665
|
* Throws error if the version policy is not found.
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type JsonObject } from '@rushstack/node-core-library';
|
|
2
2
|
import type { RushConfiguration } from './RushConfiguration';
|
|
3
|
+
import type { Subspace } from './Subspace';
|
|
3
4
|
export declare const LAST_INSTALL_FLAG_FILE_NAME: string;
|
|
4
5
|
/**
|
|
5
6
|
* @internal
|
|
@@ -68,6 +69,6 @@ export declare class LastInstallFlagFactory {
|
|
|
68
69
|
*
|
|
69
70
|
* @internal
|
|
70
71
|
*/
|
|
71
|
-
static getCommonTempFlag(rushConfiguration: RushConfiguration, extraState?: Record<string, string>): LastInstallFlag;
|
|
72
|
+
static getCommonTempFlag(rushConfiguration: RushConfiguration, subspace: Subspace, extraState?: Record<string, string>): LastInstallFlag;
|
|
72
73
|
}
|
|
73
74
|
//# sourceMappingURL=LastInstallFlag.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LastInstallFlag } from './LastInstallFlag';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Subspace } from './Subspace';
|
|
3
3
|
export declare const LAST_LINK_FLAG_FILE_NAME: string;
|
|
4
4
|
/**
|
|
5
5
|
* A helper class for managing the last-link flag, which is persistent and
|
|
@@ -36,6 +36,6 @@ export declare class LastLinkFlagFactory {
|
|
|
36
36
|
*
|
|
37
37
|
* @internal
|
|
38
38
|
*/
|
|
39
|
-
static getCommonTempFlag(
|
|
39
|
+
static getCommonTempFlag(subspace: Subspace): LastLinkFlag;
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=LastLinkFlag.d.ts.map
|
|
@@ -21,12 +21,23 @@ export declare class PackageJsonDependency {
|
|
|
21
21
|
get version(): string;
|
|
22
22
|
setVersion(newVersion: string): void;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export declare class PackageJsonDependencyMeta {
|
|
28
|
+
private _injected;
|
|
29
|
+
private _onChange;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
constructor(name: string, injected: boolean, onChange: () => void);
|
|
32
|
+
get injected(): boolean;
|
|
33
|
+
}
|
|
24
34
|
/**
|
|
25
35
|
* @public
|
|
26
36
|
*/
|
|
27
37
|
export declare class PackageJsonEditor {
|
|
28
38
|
private readonly _dependencies;
|
|
29
39
|
private readonly _devDependencies;
|
|
40
|
+
private readonly _dependenciesMeta;
|
|
30
41
|
private readonly _resolutions;
|
|
31
42
|
private _modified;
|
|
32
43
|
private _sourceData;
|
|
@@ -47,6 +58,10 @@ export declare class PackageJsonEditor {
|
|
|
47
58
|
* The list of dependencies of type DependencyType.Dev.
|
|
48
59
|
*/
|
|
49
60
|
get devDependencyList(): ReadonlyArray<PackageJsonDependency>;
|
|
61
|
+
/**
|
|
62
|
+
* The list of dependenciesMeta in package.json.
|
|
63
|
+
*/
|
|
64
|
+
get dependencyMetaList(): ReadonlyArray<PackageJsonDependencyMeta>;
|
|
50
65
|
/**
|
|
51
66
|
* This field is a Yarn-specific feature that allows overriding of package resolution.
|
|
52
67
|
*
|