@rushstack/rush-sdk 5.158.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.
@@ -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
  /**
@@ -2189,6 +2193,12 @@ export declare interface IPhasedCommand extends IRushCommand {
2189
2193
  * @alpha
2190
2194
  */
2191
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;
2192
2202
  }
2193
2203
 
2194
2204
  /**
@@ -3103,7 +3113,11 @@ export declare enum OperationStatus {
3103
3113
  /**
3104
3114
  * The Operation was a no-op (for example, it had an empty script)
3105
3115
  */
3106
- NoOp = "NO OP"
3116
+ NoOp = "NO OP",
3117
+ /**
3118
+ * The Operation was aborted before it could execute.
3119
+ */
3120
+ Aborted = "ABORTED"
3107
3121
  }
3108
3122
 
3109
3123
  /**
@@ -4944,7 +4958,10 @@ export declare class Subspace {
4944
4958
  * Returns the full path of the folder containing this subspace's variant-dependent configuration files
4945
4959
  * such as `pnpm-lock.yaml`.
4946
4960
  *
4947
- * Example: `common/config/subspaces/my-subspace` or `common/config/subspaces/my-subspace/variants/my-variant`
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`
4948
4965
  * @beta
4949
4966
  *
4950
4967
  * @remarks
@@ -4957,22 +4974,24 @@ export declare class Subspace {
4957
4974
  /**
4958
4975
  * Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
4959
4976
  *
4960
- * Example: `common/config/subspaces/my-subspace`
4977
+ * Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace`
4978
+ * Example (subspaces feature disabled): `C:\MyRepo\common\config\rush`
4961
4979
  * @beta
4962
4980
  */
4963
4981
  getSubspaceConfigFolderPath(): string;
4964
4982
  /**
4965
4983
  * Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
4966
4984
  *
4967
- * Example: `common/config/subspaces/my-subspace/pnpm-patches` (subspaces feature enabled)
4968
- * Example: `common/config/pnpm-patches` (subspaces feature disabled)
4985
+ * Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-patches`
4986
+ * Example (subspaces feature disabled): `C:\MyRepo\common\pnpm-patches`
4969
4987
  * @beta
4970
4988
  */
4971
4989
  getSubspacePnpmPatchesFolderPath(): string;
4972
4990
  /**
4973
- * 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.
4974
4992
  *
4975
- * Example: `common/temp/subspaces/my-subspace`
4993
+ * Example (subspaces feature enabled): `C:\MyRepo\common\temp\subspaces\my-subspace`
4994
+ * Example (subspaces feature disabled): `C:\MyRepo\common\temp`
4976
4995
  * @beta
4977
4996
  */
4978
4997
  getSubspaceTempFolderPath(): string;
@@ -5004,16 +5023,18 @@ export declare class Subspace {
5004
5023
  */
5005
5024
  getTempShrinkwrapPreinstallFilePath(): string;
5006
5025
  /**
5007
- * 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.
5008
5027
  *
5009
- * Example: `C:\MyRepo\common\subspaces\my-subspace\common-versions.json`
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`
5010
5030
  * @beta
5011
5031
  */
5012
5032
  getCommonVersionsFilePath(variant?: string): string;
5013
5033
  /**
5014
- * 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.
5015
5035
  *
5016
- * Example: `C:\MyRepo\common\subspaces\my-subspace\pnpm-config.json`
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`
5017
5038
  * @beta
5018
5039
  */
5019
5040
  getPnpmConfigFilePath(): string;
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.11"
8
+ "packageVersion": "7.52.13"
9
9
  }
10
10
  ]
11
11
  }
@@ -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
  /**
@@ -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: `common/config/subspaces/my-subspace` or `common/config/subspaces/my-subspace/variants/my-variant`
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: `common/config/subspaces/my-subspace`
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: `common/config/subspaces/my-subspace/pnpm-patches` (subspaces feature enabled)
65
- * Example: `common/config/pnpm-patches` (subspaces feature disabled)
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: `common/temp/subspaces/my-subspace`
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: `C:\MyRepo\common\subspaces\my-subspace\common-versions.json`
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: `C:\MyRepo\common\subspaces\my-subspace\pnpm-config.json`
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,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;
@@ -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: (requestor?: string) => void;
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
- static loadFromFile(shrinkwrapYamlFilePath: string, { withCaching }?: ILoadFromFileOptions): PnpmShrinkwrapFile | undefined;
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.158.0",
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/lookup-by-path": "0.7.4",
40
- "@rushstack/node-core-library": "5.14.0",
41
- "@rushstack/package-deps-hash": "4.4.5",
42
- "@rushstack/terminal": "0.15.4"
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
- "@microsoft/rush-lib": "5.158.0",
50
- "@rushstack/heft": "0.74.3",
51
- "@rushstack/heft-webpack5-plugin": "0.11.39",
52
- "@rushstack/ts-command-line": "5.0.2",
53
- "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.106",
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
54
  "local-node-rig": "1.0.0",
55
- "@rushstack/stream-collator": "4.1.107"
55
+ "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.108"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "heft build --clean",