@rushstack/rush-sdk 5.157.0 → 5.158.1-pr5355.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 +88 -49
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/CommandLineJson.d.ts +2 -0
- package/lib/api/Subspace.d.ts +17 -10
- package/lib/api/VersionPolicy.d.ts +24 -28
- package/lib/api/VersionPolicyConfiguration.d.ts +30 -8
- package/lib/cli/scriptActions/PhasedScriptAction.d.ts +6 -1
- package/lib/index.d.ts +1 -1
- package/lib/logic/DependencySpecifier.d.ts +11 -0
- package/lib/logic/operations/IPCOperationRunner.d.ts +2 -1
- package/lib/logic/operations/OperationExecutionManager.d.ts +4 -1
- package/lib/logic/operations/OperationStatus.d.ts +5 -1
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +6 -2
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +4 -0
- package/lib/pluginFramework/RushLifeCycle.d.ts +6 -0
- package/package.json +12 -12
package/dist/rush-lib.d.ts
CHANGED
|
@@ -1428,6 +1428,10 @@ export declare interface IExecuteOperationsContext extends ICreateOperationsCont
|
|
|
1428
1428
|
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
|
|
1429
1429
|
*/
|
|
1430
1430
|
readonly inputsSnapshot?: IInputsSnapshot;
|
|
1431
|
+
/**
|
|
1432
|
+
* An abort controller that can be used to abort the current set of queued operations.
|
|
1433
|
+
*/
|
|
1434
|
+
readonly abortController: AbortController;
|
|
1431
1435
|
}
|
|
1432
1436
|
|
|
1433
1437
|
/**
|
|
@@ -1612,7 +1616,12 @@ export declare interface IGetChangedProjectsOptions {
|
|
|
1612
1616
|
export declare interface IGlobalCommand extends IRushCommand {
|
|
1613
1617
|
}
|
|
1614
1618
|
|
|
1615
|
-
|
|
1619
|
+
/**
|
|
1620
|
+
* This interface represents the raw individual version policy JSON object which extends the base version policy
|
|
1621
|
+
* with additional fields specific to individual versioning.
|
|
1622
|
+
* @public
|
|
1623
|
+
*/
|
|
1624
|
+
export declare interface IIndividualVersionJson extends IVersionPolicyJson {
|
|
1616
1625
|
lockedMajor?: number;
|
|
1617
1626
|
}
|
|
1618
1627
|
|
|
@@ -1697,7 +1706,12 @@ declare interface ILocalBuildCacheJson extends IBaseBuildCacheJson {
|
|
|
1697
1706
|
readonly cacheProvider: 'local-only';
|
|
1698
1707
|
}
|
|
1699
1708
|
|
|
1700
|
-
|
|
1709
|
+
/**
|
|
1710
|
+
* This interface represents the raw lock-step version policy JSON object which extends the base version policy
|
|
1711
|
+
* with additional fields specific to lock-step versioning.
|
|
1712
|
+
* @public
|
|
1713
|
+
*/
|
|
1714
|
+
export declare interface ILockStepVersionJson extends IVersionPolicyJson {
|
|
1701
1715
|
version: string;
|
|
1702
1716
|
nextBump?: string;
|
|
1703
1717
|
mainProject?: string;
|
|
@@ -1756,19 +1770,17 @@ export declare interface ILogger {
|
|
|
1756
1770
|
*/
|
|
1757
1771
|
export declare class IndividualVersionPolicy extends VersionPolicy {
|
|
1758
1772
|
/**
|
|
1759
|
-
*
|
|
1773
|
+
* @internal
|
|
1760
1774
|
*/
|
|
1761
|
-
readonly
|
|
1775
|
+
readonly _json: IIndividualVersionJson;
|
|
1762
1776
|
/**
|
|
1763
|
-
*
|
|
1777
|
+
* The major version that has been locked
|
|
1764
1778
|
*/
|
|
1765
|
-
|
|
1779
|
+
get lockedMajor(): number | undefined;
|
|
1766
1780
|
/**
|
|
1767
|
-
* Serialized json for this policy
|
|
1768
|
-
*
|
|
1769
1781
|
* @internal
|
|
1770
1782
|
*/
|
|
1771
|
-
|
|
1783
|
+
constructor(versionPolicyJson: IIndividualVersionJson);
|
|
1772
1784
|
/**
|
|
1773
1785
|
* Returns an updated package json that satisfies the version policy.
|
|
1774
1786
|
*
|
|
@@ -2181,6 +2193,12 @@ export declare interface IPhasedCommand extends IRushCommand {
|
|
|
2181
2193
|
* @alpha
|
|
2182
2194
|
*/
|
|
2183
2195
|
readonly hooks: PhasedCommandHooks;
|
|
2196
|
+
/**
|
|
2197
|
+
* An abort controller that can be used to abort the command.
|
|
2198
|
+
* Long-lived plugins should listen to the signal to handle any cleanup logic.
|
|
2199
|
+
* @alpha
|
|
2200
|
+
*/
|
|
2201
|
+
readonly sessionAbortController: AbortController;
|
|
2184
2202
|
}
|
|
2185
2203
|
|
|
2186
2204
|
/**
|
|
@@ -2765,12 +2783,24 @@ export declare interface ITryFindRushJsonLocationOptions {
|
|
|
2765
2783
|
startingFolder?: string;
|
|
2766
2784
|
}
|
|
2767
2785
|
|
|
2786
|
+
/**
|
|
2787
|
+
* This interface represents the `dependencies` field in a version policy JSON object,
|
|
2788
|
+
* allowing repo maintainers to specify how dependencies' versions should be handled
|
|
2789
|
+
* during publishing and committing.
|
|
2790
|
+
* @public
|
|
2791
|
+
*/
|
|
2768
2792
|
declare interface IVersionPolicyDependencyJson {
|
|
2769
2793
|
versionFormatForPublish?: VersionFormatForPublish;
|
|
2770
2794
|
versionFormatForCommit?: VersionFormatForCommit;
|
|
2771
2795
|
}
|
|
2772
2796
|
|
|
2773
|
-
|
|
2797
|
+
/**
|
|
2798
|
+
* This interface represents the raw version policy JSON object which allows repo
|
|
2799
|
+
* maintainers to define how different groups of projects will be published by Rush,
|
|
2800
|
+
* and how their version numbers will be determined.
|
|
2801
|
+
* @public
|
|
2802
|
+
*/
|
|
2803
|
+
export declare interface IVersionPolicyJson {
|
|
2774
2804
|
policyName: string;
|
|
2775
2805
|
definitionName: string;
|
|
2776
2806
|
dependencies?: IVersionPolicyDependencyJson;
|
|
@@ -2798,18 +2828,22 @@ export declare interface _IYarnOptionsJson extends IPackageManagerOptionsJsonBas
|
|
|
2798
2828
|
* @public
|
|
2799
2829
|
*/
|
|
2800
2830
|
export declare class LockStepVersionPolicy extends VersionPolicy {
|
|
2831
|
+
/**
|
|
2832
|
+
* @internal
|
|
2833
|
+
*/
|
|
2834
|
+
readonly _json: ILockStepVersionJson;
|
|
2801
2835
|
private _version;
|
|
2802
2836
|
/**
|
|
2803
2837
|
* The type of bump for next bump.
|
|
2804
2838
|
*/
|
|
2805
|
-
|
|
2839
|
+
get nextBump(): BumpType | undefined;
|
|
2806
2840
|
/**
|
|
2807
2841
|
* The main project for the version policy.
|
|
2808
2842
|
*
|
|
2809
2843
|
* If the value is provided, change logs will only be generated in that project.
|
|
2810
2844
|
* If the value is not provided, change logs will be hosted in each project associated with the policy.
|
|
2811
2845
|
*/
|
|
2812
|
-
|
|
2846
|
+
get mainProject(): string | undefined;
|
|
2813
2847
|
/**
|
|
2814
2848
|
* @internal
|
|
2815
2849
|
*/
|
|
@@ -2818,12 +2852,6 @@ export declare class LockStepVersionPolicy extends VersionPolicy {
|
|
|
2818
2852
|
* The value of the lockstep version
|
|
2819
2853
|
*/
|
|
2820
2854
|
get version(): string;
|
|
2821
|
-
/**
|
|
2822
|
-
* Serialized json for this policy
|
|
2823
|
-
*
|
|
2824
|
-
* @internal
|
|
2825
|
-
*/
|
|
2826
|
-
get _json(): ILockStepVersionJson;
|
|
2827
2855
|
/**
|
|
2828
2856
|
* Returns an updated package json that satisfies the version policy.
|
|
2829
2857
|
*
|
|
@@ -3085,7 +3113,11 @@ export declare enum OperationStatus {
|
|
|
3085
3113
|
/**
|
|
3086
3114
|
* The Operation was a no-op (for example, it had an empty script)
|
|
3087
3115
|
*/
|
|
3088
|
-
NoOp = "NO OP"
|
|
3116
|
+
NoOp = "NO OP",
|
|
3117
|
+
/**
|
|
3118
|
+
* The Operation was aborted before it could execute.
|
|
3119
|
+
*/
|
|
3120
|
+
Aborted = "ABORTED"
|
|
3089
3121
|
}
|
|
3090
3122
|
|
|
3091
3123
|
/**
|
|
@@ -4926,7 +4958,10 @@ export declare class Subspace {
|
|
|
4926
4958
|
* Returns the full path of the folder containing this subspace's variant-dependent configuration files
|
|
4927
4959
|
* such as `pnpm-lock.yaml`.
|
|
4928
4960
|
*
|
|
4929
|
-
* Example:
|
|
4961
|
+
* Example (variants): `C:\MyRepo\common\config\rush\variants\my-variant`
|
|
4962
|
+
* Example (variants and subspaces): `C:\MyRepo\common\config\subspaces\my-subspace\variants\my-variant`
|
|
4963
|
+
* Example (subspaces): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
4964
|
+
* Example (neither): `C:\MyRepo\common\config\rush`
|
|
4930
4965
|
* @beta
|
|
4931
4966
|
*
|
|
4932
4967
|
* @remarks
|
|
@@ -4939,22 +4974,24 @@ export declare class Subspace {
|
|
|
4939
4974
|
/**
|
|
4940
4975
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
4941
4976
|
*
|
|
4942
|
-
* Example:
|
|
4977
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
4978
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush`
|
|
4943
4979
|
* @beta
|
|
4944
4980
|
*/
|
|
4945
4981
|
getSubspaceConfigFolderPath(): string;
|
|
4946
4982
|
/**
|
|
4947
4983
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
4948
4984
|
*
|
|
4949
|
-
* Example:
|
|
4950
|
-
* Example
|
|
4985
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-patches`
|
|
4986
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\pnpm-patches`
|
|
4951
4987
|
* @beta
|
|
4952
4988
|
*/
|
|
4953
4989
|
getSubspacePnpmPatchesFolderPath(): string;
|
|
4954
4990
|
/**
|
|
4955
|
-
* The folder where the subspace's node_modules and other temporary files will be stored.
|
|
4991
|
+
* The full path of the folder where the subspace's node_modules and other temporary files will be stored.
|
|
4956
4992
|
*
|
|
4957
|
-
* Example:
|
|
4993
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\temp\subspaces\my-subspace`
|
|
4994
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\temp`
|
|
4958
4995
|
* @beta
|
|
4959
4996
|
*/
|
|
4960
4997
|
getSubspaceTempFolderPath(): string;
|
|
@@ -4986,16 +5023,18 @@ export declare class Subspace {
|
|
|
4986
5023
|
*/
|
|
4987
5024
|
getTempShrinkwrapPreinstallFilePath(): string;
|
|
4988
5025
|
/**
|
|
4989
|
-
* Gets the path to the common-versions.json config file for this subspace.
|
|
5026
|
+
* Gets the full path to the common-versions.json config file for this subspace.
|
|
4990
5027
|
*
|
|
4991
|
-
* Example:
|
|
5028
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\common-versions.json`
|
|
5029
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\common-versions.json`
|
|
4992
5030
|
* @beta
|
|
4993
5031
|
*/
|
|
4994
5032
|
getCommonVersionsFilePath(variant?: string): string;
|
|
4995
5033
|
/**
|
|
4996
|
-
* Gets the path to the pnpm-config.json config file for this subspace.
|
|
5034
|
+
* Gets the full path to the pnpm-config.json config file for this subspace.
|
|
4997
5035
|
*
|
|
4998
|
-
* Example:
|
|
5036
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-config.json`
|
|
5037
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\pnpm-config.json`
|
|
4999
5038
|
* @beta
|
|
5000
5039
|
*/
|
|
5001
5040
|
getPnpmConfigFilePath(): string;
|
|
@@ -5096,39 +5135,45 @@ export declare class SubspacesConfiguration {
|
|
|
5096
5135
|
static tryLoadFromDefaultLocation(rushConfiguration: RushConfiguration): SubspacesConfiguration | undefined;
|
|
5097
5136
|
}
|
|
5098
5137
|
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5138
|
+
/**
|
|
5139
|
+
* @public
|
|
5140
|
+
*/
|
|
5141
|
+
declare type VersionFormatForCommit = 'wildcard' | 'original';
|
|
5103
5142
|
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5143
|
+
/**
|
|
5144
|
+
* @public
|
|
5145
|
+
*/
|
|
5146
|
+
declare type VersionFormatForPublish = 'original' | 'exact';
|
|
5108
5147
|
|
|
5109
5148
|
/**
|
|
5110
5149
|
* This is the base class for version policy which controls how versions get bumped.
|
|
5111
5150
|
* @public
|
|
5112
5151
|
*/
|
|
5113
5152
|
export declare abstract class VersionPolicy {
|
|
5114
|
-
|
|
5115
|
-
|
|
5153
|
+
/**
|
|
5154
|
+
* Serialized json for the policy
|
|
5155
|
+
*
|
|
5156
|
+
* @internal
|
|
5157
|
+
*/
|
|
5158
|
+
readonly _json: IVersionPolicyJson;
|
|
5159
|
+
private get _versionFormatForCommit();
|
|
5160
|
+
private get _versionFormatForPublish();
|
|
5116
5161
|
/**
|
|
5117
5162
|
* Version policy name
|
|
5118
5163
|
*/
|
|
5119
|
-
|
|
5164
|
+
get policyName(): string;
|
|
5120
5165
|
/**
|
|
5121
5166
|
* Version policy definition name
|
|
5122
5167
|
*/
|
|
5123
|
-
|
|
5168
|
+
get definitionName(): VersionPolicyDefinitionName;
|
|
5124
5169
|
/**
|
|
5125
5170
|
* Determines if a version policy wants to opt out of changelog files.
|
|
5126
5171
|
*/
|
|
5127
|
-
|
|
5172
|
+
get exemptFromRushChange(): boolean;
|
|
5128
5173
|
/**
|
|
5129
5174
|
* Determines if a version policy wants to opt in to including email.
|
|
5130
5175
|
*/
|
|
5131
|
-
|
|
5176
|
+
get includeEmailInChangeFile(): boolean;
|
|
5132
5177
|
/**
|
|
5133
5178
|
* @internal
|
|
5134
5179
|
*/
|
|
@@ -5159,12 +5204,6 @@ export declare abstract class VersionPolicy {
|
|
|
5159
5204
|
* @param identifier - (optional) override prerelease Id
|
|
5160
5205
|
*/
|
|
5161
5206
|
abstract bump(bumpType?: BumpType, identifier?: string): void;
|
|
5162
|
-
/**
|
|
5163
|
-
* Serialized json for the policy
|
|
5164
|
-
*
|
|
5165
|
-
* @internal
|
|
5166
|
-
*/
|
|
5167
|
-
abstract get _json(): IVersionPolicyJson;
|
|
5168
5207
|
/**
|
|
5169
5208
|
* Validates the specified version and throws if the version does not satisfy the policy.
|
|
5170
5209
|
*
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -19,6 +19,7 @@ export interface IBaseCommandJson {
|
|
|
19
19
|
export interface IBulkCommandJson extends IBaseCommandJson {
|
|
20
20
|
commandKind: 'bulk';
|
|
21
21
|
enableParallelism: boolean;
|
|
22
|
+
allowOversubscription?: boolean;
|
|
22
23
|
ignoreDependencyOrder?: boolean;
|
|
23
24
|
ignoreMissingScript?: boolean;
|
|
24
25
|
incremental?: boolean;
|
|
@@ -33,6 +34,7 @@ export interface IBulkCommandJson extends IBaseCommandJson {
|
|
|
33
34
|
export interface IPhasedCommandWithoutPhasesJson extends IBaseCommandJson {
|
|
34
35
|
commandKind: 'phased';
|
|
35
36
|
enableParallelism: boolean;
|
|
37
|
+
allowOversubscription?: boolean;
|
|
36
38
|
incremental?: boolean;
|
|
37
39
|
}
|
|
38
40
|
/**
|
package/lib/api/Subspace.d.ts
CHANGED
|
@@ -41,7 +41,10 @@ export declare class Subspace {
|
|
|
41
41
|
* Returns the full path of the folder containing this subspace's variant-dependent configuration files
|
|
42
42
|
* such as `pnpm-lock.yaml`.
|
|
43
43
|
*
|
|
44
|
-
* Example:
|
|
44
|
+
* Example (variants): `C:\MyRepo\common\config\rush\variants\my-variant`
|
|
45
|
+
* Example (variants and subspaces): `C:\MyRepo\common\config\subspaces\my-subspace\variants\my-variant`
|
|
46
|
+
* Example (subspaces): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
47
|
+
* Example (neither): `C:\MyRepo\common\config\rush`
|
|
45
48
|
* @beta
|
|
46
49
|
*
|
|
47
50
|
* @remarks
|
|
@@ -54,22 +57,24 @@ export declare class Subspace {
|
|
|
54
57
|
/**
|
|
55
58
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
56
59
|
*
|
|
57
|
-
* Example:
|
|
60
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
61
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush`
|
|
58
62
|
* @beta
|
|
59
63
|
*/
|
|
60
64
|
getSubspaceConfigFolderPath(): string;
|
|
61
65
|
/**
|
|
62
66
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
63
67
|
*
|
|
64
|
-
* Example:
|
|
65
|
-
* Example
|
|
68
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-patches`
|
|
69
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\pnpm-patches`
|
|
66
70
|
* @beta
|
|
67
71
|
*/
|
|
68
72
|
getSubspacePnpmPatchesFolderPath(): string;
|
|
69
73
|
/**
|
|
70
|
-
* The folder where the subspace's node_modules and other temporary files will be stored.
|
|
74
|
+
* The full path of the folder where the subspace's node_modules and other temporary files will be stored.
|
|
71
75
|
*
|
|
72
|
-
* Example:
|
|
76
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\temp\subspaces\my-subspace`
|
|
77
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\temp`
|
|
73
78
|
* @beta
|
|
74
79
|
*/
|
|
75
80
|
getSubspaceTempFolderPath(): string;
|
|
@@ -101,16 +106,18 @@ export declare class Subspace {
|
|
|
101
106
|
*/
|
|
102
107
|
getTempShrinkwrapPreinstallFilePath(): string;
|
|
103
108
|
/**
|
|
104
|
-
* Gets the path to the common-versions.json config file for this subspace.
|
|
109
|
+
* Gets the full path to the common-versions.json config file for this subspace.
|
|
105
110
|
*
|
|
106
|
-
* Example:
|
|
111
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\common-versions.json`
|
|
112
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\common-versions.json`
|
|
107
113
|
* @beta
|
|
108
114
|
*/
|
|
109
115
|
getCommonVersionsFilePath(variant?: string): string;
|
|
110
116
|
/**
|
|
111
|
-
* Gets the path to the pnpm-config.json config file for this subspace.
|
|
117
|
+
* Gets the full path to the pnpm-config.json config file for this subspace.
|
|
112
118
|
*
|
|
113
|
-
* Example:
|
|
119
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-config.json`
|
|
120
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\pnpm-config.json`
|
|
114
121
|
* @beta
|
|
115
122
|
*/
|
|
116
123
|
getPnpmConfigFilePath(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
-
import {
|
|
2
|
+
import type { IVersionPolicyJson, ILockStepVersionJson, IIndividualVersionJson } from './VersionPolicyConfiguration';
|
|
3
3
|
import type { RushConfiguration } from './RushConfiguration';
|
|
4
4
|
/**
|
|
5
5
|
* Type of version bumps
|
|
@@ -33,24 +33,30 @@ export declare enum VersionPolicyDefinitionName {
|
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
35
|
export declare abstract class VersionPolicy {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Serialized json for the policy
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
readonly _json: IVersionPolicyJson;
|
|
42
|
+
private get _versionFormatForCommit();
|
|
43
|
+
private get _versionFormatForPublish();
|
|
38
44
|
/**
|
|
39
45
|
* Version policy name
|
|
40
46
|
*/
|
|
41
|
-
|
|
47
|
+
get policyName(): string;
|
|
42
48
|
/**
|
|
43
49
|
* Version policy definition name
|
|
44
50
|
*/
|
|
45
|
-
|
|
51
|
+
get definitionName(): VersionPolicyDefinitionName;
|
|
46
52
|
/**
|
|
47
53
|
* Determines if a version policy wants to opt out of changelog files.
|
|
48
54
|
*/
|
|
49
|
-
|
|
55
|
+
get exemptFromRushChange(): boolean;
|
|
50
56
|
/**
|
|
51
57
|
* Determines if a version policy wants to opt in to including email.
|
|
52
58
|
*/
|
|
53
|
-
|
|
59
|
+
get includeEmailInChangeFile(): boolean;
|
|
54
60
|
/**
|
|
55
61
|
* @internal
|
|
56
62
|
*/
|
|
@@ -81,12 +87,6 @@ export declare abstract class VersionPolicy {
|
|
|
81
87
|
* @param identifier - (optional) override prerelease Id
|
|
82
88
|
*/
|
|
83
89
|
abstract bump(bumpType?: BumpType, identifier?: string): void;
|
|
84
|
-
/**
|
|
85
|
-
* Serialized json for the policy
|
|
86
|
-
*
|
|
87
|
-
* @internal
|
|
88
|
-
*/
|
|
89
|
-
abstract get _json(): IVersionPolicyJson;
|
|
90
90
|
/**
|
|
91
91
|
* Validates the specified version and throws if the version does not satisfy the policy.
|
|
92
92
|
*
|
|
@@ -110,18 +110,22 @@ export declare abstract class VersionPolicy {
|
|
|
110
110
|
* @public
|
|
111
111
|
*/
|
|
112
112
|
export declare class LockStepVersionPolicy extends VersionPolicy {
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
readonly _json: ILockStepVersionJson;
|
|
113
117
|
private _version;
|
|
114
118
|
/**
|
|
115
119
|
* The type of bump for next bump.
|
|
116
120
|
*/
|
|
117
|
-
|
|
121
|
+
get nextBump(): BumpType | undefined;
|
|
118
122
|
/**
|
|
119
123
|
* The main project for the version policy.
|
|
120
124
|
*
|
|
121
125
|
* If the value is provided, change logs will only be generated in that project.
|
|
122
126
|
* If the value is not provided, change logs will be hosted in each project associated with the policy.
|
|
123
127
|
*/
|
|
124
|
-
|
|
128
|
+
get mainProject(): string | undefined;
|
|
125
129
|
/**
|
|
126
130
|
* @internal
|
|
127
131
|
*/
|
|
@@ -130,12 +134,6 @@ export declare class LockStepVersionPolicy extends VersionPolicy {
|
|
|
130
134
|
* The value of the lockstep version
|
|
131
135
|
*/
|
|
132
136
|
get version(): string;
|
|
133
|
-
/**
|
|
134
|
-
* Serialized json for this policy
|
|
135
|
-
*
|
|
136
|
-
* @internal
|
|
137
|
-
*/
|
|
138
|
-
get _json(): ILockStepVersionJson;
|
|
139
137
|
/**
|
|
140
138
|
* Returns an updated package json that satisfies the version policy.
|
|
141
139
|
*
|
|
@@ -171,19 +169,17 @@ export declare class LockStepVersionPolicy extends VersionPolicy {
|
|
|
171
169
|
*/
|
|
172
170
|
export declare class IndividualVersionPolicy extends VersionPolicy {
|
|
173
171
|
/**
|
|
174
|
-
*
|
|
172
|
+
* @internal
|
|
175
173
|
*/
|
|
176
|
-
readonly
|
|
174
|
+
readonly _json: IIndividualVersionJson;
|
|
177
175
|
/**
|
|
178
|
-
*
|
|
176
|
+
* The major version that has been locked
|
|
179
177
|
*/
|
|
180
|
-
|
|
178
|
+
get lockedMajor(): number | undefined;
|
|
181
179
|
/**
|
|
182
|
-
* Serialized json for this policy
|
|
183
|
-
*
|
|
184
180
|
* @internal
|
|
185
181
|
*/
|
|
186
|
-
|
|
182
|
+
constructor(versionPolicyJson: IIndividualVersionJson);
|
|
187
183
|
/**
|
|
188
184
|
* Returns an updated package json that satisfies the version policy.
|
|
189
185
|
*
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { VersionPolicy, type BumpType } from './VersionPolicy';
|
|
2
2
|
import type { RushConfigurationProject } from './RushConfigurationProject';
|
|
3
|
+
/**
|
|
4
|
+
* This interface represents the raw version policy JSON object which allows repo
|
|
5
|
+
* maintainers to define how different groups of projects will be published by Rush,
|
|
6
|
+
* and how their version numbers will be determined.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
3
9
|
export interface IVersionPolicyJson {
|
|
4
10
|
policyName: string;
|
|
5
11
|
definitionName: string;
|
|
@@ -7,22 +13,38 @@ export interface IVersionPolicyJson {
|
|
|
7
13
|
exemptFromRushChange?: boolean;
|
|
8
14
|
includeEmailInChangeFile?: boolean;
|
|
9
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* This interface represents the raw lock-step version policy JSON object which extends the base version policy
|
|
18
|
+
* with additional fields specific to lock-step versioning.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
10
21
|
export interface ILockStepVersionJson extends IVersionPolicyJson {
|
|
11
22
|
version: string;
|
|
12
23
|
nextBump?: string;
|
|
13
24
|
mainProject?: string;
|
|
14
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* This interface represents the raw individual version policy JSON object which extends the base version policy
|
|
28
|
+
* with additional fields specific to individual versioning.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
15
31
|
export interface IIndividualVersionJson extends IVersionPolicyJson {
|
|
16
32
|
lockedMajor?: number;
|
|
17
33
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export type VersionFormatForPublish = 'original' | 'exact';
|
|
38
|
+
/**
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export type VersionFormatForCommit = 'wildcard' | 'original';
|
|
42
|
+
/**
|
|
43
|
+
* This interface represents the `dependencies` field in a version policy JSON object,
|
|
44
|
+
* allowing repo maintainers to specify how dependencies' versions should be handled
|
|
45
|
+
* during publishing and committing.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
26
48
|
export interface IVersionPolicyDependencyJson {
|
|
27
49
|
versionFormatForPublish?: VersionFormatForPublish;
|
|
28
50
|
versionFormatForCommit?: VersionFormatForCommit;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IPhasedCommand } from '../../pluginFramework/RushLifeCycle';
|
|
1
2
|
import { PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
2
3
|
import { BaseScriptAction, type IBaseScriptActionOptions } from './BaseScriptAction';
|
|
3
4
|
import type { IPhase, IPhasedCommandConfig } from '../../api/CommandLineConfiguration';
|
|
@@ -6,6 +7,7 @@ import type { IPhase, IPhasedCommandConfig } from '../../api/CommandLineConfigur
|
|
|
6
7
|
*/
|
|
7
8
|
export interface IPhasedScriptActionOptions extends IBaseScriptActionOptions<IPhasedCommandConfig> {
|
|
8
9
|
enableParallelism: boolean;
|
|
10
|
+
allowOversubscription: boolean;
|
|
9
11
|
incremental: boolean;
|
|
10
12
|
disableBuildCache: boolean;
|
|
11
13
|
originalPhases: Set<IPhase>;
|
|
@@ -25,13 +27,15 @@ export interface IPhasedScriptActionOptions extends IBaseScriptActionOptions<IPh
|
|
|
25
27
|
* and "rebuild" commands are also modeled as phased commands with a single phase that invokes the npm
|
|
26
28
|
* "build" script for each project.
|
|
27
29
|
*/
|
|
28
|
-
export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandConfig> {
|
|
30
|
+
export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandConfig> implements IPhasedCommand {
|
|
29
31
|
/**
|
|
30
32
|
* @internal
|
|
31
33
|
*/
|
|
32
34
|
_runsBeforeInstall: boolean | undefined;
|
|
33
35
|
readonly hooks: PhasedCommandHooks;
|
|
36
|
+
readonly sessionAbortController: AbortController;
|
|
34
37
|
private readonly _enableParallelism;
|
|
38
|
+
private readonly _allowOversubscription;
|
|
35
39
|
private readonly _isIncrementalBuildAllowed;
|
|
36
40
|
private readonly _disableBuildCache;
|
|
37
41
|
private readonly _originalPhases;
|
|
@@ -43,6 +47,7 @@ export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandC
|
|
|
43
47
|
private readonly _knownPhases;
|
|
44
48
|
private readonly _terminal;
|
|
45
49
|
private _changedProjectsOnly;
|
|
50
|
+
private _executionAbortController;
|
|
46
51
|
private readonly _changedProjectsOnlyParameter;
|
|
47
52
|
private readonly _selectionParameters;
|
|
48
53
|
private readonly _verboseParameter;
|
package/lib/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export { EventHooks, Event } from './api/EventHooks';
|
|
|
32
32
|
export { ChangeManager } from './api/ChangeManager';
|
|
33
33
|
export { FlagFile as _FlagFile } from './api/FlagFile';
|
|
34
34
|
export { VersionPolicyDefinitionName, BumpType, LockStepVersionPolicy, IndividualVersionPolicy, VersionPolicy } from './api/VersionPolicy';
|
|
35
|
-
export { VersionPolicyConfiguration } from './api/VersionPolicyConfiguration';
|
|
35
|
+
export { VersionPolicyConfiguration, type ILockStepVersionJson, type IIndividualVersionJson, type IVersionPolicyJson } from './api/VersionPolicyConfiguration';
|
|
36
36
|
export { type ILaunchOptions, Rush } from './api/Rush';
|
|
37
37
|
export { RushInternals as _RushInternals } from './api/RushInternals';
|
|
38
38
|
export { ExperimentsConfiguration, type IExperimentsJson } from './api/ExperimentsConfiguration';
|
|
@@ -65,6 +65,17 @@ export declare class DependencySpecifier {
|
|
|
65
65
|
*/
|
|
66
66
|
readonly aliasTarget: DependencySpecifier | undefined;
|
|
67
67
|
constructor(packageName: string, versionSpecifier: string);
|
|
68
|
+
/**
|
|
69
|
+
* Clears the dependency specifier parse cache.
|
|
70
|
+
*/
|
|
71
|
+
static clearCache(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Parses a dependency specifier with caching.
|
|
74
|
+
* @param packageName - The name of the package the version specifier corresponds to
|
|
75
|
+
* @param versionSpecifier - The version specifier to parse
|
|
76
|
+
* @returns The parsed dependency specifier
|
|
77
|
+
*/
|
|
78
|
+
static parseWithCache(packageName: string, versionSpecifier: string): DependencySpecifier;
|
|
68
79
|
static getDependencySpecifierType(specifierType: string): DependencySpecifierType;
|
|
69
80
|
}
|
|
70
81
|
//# sourceMappingURL=DependencySpecifier.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OperationRequestRunCallback } from '@rushstack/operation-graph';
|
|
1
2
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
2
3
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
4
|
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
@@ -9,7 +10,7 @@ export interface IIPCOperationRunnerOptions {
|
|
|
9
10
|
commandToRun: string;
|
|
10
11
|
commandForHash: string;
|
|
11
12
|
persist: boolean;
|
|
12
|
-
requestRun:
|
|
13
|
+
requestRun: OperationRequestRunCallback;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Runner that hosts a long-lived process to which it communicates via IPC.
|
|
@@ -9,6 +9,7 @@ export interface IOperationExecutionManagerOptions {
|
|
|
9
9
|
quietMode: boolean;
|
|
10
10
|
debugMode: boolean;
|
|
11
11
|
parallelism: number;
|
|
12
|
+
allowOversubscription: boolean;
|
|
12
13
|
inputsSnapshot?: IInputsSnapshot;
|
|
13
14
|
destination?: TerminalWritable;
|
|
14
15
|
beforeExecuteOperationAsync?: (operation: OperationExecutionRecord) => Promise<OperationStatus | undefined>;
|
|
@@ -27,6 +28,7 @@ export declare class OperationExecutionManager {
|
|
|
27
28
|
private readonly _executionRecords;
|
|
28
29
|
private readonly _quietMode;
|
|
29
30
|
private readonly _parallelism;
|
|
31
|
+
private readonly _allowOversubscription;
|
|
30
32
|
private readonly _totalOperations;
|
|
31
33
|
private readonly _outputWritable;
|
|
32
34
|
private readonly _colorsNewlinesTransform;
|
|
@@ -39,6 +41,7 @@ export declare class OperationExecutionManager {
|
|
|
39
41
|
private readonly _createEnvironmentForOperation?;
|
|
40
42
|
private _hasAnyFailures;
|
|
41
43
|
private _hasAnyNonAllowedWarnings;
|
|
44
|
+
private _hasAnyAborted;
|
|
42
45
|
private _completedOperations;
|
|
43
46
|
private _executionQueue;
|
|
44
47
|
constructor(operations: Set<Operation>, options: IOperationExecutionManagerOptions);
|
|
@@ -47,7 +50,7 @@ export declare class OperationExecutionManager {
|
|
|
47
50
|
* Executes all operations which have been registered, returning a promise which is resolved when all the
|
|
48
51
|
* operations are completed successfully, or rejects when any operation fails.
|
|
49
52
|
*/
|
|
50
|
-
executeAsync(): Promise<IExecutionResult>;
|
|
53
|
+
executeAsync(abortController: AbortController): Promise<IExecutionResult>;
|
|
51
54
|
private _reportOperationErrorIfAny;
|
|
52
55
|
/**
|
|
53
56
|
* Handles the result of the operation and propagates any relevant effects.
|
|
@@ -46,7 +46,11 @@ export declare enum OperationStatus {
|
|
|
46
46
|
/**
|
|
47
47
|
* The Operation was a no-op (for example, it had an empty script)
|
|
48
48
|
*/
|
|
49
|
-
NoOp = "NO OP"
|
|
49
|
+
NoOp = "NO OP",
|
|
50
|
+
/**
|
|
51
|
+
* The Operation was aborted before it could execute.
|
|
52
|
+
*/
|
|
53
|
+
Aborted = "ABORTED"
|
|
50
54
|
}
|
|
51
55
|
/**
|
|
52
56
|
* The set of statuses that are considered terminal.
|
|
@@ -89,7 +89,6 @@ export declare function parsePnpm9DependencyKey(dependencyName: string, versionS
|
|
|
89
89
|
export declare function parsePnpmDependencyKey(dependencyName: string, versionSpecifier: IPnpmVersionSpecifier): DependencySpecifier | undefined;
|
|
90
90
|
export declare function normalizePnpmVersionSpecifier(versionSpecifier: IPnpmVersionSpecifier): string;
|
|
91
91
|
export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
92
|
-
private static _cacheByLockfilePath;
|
|
93
92
|
readonly shrinkwrapFileMajorVersion: number;
|
|
94
93
|
readonly isWorkspaceCompatible: boolean;
|
|
95
94
|
readonly registry: string;
|
|
@@ -99,12 +98,17 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
|
99
98
|
readonly packages: ReadonlyMap<string, IPnpmShrinkwrapDependencyYaml>;
|
|
100
99
|
readonly overrides: ReadonlyMap<string, string>;
|
|
101
100
|
readonly packageExtensionsChecksum: undefined | string;
|
|
101
|
+
readonly hash: string;
|
|
102
102
|
private readonly _shrinkwrapJson;
|
|
103
103
|
private readonly _integrities;
|
|
104
104
|
private _pnpmfileConfiguration;
|
|
105
105
|
private constructor();
|
|
106
106
|
static getLockfileV9PackageId(name: string, version: string): string;
|
|
107
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Clears the cache of PnpmShrinkwrapFile instances to free up memory.
|
|
109
|
+
*/
|
|
110
|
+
static clearCache(): void;
|
|
111
|
+
static loadFromFile(shrinkwrapYamlFilePath: string, options?: ILoadFromFileOptions): PnpmShrinkwrapFile | undefined;
|
|
108
112
|
static loadFromString(shrinkwrapContent: string): PnpmShrinkwrapFile;
|
|
109
113
|
getShrinkwrapHash(experimentsConfig?: IExperimentsJson): string;
|
|
110
114
|
/**
|
|
@@ -114,6 +114,10 @@ export interface IExecuteOperationsContext extends ICreateOperationsContext {
|
|
|
114
114
|
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
|
|
115
115
|
*/
|
|
116
116
|
readonly inputsSnapshot?: IInputsSnapshot;
|
|
117
|
+
/**
|
|
118
|
+
* An abort controller that can be used to abort the current set of queued operations.
|
|
119
|
+
*/
|
|
120
|
+
readonly abortController: AbortController;
|
|
117
121
|
}
|
|
118
122
|
/**
|
|
119
123
|
* Hooks into the execution process for phased commands
|
|
@@ -28,6 +28,12 @@ export interface IPhasedCommand extends IRushCommand {
|
|
|
28
28
|
* @alpha
|
|
29
29
|
*/
|
|
30
30
|
readonly hooks: PhasedCommandHooks;
|
|
31
|
+
/**
|
|
32
|
+
* An abort controller that can be used to abort the command.
|
|
33
|
+
* Long-lived plugins should listen to the signal to handle any cleanup logic.
|
|
34
|
+
* @alpha
|
|
35
|
+
*/
|
|
36
|
+
readonly sessionAbortController: AbortController;
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* Hooks into the lifecycle of the Rush process invocation that plugins may tap into.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.158.1-pr5355.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@pnpm/lockfile.types": "~1.0.3",
|
|
38
38
|
"tapable": "2.2.1",
|
|
39
|
-
"@rushstack/
|
|
40
|
-
"@rushstack/
|
|
41
|
-
"@rushstack/
|
|
42
|
-
"@rushstack/
|
|
39
|
+
"@rushstack/lookup-by-path": "0.7.6",
|
|
40
|
+
"@rushstack/node-core-library": "5.14.0-pr5355.0",
|
|
41
|
+
"@rushstack/terminal": "0.16.0",
|
|
42
|
+
"@rushstack/package-deps-hash": "4.4.7"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/semver": "7.5.0",
|
|
46
46
|
"@types/webpack-env": "1.18.8",
|
|
47
47
|
"eslint": "~9.25.1",
|
|
48
48
|
"webpack": "~5.98.0",
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@rushstack/heft": "0.
|
|
52
|
-
"@rushstack/stream-collator": "4.1.
|
|
53
|
-
"@rushstack/ts-command-line": "5.0.
|
|
54
|
-
"
|
|
55
|
-
"
|
|
49
|
+
"@rushstack/heft": "0.74.5",
|
|
50
|
+
"@microsoft/rush-lib": "5.158.1-pr5355.0",
|
|
51
|
+
"@rushstack/heft-webpack5-plugin": "0.11.42",
|
|
52
|
+
"@rushstack/stream-collator": "4.1.109",
|
|
53
|
+
"@rushstack/ts-command-line": "5.0.3",
|
|
54
|
+
"local-node-rig": "1.0.0",
|
|
55
|
+
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.108"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "heft build --clean",
|