@rushstack/rush-sdk 5.104.1 → 5.106.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.
@@ -376,7 +376,17 @@ export declare class CredentialCache {
376
376
  *
377
377
  * @beta
378
378
  */
379
- export declare type CustomTipId = 'TIP_RUSH_INCONSISTENT_VERSIONS' | string;
379
+ export declare enum CustomTipId {
380
+ TIP_PNPM_UNEXPECTED_STORE = "TIP_PNPM_UNEXPECTED_STORE",
381
+ TIP_RUSH_INCONSISTENT_VERSIONS = "TIP_RUSH_INCONSISTENT_VERSIONS",
382
+ TIP_PNPM_NO_MATCHING_VERSION = "TIP_PNPM_NO_MATCHING_VERSION",
383
+ TIP_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE = "TIP_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE",
384
+ TIP_PNPM_PEER_DEP_ISSUES = "TIP_PNPM_PEER_DEP_ISSUES",
385
+ TIP_PNPM_OUTDATED_LOCKFILE = "TIP_PNPM_OUTDATED_LOCKFILE",
386
+ TIP_PNPM_TARBALL_INTEGRITY = "TIP_PNPM_TARBALL_INTEGRITY",
387
+ TIP_PNPM_MISMATCHED_RELEASE_CHANNEL = "TIP_PNPM_MISMATCHED_RELEASE_CHANNEL",
388
+ TIP_PNPM_INVALID_NODE_VERSION = "TIP_PNPM_INVALID_NODE_VERSION"
389
+ }
380
390
 
381
391
  /**
382
392
  * Used to access the `common/config/rush/custom-tips.json` config file,
@@ -393,27 +403,82 @@ export declare class CustomTipsConfiguration {
393
403
  */
394
404
  readonly configuration: Readonly<ICustomTipsJson>;
395
405
  /**
396
- * The list of identifiers that are allowed to be used in the "tipId" field
397
- * of the config file.
406
+ * A registry mapping custom tip IDs to their corresponding metadata.
407
+ *
408
+ * @remarks
409
+ * This registry is used to look up metadata for custom tips based on their IDs. The metadata includes
410
+ * information such as the severity level, the type of tip, and an optional matching function.
411
+ *
412
+ * Each key in the registry corresponds to a `CustomTipIdEnum` value, and each value is an object
413
+ * implementing the `ICustomTipInfo` interface.
414
+ *
415
+ * @example
416
+ * ```typescript
417
+ * const tipInfo = CustomTipsConfiguration.customTipRegistry[CustomTipIdEnum.TIP_RUSH_INCONSISTENT_VERSIONS];
418
+ * console.log(tipInfo.severity); // Output: CustomTipSeverity.Error
419
+ * ```
420
+ *
421
+ * See {@link CustomTipId} for the list of custom tip IDs.
422
+ * See {@link ICustomTipInfo} for the structure of the metadata.
398
423
  */
399
- static readonly supportedTipIds: ReadonlySet<string>;
424
+ static customTipRegistry: Readonly<Record<CustomTipId, ICustomTipInfo>>;
400
425
  constructor(configFilename: string);
401
- private _formatTipMessage;
402
426
  /**
403
427
  * If custom-tips.json defines a tip for the specified tipId,
404
428
  * display the tip on the terminal.
429
+ *
430
+ * @remarks
431
+ * The severity of the tip is defined in ${@link CustomTipsConfiguration.customTipRegistry}.
432
+ * If you want to change the severity specifically for this call, use other API like {@link CustomTipsConfiguration._showErrorTip}.
433
+ *
434
+ * @internal
405
435
  */
406
- showInfoTip(terminal: ITerminal, tipId: CustomTipId): void;
436
+ _showTip(terminal: ITerminal, tipId: CustomTipId): void;
407
437
  /**
408
438
  * If custom-tips.json defines a tip for the specified tipId,
409
439
  * display the tip on the terminal.
440
+ * @internal
410
441
  */
411
- showWarningTip(terminal: ITerminal, tipId: CustomTipId): void;
442
+ _showInfoTip(terminal: ITerminal, tipId: CustomTipId): void;
412
443
  /**
413
444
  * If custom-tips.json defines a tip for the specified tipId,
414
445
  * display the tip on the terminal.
446
+ * @internal
447
+ */
448
+ _showWarningTip(terminal: ITerminal, tipId: CustomTipId): void;
449
+ /**
450
+ * If custom-tips.json defines a tip for the specified tipId,
451
+ * display the tip on the terminal.
452
+ * @internal
415
453
  */
416
- showErrorTip(terminal: ITerminal, tipId: CustomTipId): void;
454
+ _showErrorTip(terminal: ITerminal, tipId: CustomTipId): void;
455
+ private _formatMessageHeader;
456
+ private _writeMessageWithPipes;
457
+ }
458
+
459
+ /**
460
+ * The severity of a custom tip.
461
+ * It determines the printing severity ("Error" = red, "Warning" = yellow, "Info" = normal).
462
+ *
463
+ * @beta
464
+ */
465
+ export declare enum CustomTipSeverity {
466
+ Warning = "Warning",
467
+ Error = "Error",
468
+ Info = "Info"
469
+ }
470
+
471
+ /**
472
+ * The type of the custom tip.
473
+ *
474
+ * @remarks
475
+ * There might be types like `git` in the future.
476
+ *
477
+ * @beta
478
+ */
479
+ export declare enum CustomTipType {
480
+ rush = "rush",
481
+ pnpm = "pnpm"
417
482
  }
418
483
 
419
484
  /**
@@ -1082,6 +1147,39 @@ export declare interface ICredentialCacheOptions {
1082
1147
  supportEditing: boolean;
1083
1148
  }
1084
1149
 
1150
+ /**
1151
+ * Metadata for a custom tip.
1152
+ *
1153
+ * @remarks
1154
+ * This differs from the {@link ICustomTipItemJson} interface in that these are not configurable by the user;
1155
+ * it's the inherent state of a custom tip. For example, the custom tip for `ERR_PNPM_NO_MATCHING_VERSION`
1156
+ * has a inherent severity of `Error`, and a inherent match function that rush maintainer defines.
1157
+ *
1158
+ * @beta
1159
+ */
1160
+ export declare interface ICustomTipInfo {
1161
+ tipId: CustomTipId;
1162
+ /**
1163
+ * The severity of the custom tip. It will determine the printing severity ("Error" = red, "Warning" = yellow, "Info" = normal).
1164
+ *
1165
+ * @remarks
1166
+ * The severity should be consistent with the original message, unless there are strong reasons not to.
1167
+ */
1168
+ severity: CustomTipSeverity;
1169
+ /**
1170
+ * The type of the custom tip.
1171
+ */
1172
+ type: CustomTipType;
1173
+ /**
1174
+ * The function to determine how to match this tipId.
1175
+ *
1176
+ * @remarks
1177
+ * This function might need to be updated if the depending package is updated.
1178
+ * For example, if `pnpm` change the error logs for "ERR_PNPM_NO_MATCHING_VERSION", we will need to update the match function accordingly.
1179
+ */
1180
+ isMatch?: (str: string) => boolean;
1181
+ }
1182
+
1085
1183
  /**
1086
1184
  * An item from the {@link ICustomTipsJson.customTips} list.
1087
1185
  * @beta
@@ -1097,11 +1195,6 @@ export declare interface ICustomTipItemJson {
1097
1195
  * (REQUIRED) The message text to be displayed for this tip.
1098
1196
  */
1099
1197
  message: string;
1100
- /**
1101
- * Overrides the "defaultMessagePrefix" for this tip.
1102
- * Specify an empty string to omit the "defaultMessagePrefix" entirely.
1103
- */
1104
- messagePrefix?: string;
1105
1198
  }
1106
1199
 
1107
1200
  /**
@@ -1110,11 +1203,6 @@ export declare interface ICustomTipItemJson {
1110
1203
  * @beta
1111
1204
  */
1112
1205
  export declare interface ICustomTipsJson {
1113
- /**
1114
- * If specified, this prefix will be prepended to any the tip messages when they are displayed.
1115
- * The default value is an empty string.
1116
- */
1117
- defaultMessagePrefix?: string;
1118
1206
  /**
1119
1207
  * Specifies the custom tips to be displayed by Rush.
1120
1208
  */
@@ -1502,6 +1590,11 @@ export declare interface IOperationRunner {
1502
1590
  * exit code
1503
1591
  */
1504
1592
  warningsAreAllowed: boolean;
1593
+ /**
1594
+ * If set to true, this operation is considered a no-op and can be considered always skipped for
1595
+ * analysis purposes.
1596
+ */
1597
+ readonly isNoOp?: boolean;
1505
1598
  /**
1506
1599
  * Method to be executed for the operation.
1507
1600
  */
@@ -1718,7 +1811,7 @@ export declare interface _IPnpmOptionsJson extends IPackageManagerOptionsJsonBas
1718
1811
  /**
1719
1812
  * {@inheritDoc PnpmOptionsConfiguration.pnpmStore}
1720
1813
  */
1721
- pnpmStore?: PnpmStoreOptions;
1814
+ pnpmStore?: PnpmStoreLocation;
1722
1815
  /**
1723
1816
  * {@inheritDoc PnpmOptionsConfiguration.strictPeerDependencies}
1724
1817
  */
@@ -1759,6 +1852,10 @@ export declare interface _IPnpmOptionsJson extends IPackageManagerOptionsJsonBas
1759
1852
  * {@inheritDoc PnpmOptionsConfiguration.unsupportedPackageJsonSettings}
1760
1853
  */
1761
1854
  unsupportedPackageJsonSettings?: unknown;
1855
+ /**
1856
+ * {@inheritDoc PnpmOptionsConfiguration.resolutionMode}
1857
+ */
1858
+ resolutionMode?: PnpmResolutionMode;
1762
1859
  }
1763
1860
 
1764
1861
  declare interface IPnpmPackageExtension {
@@ -2752,7 +2849,19 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
2752
2849
  * - local: Use the standard Rush store path: common/temp/pnpm-store
2753
2850
  * - global: Use PNPM's global store path
2754
2851
  */
2755
- readonly pnpmStore: PnpmStoreOptions;
2852
+ readonly pnpmStore: PnpmStoreLocation;
2853
+ /**
2854
+ * This setting determines PNPM's `resolution-mode` option. The default value is `highest`.
2855
+ *
2856
+ * @remarks
2857
+ * Be aware that the PNPM 8 initially defaulted to `lowest` instead of `highest`, but PNPM
2858
+ * reverted this decision in 8.6.12 because it caused confusion for users. Rush 5.106.0 and newer
2859
+ * avoids this confusion by consistently defaulting to `highest` when `resolutionMode` is not
2860
+ * explicitly set in pnpm-config.json or .npmrc, regardless of your PNPM version.
2861
+ *
2862
+ * PNPM documentation: https://pnpm.io/npmrc#resolution-mode
2863
+ */
2864
+ readonly resolutionMode: PnpmResolutionMode | undefined;
2756
2865
  /**
2757
2866
  * The path for PNPM to use as the store directory.
2758
2867
  *
@@ -2896,11 +3005,27 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
2896
3005
  updateGlobalPatchedDependencies(patchedDependencies: Record<string, string> | undefined): void;
2897
3006
  }
2898
3007
 
3008
+ /**
3009
+ * Possible values for the `resolutionMode` setting in Rush's pnpm-config.json file.
3010
+ * @remarks
3011
+ * These modes correspond to PNPM's `resolution-mode` values, which are documented here:
3012
+ * {@link https://pnpm.io/npmrc#resolution-mode}
3013
+ *
3014
+ * @public
3015
+ */
3016
+ export declare type PnpmResolutionMode = 'highest' | 'time-based' | 'lowest-direct';
3017
+
2899
3018
  /**
2900
3019
  * This represents the available PNPM store options
2901
3020
  * @public
2902
3021
  */
2903
- export declare type PnpmStoreOptions = 'local' | 'global';
3022
+ export declare type PnpmStoreLocation = 'local' | 'global';
3023
+
3024
+ /**
3025
+ * @deprecated Use {@link PnpmStoreLocation} instead
3026
+ * @public
3027
+ */
3028
+ export declare type PnpmStoreOptions = PnpmStoreLocation;
2904
3029
 
2905
3030
  /**
2906
3031
  * @beta
@@ -4092,7 +4217,7 @@ export declare class RushProjectConfiguration {
4092
4217
  * Load the rush-project.json data for all selected projects.
4093
4218
  * Validate compatibility of output folders across all selected phases.
4094
4219
  */
4095
- static tryLoadAndValidateForProjectsAsync(projects: Iterable<RushConfigurationProject>, phases: ReadonlySet<IPhase>, terminal: ITerminal): Promise<ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>>;
4220
+ static tryLoadForProjectsAsync(projects: Iterable<RushConfigurationProject>, terminal: ITerminal): Promise<ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>>;
4096
4221
  private static _tryLoadJsonForProjectAsync;
4097
4222
  private static _getRushProjectConfiguration;
4098
4223
  }
@@ -5,11 +5,6 @@ import { ITerminal } from '@rushstack/node-core-library';
5
5
  * @beta
6
6
  */
7
7
  export interface ICustomTipsJson {
8
- /**
9
- * If specified, this prefix will be prepended to any the tip messages when they are displayed.
10
- * The default value is an empty string.
11
- */
12
- defaultMessagePrefix?: string;
13
8
  /**
14
9
  * Specifies the custom tips to be displayed by Rush.
15
10
  */
@@ -30,11 +25,6 @@ export interface ICustomTipItemJson {
30
25
  * (REQUIRED) The message text to be displayed for this tip.
31
26
  */
32
27
  message: string;
33
- /**
34
- * Overrides the "defaultMessagePrefix" for this tip.
35
- * Specify an empty string to omit the "defaultMessagePrefix" entirely.
36
- */
37
- messagePrefix?: string;
38
28
  }
39
29
  /**
40
30
  * An identifier representing a Rush message that can be customized by
@@ -48,7 +38,72 @@ export interface ICustomTipItemJson {
48
38
  *
49
39
  * @beta
50
40
  */
51
- export type CustomTipId = 'TIP_RUSH_INCONSISTENT_VERSIONS' | string;
41
+ export declare enum CustomTipId {
42
+ TIP_PNPM_UNEXPECTED_STORE = "TIP_PNPM_UNEXPECTED_STORE",
43
+ TIP_RUSH_INCONSISTENT_VERSIONS = "TIP_RUSH_INCONSISTENT_VERSIONS",
44
+ TIP_PNPM_NO_MATCHING_VERSION = "TIP_PNPM_NO_MATCHING_VERSION",
45
+ TIP_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE = "TIP_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE",
46
+ TIP_PNPM_PEER_DEP_ISSUES = "TIP_PNPM_PEER_DEP_ISSUES",
47
+ TIP_PNPM_OUTDATED_LOCKFILE = "TIP_PNPM_OUTDATED_LOCKFILE",
48
+ TIP_PNPM_TARBALL_INTEGRITY = "TIP_PNPM_TARBALL_INTEGRITY",
49
+ TIP_PNPM_MISMATCHED_RELEASE_CHANNEL = "TIP_PNPM_MISMATCHED_RELEASE_CHANNEL",
50
+ TIP_PNPM_INVALID_NODE_VERSION = "TIP_PNPM_INVALID_NODE_VERSION"
51
+ }
52
+ /**
53
+ * The severity of a custom tip.
54
+ * It determines the printing severity ("Error" = red, "Warning" = yellow, "Info" = normal).
55
+ *
56
+ * @beta
57
+ */
58
+ export declare enum CustomTipSeverity {
59
+ Warning = "Warning",
60
+ Error = "Error",
61
+ Info = "Info"
62
+ }
63
+ /**
64
+ * The type of the custom tip.
65
+ *
66
+ * @remarks
67
+ * There might be types like `git` in the future.
68
+ *
69
+ * @beta
70
+ */
71
+ export declare enum CustomTipType {
72
+ rush = "rush",
73
+ pnpm = "pnpm"
74
+ }
75
+ /**
76
+ * Metadata for a custom tip.
77
+ *
78
+ * @remarks
79
+ * This differs from the {@link ICustomTipItemJson} interface in that these are not configurable by the user;
80
+ * it's the inherent state of a custom tip. For example, the custom tip for `ERR_PNPM_NO_MATCHING_VERSION`
81
+ * has a inherent severity of `Error`, and a inherent match function that rush maintainer defines.
82
+ *
83
+ * @beta
84
+ */
85
+ export interface ICustomTipInfo {
86
+ tipId: CustomTipId;
87
+ /**
88
+ * The severity of the custom tip. It will determine the printing severity ("Error" = red, "Warning" = yellow, "Info" = normal).
89
+ *
90
+ * @remarks
91
+ * The severity should be consistent with the original message, unless there are strong reasons not to.
92
+ */
93
+ severity: CustomTipSeverity;
94
+ /**
95
+ * The type of the custom tip.
96
+ */
97
+ type: CustomTipType;
98
+ /**
99
+ * The function to determine how to match this tipId.
100
+ *
101
+ * @remarks
102
+ * This function might need to be updated if the depending package is updated.
103
+ * For example, if `pnpm` change the error logs for "ERR_PNPM_NO_MATCHING_VERSION", we will need to update the match function accordingly.
104
+ */
105
+ isMatch?: (str: string) => boolean;
106
+ }
52
107
  /**
53
108
  * Used to access the `common/config/rush/custom-tips.json` config file,
54
109
  * which allows repo maintainers to configure extra details to be printed alongside
@@ -64,26 +119,56 @@ export declare class CustomTipsConfiguration {
64
119
  */
65
120
  readonly configuration: Readonly<ICustomTipsJson>;
66
121
  /**
67
- * The list of identifiers that are allowed to be used in the "tipId" field
68
- * of the config file.
122
+ * A registry mapping custom tip IDs to their corresponding metadata.
123
+ *
124
+ * @remarks
125
+ * This registry is used to look up metadata for custom tips based on their IDs. The metadata includes
126
+ * information such as the severity level, the type of tip, and an optional matching function.
127
+ *
128
+ * Each key in the registry corresponds to a `CustomTipIdEnum` value, and each value is an object
129
+ * implementing the `ICustomTipInfo` interface.
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * const tipInfo = CustomTipsConfiguration.customTipRegistry[CustomTipIdEnum.TIP_RUSH_INCONSISTENT_VERSIONS];
134
+ * console.log(tipInfo.severity); // Output: CustomTipSeverity.Error
135
+ * ```
136
+ *
137
+ * See {@link CustomTipId} for the list of custom tip IDs.
138
+ * See {@link ICustomTipInfo} for the structure of the metadata.
69
139
  */
70
- static readonly supportedTipIds: ReadonlySet<string>;
140
+ static customTipRegistry: Readonly<Record<CustomTipId, ICustomTipInfo>>;
71
141
  constructor(configFilename: string);
72
- private _formatTipMessage;
73
142
  /**
74
143
  * If custom-tips.json defines a tip for the specified tipId,
75
144
  * display the tip on the terminal.
145
+ *
146
+ * @remarks
147
+ * The severity of the tip is defined in ${@link CustomTipsConfiguration.customTipRegistry}.
148
+ * If you want to change the severity specifically for this call, use other API like {@link CustomTipsConfiguration._showErrorTip}.
149
+ *
150
+ * @internal
151
+ */
152
+ _showTip(terminal: ITerminal, tipId: CustomTipId): void;
153
+ /**
154
+ * If custom-tips.json defines a tip for the specified tipId,
155
+ * display the tip on the terminal.
156
+ * @internal
76
157
  */
77
- showInfoTip(terminal: ITerminal, tipId: CustomTipId): void;
158
+ _showInfoTip(terminal: ITerminal, tipId: CustomTipId): void;
78
159
  /**
79
160
  * If custom-tips.json defines a tip for the specified tipId,
80
161
  * display the tip on the terminal.
162
+ * @internal
81
163
  */
82
- showWarningTip(terminal: ITerminal, tipId: CustomTipId): void;
164
+ _showWarningTip(terminal: ITerminal, tipId: CustomTipId): void;
83
165
  /**
84
166
  * If custom-tips.json defines a tip for the specified tipId,
85
167
  * display the tip on the terminal.
168
+ * @internal
86
169
  */
87
- showErrorTip(terminal: ITerminal, tipId: CustomTipId): void;
170
+ _showErrorTip(terminal: ITerminal, tipId: CustomTipId): void;
171
+ private _formatMessageHeader;
172
+ private _writeMessageWithPipes;
88
173
  }
89
174
  //# sourceMappingURL=CustomTipsConfiguration.d.ts.map
@@ -124,7 +124,7 @@ export declare class RushProjectConfiguration {
124
124
  * Load the rush-project.json data for all selected projects.
125
125
  * Validate compatibility of output folders across all selected phases.
126
126
  */
127
- static tryLoadAndValidateForProjectsAsync(projects: Iterable<RushConfigurationProject>, phases: ReadonlySet<IPhase>, terminal: ITerminal): Promise<ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>>;
127
+ static tryLoadForProjectsAsync(projects: Iterable<RushConfigurationProject>, terminal: ITerminal): Promise<ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>>;
128
128
  private static _tryLoadJsonForProjectAsync;
129
129
  private static _getRushProjectConfiguration;
130
130
  }
@@ -26,6 +26,10 @@ export interface IPhasedScriptActionOptions extends IBaseScriptActionOptions<IPh
26
26
  * "build" script for each project.
27
27
  */
28
28
  export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandConfig> {
29
+ /**
30
+ * @internal
31
+ */
32
+ _runsBeforeInstall: boolean | undefined;
29
33
  readonly hooks: PhasedCommandHooks;
30
34
  private readonly _enableParallelism;
31
35
  private readonly _isIncrementalBuildAllowed;
package/lib/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export { RushConfiguration, ITryFindRushJsonLocationOptions } from './api/RushCo
7
7
  export { IPackageManagerOptionsJsonBase, IConfigurationEnvironment, IConfigurationEnvironmentVariable, PackageManagerOptionsConfigurationBase } from './logic/base/BasePackageManagerOptionsConfiguration';
8
8
  export { INpmOptionsJson as _INpmOptionsJson, NpmOptionsConfiguration } from './logic/npm/NpmOptionsConfiguration';
9
9
  export { IYarnOptionsJson as _IYarnOptionsJson, YarnOptionsConfiguration } from './logic/yarn/YarnOptionsConfiguration';
10
- export { IPnpmOptionsJson as _IPnpmOptionsJson, PnpmStoreOptions, PnpmOptionsConfiguration } from './logic/pnpm/PnpmOptionsConfiguration';
10
+ export { IPnpmOptionsJson as _IPnpmOptionsJson, PnpmStoreLocation, PnpmStoreOptions, PnpmOptionsConfiguration, PnpmResolutionMode } from './logic/pnpm/PnpmOptionsConfiguration';
11
11
  export { BuildCacheConfiguration } from './api/BuildCacheConfiguration';
12
12
  export { CobuildConfiguration, ICobuildJson } from './api/CobuildConfiguration';
13
13
  export { GetCacheEntryIdFunction, IGenerateCacheEntryIdOptions } from './logic/buildCache/CacheEntryId';
@@ -33,7 +33,7 @@ export { VersionPolicyConfiguration } from './api/VersionPolicyConfiguration';
33
33
  export { ILaunchOptions, Rush } from './api/Rush';
34
34
  export { RushInternals as _RushInternals } from './api/RushInternals';
35
35
  export { ExperimentsConfiguration, IExperimentsJson } from './api/ExperimentsConfiguration';
36
- export { CustomTipsConfiguration, CustomTipId, ICustomTipsJson, ICustomTipItemJson } from './api/CustomTipsConfiguration';
36
+ export { CustomTipsConfiguration, CustomTipId, ICustomTipsJson, ICustomTipInfo, ICustomTipItemJson, CustomTipSeverity, CustomTipType } from './api/CustomTipsConfiguration';
37
37
  export { ProjectChangeAnalyzer, IGetChangedProjectsOptions, IRawRepoState as _IRawRepoState } from './logic/ProjectChangeAnalyzer';
38
38
  export { IOperationRunner, IOperationRunnerContext } from './logic/operations/IOperationRunner';
39
39
  export { IExecutionResult, IOperationExecutionResult } from './logic/operations/IOperationExecutionResult';
@@ -6,6 +6,7 @@ import { ProjectLogWritable } from './ProjectLogWritable';
6
6
  import { CobuildConfiguration } from '../../api/CobuildConfiguration';
7
7
  import { PeriodicCallback } from './PeriodicCallback';
8
8
  import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
9
+ import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer';
9
10
  import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
10
11
  export interface IProjectDeps {
11
12
  files: {
@@ -16,6 +17,7 @@ export interface IProjectDeps {
16
17
  export interface IOperationBuildCacheContext {
17
18
  isCacheWriteAllowed: boolean;
18
19
  isCacheReadAllowed: boolean;
20
+ projectChangeAnalyzer: ProjectChangeAnalyzer;
19
21
  projectBuildCache: ProjectBuildCache | undefined;
20
22
  cacheDisabledReason: string | undefined;
21
23
  operationSettings: IOperationSettings | undefined;
@@ -35,7 +37,6 @@ export interface ICacheableOperationPluginOptions {
35
37
  }
36
38
  export declare class CacheableOperationPlugin implements IPhasedCommandPlugin {
37
39
  private _buildCacheContextByOperation;
38
- private _createContext;
39
40
  private readonly _options;
40
41
  constructor(options: ICacheableOperationPluginOptions);
41
42
  apply(hooks: PhasedCommandHooks): void;
@@ -84,6 +84,11 @@ export interface IOperationRunner {
84
84
  * exit code
85
85
  */
86
86
  warningsAreAllowed: boolean;
87
+ /**
88
+ * If set to true, this operation is considered a no-op and can be considered always skipped for
89
+ * analysis purposes.
90
+ */
91
+ readonly isNoOp?: boolean;
87
92
  /**
88
93
  * Method to be executed for the operation.
89
94
  */
@@ -27,6 +27,7 @@ export declare class NullOperationRunner implements IOperationRunner {
27
27
  readonly silent: boolean;
28
28
  cacheable: boolean;
29
29
  readonly warningsAreAllowed: boolean;
30
+ readonly isNoOp: boolean;
30
31
  readonly result: OperationStatus;
31
32
  constructor({ name, result, silent }: INullOperationRunnerParams);
32
33
  executeAsync(context: IOperationRunnerContext): Promise<OperationStatus>;
@@ -0,0 +1,13 @@
1
+ import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
2
+ import type { ITerminal } from '@rushstack/node-core-library';
3
+ /**
4
+ * Core phased command plugin that provides the functionality for generating a base operation graph
5
+ * from the set of selected projects and phases.
6
+ */
7
+ export declare class ValidateOperationsPlugin implements IPhasedCommandPlugin {
8
+ private readonly _terminal;
9
+ constructor(terminal: ITerminal);
10
+ apply(hooks: PhasedCommandHooks): void;
11
+ private _validateOperations;
12
+ }
13
+ //# sourceMappingURL=ValidateOperationsPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/ValidateOperationsPlugin");
@@ -3,7 +3,21 @@ import { IPackageManagerOptionsJsonBase, PackageManagerOptionsConfigurationBase
3
3
  * This represents the available PNPM store options
4
4
  * @public
5
5
  */
6
- export type PnpmStoreOptions = 'local' | 'global';
6
+ export type PnpmStoreLocation = 'local' | 'global';
7
+ /**
8
+ * @deprecated Use {@link PnpmStoreLocation} instead
9
+ * @public
10
+ */
11
+ export type PnpmStoreOptions = PnpmStoreLocation;
12
+ /**
13
+ * Possible values for the `resolutionMode` setting in Rush's pnpm-config.json file.
14
+ * @remarks
15
+ * These modes correspond to PNPM's `resolution-mode` values, which are documented here:
16
+ * {@link https://pnpm.io/npmrc#resolution-mode}
17
+ *
18
+ * @public
19
+ */
20
+ export type PnpmResolutionMode = 'highest' | 'time-based' | 'lowest-direct';
7
21
  /**
8
22
  * @beta
9
23
  */
@@ -31,7 +45,7 @@ export interface IPnpmOptionsJson extends IPackageManagerOptionsJsonBase {
31
45
  /**
32
46
  * {@inheritDoc PnpmOptionsConfiguration.pnpmStore}
33
47
  */
34
- pnpmStore?: PnpmStoreOptions;
48
+ pnpmStore?: PnpmStoreLocation;
35
49
  /**
36
50
  * {@inheritDoc PnpmOptionsConfiguration.strictPeerDependencies}
37
51
  */
@@ -72,6 +86,10 @@ export interface IPnpmOptionsJson extends IPackageManagerOptionsJsonBase {
72
86
  * {@inheritDoc PnpmOptionsConfiguration.unsupportedPackageJsonSettings}
73
87
  */
74
88
  unsupportedPackageJsonSettings?: unknown;
89
+ /**
90
+ * {@inheritDoc PnpmOptionsConfiguration.resolutionMode}
91
+ */
92
+ resolutionMode?: PnpmResolutionMode;
75
93
  }
76
94
  /**
77
95
  * Options that are only used when the PNPM package manager is selected.
@@ -96,7 +114,19 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
96
114
  * - local: Use the standard Rush store path: common/temp/pnpm-store
97
115
  * - global: Use PNPM's global store path
98
116
  */
99
- readonly pnpmStore: PnpmStoreOptions;
117
+ readonly pnpmStore: PnpmStoreLocation;
118
+ /**
119
+ * This setting determines PNPM's `resolution-mode` option. The default value is `highest`.
120
+ *
121
+ * @remarks
122
+ * Be aware that the PNPM 8 initially defaulted to `lowest` instead of `highest`, but PNPM
123
+ * reverted this decision in 8.6.12 because it caused confusion for users. Rush 5.106.0 and newer
124
+ * avoids this confusion by consistently defaulting to `highest` when `resolutionMode` is not
125
+ * explicitly set in pnpm-config.json or .npmrc, regardless of your PNPM version.
126
+ *
127
+ * PNPM documentation: https://pnpm.io/npmrc#resolution-mode
128
+ */
129
+ readonly resolutionMode: PnpmResolutionMode | undefined;
100
130
  /**
101
131
  * The path for PNPM to use as the store directory.
102
132
  *
@@ -108,6 +108,13 @@ export declare class Utilities {
108
108
  * The current directory will be set to the specified workingDirectory.
109
109
  */
110
110
  static executeCommand(options: IExecuteCommandOptions): void;
111
+ /**
112
+ * Executes the command with the specified command-line parameters, and waits for it to complete.
113
+ * The current directory will be set to the specified workingDirectory.
114
+ *
115
+ * It's basically the same as executeCommand() except that it returns a Promise.
116
+ */
117
+ static executeCommandAndInspectOutputAsync(options: IExecuteCommandOptions, onStdoutStreamChunk?: (chunkString: string) => void): Promise<void>;
111
118
  /**
112
119
  * Executes the command with the specified command-line parameters, and waits for it to complete.
113
120
  * The current directory will be set to the specified workingDirectory.
@@ -117,6 +124,13 @@ export declare class Utilities {
117
124
  * Attempts to run Utilities.executeCommand() up to maxAttempts times before giving up.
118
125
  */
119
126
  static executeCommandWithRetry(options: IExecuteCommandOptions, maxAttempts: number, retryCallback?: () => void): void;
127
+ /**
128
+ * Attempts to run Utilities.executeCommand() up to maxAttempts times before giving up.
129
+ * Using `onStdoutStreamChunk` to process the output of the command.
130
+ *
131
+ * Note: This is similar to {@link executeCommandWithRetry} except that it returns a Promise and provides a callback to process the output.
132
+ */
133
+ static executeCommandAndProcessOutputWithRetryAsync(options: IExecuteCommandOptions, maxAttempts: number, onStdoutStreamChunk?: (chunkString: string) => void, retryCallback?: () => void): Promise<void>;
120
134
  /**
121
135
  * Executes the command using cmd if running on windows, or using sh if running on a non-windows OS.
122
136
  * @param command - the command to run on shell
@@ -163,6 +177,13 @@ export declare class Utilities {
163
177
  * "/foobar/node_modules/.bin:/bin"
164
178
  */
165
179
  private static _prependNodeModulesBinToPath;
180
+ /**
181
+ * Executes the command with the specified command-line parameters, and waits for it to complete.
182
+ * The current directory will be set to the specified workingDirectory.
183
+ *
184
+ * It's the same as _executeCommandInternal except that it returns a promise.
185
+ */
186
+ private static _executeCommandAndInspectOutputInternalAsync;
166
187
  /**
167
188
  * Executes the command with the specified command-line parameters, and waits for it to complete.
168
189
  * The current directory will be set to the specified workingDirectory.
@@ -12,4 +12,5 @@ export interface ILogger {
12
12
  * The text of the the synced .npmrc, if one exists. If one does not exist, then undefined is returned.
13
13
  */
14
14
  export declare function syncNpmrc(sourceNpmrcFolder: string, targetNpmrcFolder: string, useNpmrcPublish?: boolean, logger?: ILogger): string | undefined;
15
+ export declare function isVariableSetInNpmrcFile(sourceNpmrcFolder: string, variableKey: string): boolean;
15
16
  //# sourceMappingURL=npmrcUtilities.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.104.1",
3
+ "version": "5.106.0",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,7 +31,7 @@
31
31
  "@types/node": "14.18.36",
32
32
  "@types/semver": "7.5.0",
33
33
  "@types/webpack-env": "1.18.0",
34
- "@microsoft/rush-lib": "5.104.1",
34
+ "@microsoft/rush-lib": "5.106.0",
35
35
  "@rushstack/eslint-config": "3.3.3",
36
36
  "@rushstack/heft": "0.58.2",
37
37
  "@rushstack/heft-node-rig": "2.2.22",