@rushstack/rush-sdk 5.124.2 → 5.124.4
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 +4 -4
- package/lib/api/FlagFile.d.ts +3 -3
- package/lib/api/LastInstallFlag.d.ts +8 -32
- package/lib/api/RushConfiguration.d.ts +1 -1
- package/lib/cli/actions/BaseInstallAction.d.ts +2 -5
- package/lib/cli/actions/InstallAction.d.ts +1 -1
- package/lib/cli/actions/UpdateAction.d.ts +1 -1
- package/lib/cli/parsing/SelectionParameterSet.d.ts +25 -5
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +14 -3
- package/lib/logic/pnpm/PnpmfileShim.d.ts +1 -0
- package/package.json +7 -7
package/dist/rush-lib.d.ts
CHANGED
|
@@ -911,7 +911,7 @@ export declare class FileSystemBuildCacheProvider {
|
|
|
911
911
|
* A base class for flag file.
|
|
912
912
|
* @internal
|
|
913
913
|
*/
|
|
914
|
-
export declare class _FlagFile {
|
|
914
|
+
export declare class _FlagFile<TState extends JsonObject = JsonObject> {
|
|
915
915
|
/**
|
|
916
916
|
* Flag file path
|
|
917
917
|
*/
|
|
@@ -919,13 +919,13 @@ export declare class _FlagFile {
|
|
|
919
919
|
/**
|
|
920
920
|
* Content of the flag
|
|
921
921
|
*/
|
|
922
|
-
|
|
922
|
+
protected _state: TState;
|
|
923
923
|
/**
|
|
924
924
|
* Creates a new flag file
|
|
925
925
|
* @param folderPath - the folder that this flag is managing
|
|
926
926
|
* @param state - optional, the state that should be managed or compared
|
|
927
927
|
*/
|
|
928
|
-
constructor(folderPath: string, flagName: string, initialState
|
|
928
|
+
constructor(folderPath: string, flagName: string, initialState: TState);
|
|
929
929
|
/**
|
|
930
930
|
* Returns true if the file exists and the contents match the current state.
|
|
931
931
|
*/
|
|
@@ -3840,7 +3840,7 @@ export declare class RushConfiguration {
|
|
|
3840
3840
|
* Returns the set of subspaces that the given projects belong to
|
|
3841
3841
|
* @beta
|
|
3842
3842
|
*/
|
|
3843
|
-
getSubspacesForProjects(projects:
|
|
3843
|
+
getSubspacesForProjects(projects: Iterable<RushConfigurationProject>): ReadonlySet<Subspace>;
|
|
3844
3844
|
/**
|
|
3845
3845
|
* @beta
|
|
3846
3846
|
*/
|
package/lib/api/FlagFile.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type JsonObject } from '@rushstack/node-core-library';
|
|
|
3
3
|
* A base class for flag file.
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
|
-
export declare class FlagFile {
|
|
6
|
+
export declare class FlagFile<TState extends JsonObject = JsonObject> {
|
|
7
7
|
/**
|
|
8
8
|
* Flag file path
|
|
9
9
|
*/
|
|
@@ -11,13 +11,13 @@ export declare class FlagFile {
|
|
|
11
11
|
/**
|
|
12
12
|
* Content of the flag
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
protected _state: TState;
|
|
15
15
|
/**
|
|
16
16
|
* Creates a new flag file
|
|
17
17
|
* @param folderPath - the folder that this flag is managing
|
|
18
18
|
* @param state - optional, the state that should be managed or compared
|
|
19
19
|
*/
|
|
20
|
-
constructor(folderPath: string, flagName: string, initialState
|
|
20
|
+
constructor(folderPath: string, flagName: string, initialState: TState);
|
|
21
21
|
/**
|
|
22
22
|
* Returns true if the file exists and the contents match the current state.
|
|
23
23
|
*/
|
|
@@ -2,7 +2,7 @@ import { type JsonObject, type IPackageJson } from '@rushstack/node-core-library
|
|
|
2
2
|
import type { PackageManagerName } from './packageManager/PackageManager';
|
|
3
3
|
import type { RushConfiguration } from './RushConfiguration';
|
|
4
4
|
import type { Subspace } from './Subspace';
|
|
5
|
-
|
|
5
|
+
import { FlagFile } from './FlagFile';
|
|
6
6
|
/**
|
|
7
7
|
* This represents the JSON data structure for the "last-install.flag" file.
|
|
8
8
|
*/
|
|
@@ -63,12 +63,7 @@ interface ILockfileValidityCheckOptions {
|
|
|
63
63
|
* It also compares state, so that if something like the Node.js version has changed,
|
|
64
64
|
* it can invalidate the last install.
|
|
65
65
|
*/
|
|
66
|
-
export declare class LastInstallFlag {
|
|
67
|
-
private _state;
|
|
68
|
-
/**
|
|
69
|
-
* Returns the full path to the flag file
|
|
70
|
-
*/
|
|
71
|
-
readonly path: string;
|
|
66
|
+
export declare class LastInstallFlag extends FlagFile<Partial<ILastInstallFlagJson>> {
|
|
72
67
|
/**
|
|
73
68
|
* Creates a new LastInstall flag
|
|
74
69
|
* @param folderPath - the folder that this flag is managing
|
|
@@ -78,7 +73,7 @@ export declare class LastInstallFlag {
|
|
|
78
73
|
/**
|
|
79
74
|
* Returns true if the file exists and the contents match the current state.
|
|
80
75
|
*/
|
|
81
|
-
isValidAsync(
|
|
76
|
+
isValidAsync(): Promise<boolean>;
|
|
82
77
|
/**
|
|
83
78
|
* Same as isValid(), but with an additional check: If the current state is not equal to the previous
|
|
84
79
|
* state, and an the current state causes an error, then throw an exception with a friendly message.
|
|
@@ -89,38 +84,19 @@ export declare class LastInstallFlag {
|
|
|
89
84
|
rushVerb: string;
|
|
90
85
|
}): Promise<boolean>;
|
|
91
86
|
private _isValidAsync;
|
|
92
|
-
/**
|
|
93
|
-
* Writes the flag file to disk with the current state
|
|
94
|
-
*/
|
|
95
|
-
createAsync(): Promise<void>;
|
|
96
87
|
/**
|
|
97
88
|
* Merge new data into current state by "merge"
|
|
98
89
|
*/
|
|
99
90
|
mergeFromObject(data: JsonObject): void;
|
|
100
|
-
/**
|
|
101
|
-
* Removes the flag file
|
|
102
|
-
*/
|
|
103
|
-
clearAsync(): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Returns the name of the flag file
|
|
106
|
-
*/
|
|
107
|
-
protected get flagName(): string;
|
|
108
91
|
}
|
|
109
92
|
/**
|
|
110
|
-
*
|
|
93
|
+
* Gets the LastInstall flag and sets the current state. This state is used to compare
|
|
94
|
+
* against the last-known-good state tracked by the LastInstall flag.
|
|
95
|
+
* @param rushConfiguration - the configuration of the Rush repo to get the install
|
|
96
|
+
* state from
|
|
111
97
|
*
|
|
112
98
|
* @internal
|
|
113
99
|
*/
|
|
114
|
-
export declare
|
|
115
|
-
/**
|
|
116
|
-
* Gets the LastInstall flag and sets the current state. This state is used to compare
|
|
117
|
-
* against the last-known-good state tracked by the LastInstall flag.
|
|
118
|
-
* @param rushConfiguration - the configuration of the Rush repo to get the install
|
|
119
|
-
* state from
|
|
120
|
-
*
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
|
-
static getCommonTempFlag(rushConfiguration: RushConfiguration, subspace: Subspace, extraState?: Record<string, string>): LastInstallFlag;
|
|
124
|
-
}
|
|
100
|
+
export declare function getCommonTempFlag(rushConfiguration: RushConfiguration, subspace: Subspace, extraState?: Record<string, string>): LastInstallFlag;
|
|
125
101
|
export {};
|
|
126
102
|
//# sourceMappingURL=LastInstallFlag.d.ts.map
|
|
@@ -532,7 +532,7 @@ export declare class RushConfiguration {
|
|
|
532
532
|
* Returns the set of subspaces that the given projects belong to
|
|
533
533
|
* @beta
|
|
534
534
|
*/
|
|
535
|
-
getSubspacesForProjects(projects:
|
|
535
|
+
getSubspacesForProjects(projects: Iterable<RushConfigurationProject>): ReadonlySet<Subspace>;
|
|
536
536
|
/**
|
|
537
537
|
* @beta
|
|
538
538
|
*/
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { CommandLineFlagParameter, CommandLineIntegerParameter,
|
|
1
|
+
import type { CommandLineFlagParameter, CommandLineIntegerParameter, IRequiredCommandLineIntegerParameter } from '@rushstack/ts-command-line';
|
|
2
2
|
import { type ITerminal } from '@rushstack/terminal';
|
|
3
3
|
import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';
|
|
4
4
|
import type { IInstallManagerOptions } from '../../logic/base/BaseInstallManagerTypes';
|
|
5
5
|
import type { SelectionParameterSet } from '../parsing/SelectionParameterSet';
|
|
6
|
-
import type { Subspace } from '../../api/Subspace';
|
|
7
6
|
/**
|
|
8
7
|
* This is the common base class for InstallAction and UpdateAction.
|
|
9
8
|
*/
|
|
@@ -17,11 +16,9 @@ export declare abstract class BaseInstallAction extends BaseRushAction {
|
|
|
17
16
|
protected readonly _maxInstallAttempts: IRequiredCommandLineIntegerParameter;
|
|
18
17
|
protected readonly _ignoreHooksParameter: CommandLineFlagParameter;
|
|
19
18
|
protected readonly _offlineParameter: CommandLineFlagParameter;
|
|
20
|
-
protected readonly _subspaceParameter: CommandLineStringParameter;
|
|
21
19
|
protected _selectionParameters?: SelectionParameterSet;
|
|
22
20
|
constructor(options: IBaseRushActionOptions);
|
|
23
|
-
protected abstract buildInstallOptionsAsync(): Promise<IInstallManagerOptions
|
|
24
|
-
protected getTargetSubspace(): Subspace;
|
|
21
|
+
protected abstract buildInstallOptionsAsync(): Promise<Omit<IInstallManagerOptions, 'subspace'>>;
|
|
25
22
|
protected runAsync(): Promise<void>;
|
|
26
23
|
private _doInstall;
|
|
27
24
|
private _collectTelemetry;
|
|
@@ -4,6 +4,6 @@ import type { RushCommandLineParser } from '../RushCommandLineParser';
|
|
|
4
4
|
export declare class InstallAction extends BaseInstallAction {
|
|
5
5
|
private readonly _checkOnlyParameter;
|
|
6
6
|
constructor(parser: RushCommandLineParser);
|
|
7
|
-
protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions
|
|
7
|
+
protected buildInstallOptionsAsync(): Promise<Omit<IInstallManagerOptions, 'subspace'>>;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=InstallAction.d.ts.map
|
|
@@ -6,6 +6,6 @@ export declare class UpdateAction extends BaseInstallAction {
|
|
|
6
6
|
private readonly _recheckParameter;
|
|
7
7
|
constructor(parser: RushCommandLineParser);
|
|
8
8
|
protected runAsync(): Promise<void>;
|
|
9
|
-
protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions
|
|
9
|
+
protected buildInstallOptionsAsync(): Promise<Omit<IInstallManagerOptions, 'subspace'>>;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=UpdateAction.d.ts.map
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { CommandLineParameterProvider } from '@rushstack/ts-command-line';
|
|
3
3
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
4
4
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
5
5
|
import { type IGitSelectorParserOptions } from '../../logic/selectors/GitChangedProjectSelectorParser';
|
|
6
|
+
interface ISelectionParameterSetOptions {
|
|
7
|
+
gitOptions: IGitSelectorParserOptions;
|
|
8
|
+
includeSubspaceSelector: boolean;
|
|
9
|
+
}
|
|
6
10
|
/**
|
|
7
11
|
* This class is provides the set of command line parameters used to select projects
|
|
8
12
|
* based on dependencies.
|
|
@@ -17,10 +21,20 @@ export declare class SelectionParameterSet {
|
|
|
17
21
|
private readonly _onlyProject;
|
|
18
22
|
private readonly _toProject;
|
|
19
23
|
private readonly _toExceptProject;
|
|
24
|
+
private readonly _subspaceParameter;
|
|
20
25
|
private readonly _fromVersionPolicy;
|
|
21
26
|
private readonly _toVersionPolicy;
|
|
22
27
|
private readonly _selectorParserByScope;
|
|
23
|
-
constructor(rushConfiguration: RushConfiguration, action: CommandLineParameterProvider,
|
|
28
|
+
constructor(rushConfiguration: RushConfiguration, action: CommandLineParameterProvider, options: ISelectionParameterSetOptions);
|
|
29
|
+
/**
|
|
30
|
+
* Used to implement the `preventSelectingAllSubspaces` policy which checks for commands that accidentally
|
|
31
|
+
* select everything. Return `true` if the CLI was invoked with selection parameters.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* It is still possible for a user to select everything, but they must do so using an explicit selection
|
|
35
|
+
* such as `rush install --from thing-that-everything-depends-on`.
|
|
36
|
+
*/
|
|
37
|
+
didUserSelectAnything(): boolean;
|
|
24
38
|
/**
|
|
25
39
|
* Computes the set of selected projects based on all parameter values.
|
|
26
40
|
*
|
|
@@ -31,11 +45,16 @@ export declare class SelectionParameterSet {
|
|
|
31
45
|
* Represents the selection as `--filter` parameters to pnpm.
|
|
32
46
|
*
|
|
33
47
|
* @remarks
|
|
34
|
-
* This is a separate from the selection to allow the filters to be represented more concisely.
|
|
35
48
|
*
|
|
36
|
-
*
|
|
49
|
+
* IMPORTANT: This function produces PNPM CLI operators that select projects from PNPM's temp workspace.
|
|
50
|
+
* If Rush subspaces are enabled, PNPM cannot see the complete Rush workspace, and therefore these operators
|
|
51
|
+
* would malfunction. In the current implementation, we calculate them anyway, then `BaseInstallAction.runAsync()`
|
|
52
|
+
* will overwrite `pnpmFilterArgumentValues` with a flat list of project names. In the future, these
|
|
53
|
+
* two code paths will be combined into a single general solution.
|
|
54
|
+
*
|
|
55
|
+
* @see https://pnpm.io/filtering
|
|
37
56
|
*/
|
|
38
|
-
|
|
57
|
+
getPnpmFilterArgumentValuesAsync(terminal: ITerminal): Promise<string[]>;
|
|
39
58
|
/**
|
|
40
59
|
* Usage telemetry for selection parameters. Only saved locally, and if requested in the config.
|
|
41
60
|
*/
|
|
@@ -48,4 +67,5 @@ export declare class SelectionParameterSet {
|
|
|
48
67
|
*/
|
|
49
68
|
private _evaluateProjectParameterAsync;
|
|
50
69
|
}
|
|
70
|
+
export {};
|
|
51
71
|
//# sourceMappingURL=SelectionParameterSet.d.ts.map
|
|
@@ -65,10 +65,21 @@ export interface IInstallManagerOptions {
|
|
|
65
65
|
*/
|
|
66
66
|
maxInstallAttempts: number;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
68
|
+
* An array of `--filter` argument values. For example, if the array is ["a", "b"] then Rush would invoke
|
|
69
|
+
* `pnpm install --filter a --filter b` which restricts the install/update to dependencies of
|
|
70
|
+
* workspace projects "a" and "b". If the array is empty, then an unfiltered install
|
|
71
|
+
* is performed. Filtered installs have some limitations such as less comprehensive version analysis.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* Note that PNPM may arbitrarily ignore `--filter` (producing an unfiltered install) in certain situations,
|
|
75
|
+
* for example when `config.dedupe-peer-dependents=true` with PNPM 8. Rush tries to circumvent this, under the
|
|
76
|
+
* assumption that a user who invokes a filtered install cares more about lockfile stability than duplication.
|
|
77
|
+
*/
|
|
78
|
+
pnpmFilterArgumentValues: string[];
|
|
79
|
+
/**
|
|
80
|
+
* The set of projects for which installation should be performed.
|
|
70
81
|
*/
|
|
71
|
-
|
|
82
|
+
selectedProjects: Set<RushConfigurationProject>;
|
|
72
83
|
/**
|
|
73
84
|
* Callback to invoke between preparing the common/temp folder and running installation.
|
|
74
85
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.124.
|
|
3
|
+
"version": "5.124.4",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/node-fetch": "2.6.2",
|
|
27
27
|
"tapable": "2.2.1",
|
|
28
|
-
"@rushstack/
|
|
29
|
-
"@rushstack/
|
|
28
|
+
"@rushstack/terminal": "0.10.3",
|
|
29
|
+
"@rushstack/node-core-library": "4.2.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/semver": "7.5.0",
|
|
33
33
|
"@types/webpack-env": "1.18.0",
|
|
34
|
-
"@microsoft/rush-lib": "5.124.
|
|
35
|
-
"@rushstack/heft": "0.66.6",
|
|
34
|
+
"@microsoft/rush-lib": "5.124.4",
|
|
36
35
|
"local-node-rig": "1.0.0",
|
|
37
|
-
"@rushstack/
|
|
38
|
-
"@rushstack/stream-collator": "4.1.44"
|
|
36
|
+
"@rushstack/heft": "0.66.6",
|
|
37
|
+
"@rushstack/stream-collator": "4.1.44",
|
|
38
|
+
"@rushstack/ts-command-line": "4.19.5"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "heft build --clean",
|