@rushstack/rush-sdk 5.124.1 → 5.124.3

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.
@@ -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
- private _state;
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?: JsonObject);
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: ReadonlySet<RushConfigurationProject>): ReadonlySet<Subspace>;
3843
+ getSubspacesForProjects(projects: Iterable<RushConfigurationProject>): ReadonlySet<Subspace>;
3844
3844
  /**
3845
3845
  * @beta
3846
3846
  */
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.43.3"
8
+ "packageVersion": "7.43.4"
9
9
  }
10
10
  ]
11
11
  }
@@ -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
- private _state;
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?: JsonObject);
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
- export declare const LAST_INSTALL_FLAG_FILE_NAME: string;
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(options?: ILockfileValidityCheckOptions): Promise<boolean>;
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
- * A helper class for LastInstallFlag
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 class LastInstallFlagFactory {
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: ReadonlySet<RushConfigurationProject>): ReadonlySet<Subspace>;
535
+ getSubspacesForProjects(projects: Iterable<RushConfigurationProject>): ReadonlySet<Subspace>;
536
536
  /**
537
537
  * @beta
538
538
  */
@@ -9,7 +9,6 @@ export declare class DeployAction extends BaseRushAction {
9
9
  private readonly _createArchivePath;
10
10
  private readonly _createArchiveOnly;
11
11
  constructor(parser: RushCommandLineParser);
12
- private _getDependencyProjects;
13
12
  protected runAsync(): Promise<void>;
14
13
  }
15
14
  //# sourceMappingURL=DeployAction.d.ts.map
@@ -31,11 +31,16 @@ export declare class SelectionParameterSet {
31
31
  * Represents the selection as `--filter` parameters to pnpm.
32
32
  *
33
33
  * @remarks
34
- * This is a separate from the selection to allow the filters to be represented more concisely.
35
34
  *
36
- * @see https://pnpm.js.org/en/filtering
35
+ * IMPORTANT: This function produces PNPM CLI operators that select projects from PNPM's temp workspace.
36
+ * If Rush subspaces are enabled, PNPM cannot see the complete Rush workspace, and therefore these operators
37
+ * would malfunction. In the current implementation, we calculate them anyway, then `BaseInstallAction.runAsync()`
38
+ * will overwrite `pnpmFilterArgumentValues` with a flat list of project names. In the future, these
39
+ * two code paths will be combined into a single general solution.
40
+ *
41
+ * @see https://pnpm.io/filtering
37
42
  */
38
- getPnpmFilterArgumentsAsync(terminal: ITerminal): Promise<string[]>;
43
+ getPnpmFilterArgumentValuesAsync(terminal: ITerminal): Promise<string[]>;
39
44
  /**
40
45
  * Usage telemetry for selection parameters. Only saved locally, and if requested in the config.
41
46
  */
@@ -65,10 +65,21 @@ export interface IInstallManagerOptions {
65
65
  */
66
66
  maxInstallAttempts: number;
67
67
  /**
68
- * Filters to be passed to PNPM during installation, if applicable.
69
- * These restrict the scope of a workspace installation.
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
- filteredProjects: RushConfigurationProject[];
82
+ selectedProjects: Set<RushConfigurationProject>;
72
83
  /**
73
84
  * Callback to invoke between preparing the common/temp folder and running installation.
74
85
  */
@@ -1,3 +1,4 @@
1
1
  import type { IPnpmfileHooks } from './IPnpmfile';
2
+ export declare function reset(): void;
2
3
  export declare const hooks: IPnpmfileHooks;
3
4
  //# sourceMappingURL=PnpmfileShim.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.124.1",
3
+ "version": "5.124.3",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,8 +31,8 @@
31
31
  "devDependencies": {
32
32
  "@types/semver": "7.5.0",
33
33
  "@types/webpack-env": "1.18.0",
34
+ "@microsoft/rush-lib": "5.124.3",
34
35
  "@rushstack/heft": "0.66.6",
35
- "@microsoft/rush-lib": "5.124.1",
36
36
  "local-node-rig": "1.0.0",
37
37
  "@rushstack/ts-command-line": "4.19.5",
38
38
  "@rushstack/stream-collator": "4.1.44"