@rushstack/rush-sdk 5.108.0 → 5.109.1-pr3481.21
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 +215 -28
- package/lib/api/EnvironmentConfiguration.d.ts +16 -1
- package/lib/api/EventHooks.d.ts +9 -1
- package/lib/api/ExperimentsConfiguration.d.ts +5 -0
- package/lib/api/LastInstallFlag.d.ts +58 -21
- package/lib/api/LastLinkFlag.d.ts +2 -6
- package/lib/api/Rush.d.ts +13 -6
- package/lib/api/RushConfiguration.d.ts +52 -0
- package/lib/api/RushConfigurationProject.d.ts +6 -0
- package/lib/api/base/BaseFlag.d.ts +50 -0
- package/lib/api/base/BaseFlag.js +1 -0
- package/lib/api/packageManager/PnpmPackageManager.d.ts +14 -0
- package/lib/cli/RushXCommandLine.d.ts +4 -6
- package/lib/cli/actions/InstallAction.d.ts +7 -0
- package/lib/cli/actions/ListAction.d.ts +4 -0
- package/lib/cli/actions/UpdateAction.d.ts +7 -0
- package/lib/cli/parsing/SelectionParameterSet.d.ts +17 -3
- package/lib/index.d.ts +2 -1
- package/lib/logic/PurgeManager.d.ts +1 -0
- package/lib/logic/RushConstants.d.ts +6 -0
- package/lib/logic/UnlinkManager.d.ts +2 -2
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +23 -0
- package/lib/logic/installManager/InstallHelpers.d.ts +1 -0
- package/lib/logic/pnpm/IPnpmfile.d.ts +16 -0
- package/lib/logic/pnpm/PnpmOptionsConfiguration.d.ts +11 -0
- package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.d.ts +8 -1
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +17 -0
- package/lib/logic/pnpm/SplitWorkspaceGlobalPnpmfileShim.d.ts +3 -0
- package/lib/logic/pnpm/SplitWorkspaceGlobalPnpmfileShim.js +1 -0
- package/lib/logic/pnpm/SplitWorkspacePnpmfileConfiguration.d.ts +23 -0
- package/lib/logic/pnpm/SplitWorkspacePnpmfileConfiguration.js +1 -0
- package/lib/logic/selectors/SplitWorkspaceProjectSelectorParser.d.ts +10 -0
- package/lib/logic/selectors/SplitWorkspaceProjectSelectorParser.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderProject.d.ts +2 -0
- package/lib/utilities/PathConstants.d.ts +1 -0
- package/lib/utilities/Utilities.d.ts +10 -0
- package/lib/utilities/npmrcUtilities.d.ts +1 -1
- package/lib/utilities/objectUtilities.d.ts +5 -0
- package/lib-shim/helpers.d.ts +1 -1
- package/lib-shim/helpers.d.ts.map +1 -1
- package/lib-shim/helpers.js.map +1 -1
- package/package.json +2 -2
|
@@ -118,6 +118,15 @@ export interface IRushConfigurationJson {
|
|
|
118
118
|
export interface ICurrentVariantJson {
|
|
119
119
|
variant: string | JsonNull;
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* The filter parameters to search from all projects.
|
|
123
|
+
*/
|
|
124
|
+
export interface IRushConfigurationProjectsFilter {
|
|
125
|
+
/**
|
|
126
|
+
* If true, filter out projects that specify splitWorkspace as true.
|
|
127
|
+
*/
|
|
128
|
+
splitWorkspace: boolean;
|
|
129
|
+
}
|
|
121
130
|
/**
|
|
122
131
|
* Options for `RushConfiguration.tryFindRushJsonLocation`.
|
|
123
132
|
* @public
|
|
@@ -144,6 +153,8 @@ export declare class RushConfiguration {
|
|
|
144
153
|
private _projects;
|
|
145
154
|
private _projectsByName;
|
|
146
155
|
private _projectsByTag;
|
|
156
|
+
private _filteredProjectsCache;
|
|
157
|
+
private _hasSplitWorkspaceProject;
|
|
147
158
|
private _commonVersionsConfigurationsByVariant;
|
|
148
159
|
/**
|
|
149
160
|
* The name of the package manager being used to install dependencies
|
|
@@ -198,6 +209,12 @@ export declare class RushConfiguration {
|
|
|
198
209
|
* Example: `C:\MyRepo\common\temp`
|
|
199
210
|
*/
|
|
200
211
|
readonly commonTempFolder: string;
|
|
212
|
+
/**
|
|
213
|
+
* The folder where temporary files will be stored. This is always a subfolder called "temp"
|
|
214
|
+
* under the common folder.
|
|
215
|
+
* Example: `C:\MyRepo\common\temp-split`
|
|
216
|
+
*/
|
|
217
|
+
readonly commonTempSplitFolder: string;
|
|
201
218
|
/**
|
|
202
219
|
* The folder where automation scripts are stored. This is always a subfolder called "scripts"
|
|
203
220
|
* under the common folder.
|
|
@@ -252,6 +269,21 @@ export declare class RushConfiguration {
|
|
|
252
269
|
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
253
270
|
*/
|
|
254
271
|
readonly tempShrinkwrapPreinstallFilename: string;
|
|
272
|
+
/**
|
|
273
|
+
* The filename (without any path) of the shrinkwrap file for split workspace that is used by the package manager.
|
|
274
|
+
* @remarks
|
|
275
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
276
|
+
* Example: `pnpm-lock.yaml`
|
|
277
|
+
*/
|
|
278
|
+
readonly splitWorkspaceShrinkwrapFilename: string;
|
|
279
|
+
/**
|
|
280
|
+
* The full path of the temporary shrinkwrap file for split workspace that is used during
|
|
281
|
+
* "rush install". This file may get rewritten by the package manager during installation.
|
|
282
|
+
* @remarks
|
|
283
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
284
|
+
* Example: `C:\MyRepo\common\temp-split\pnpm-lock.yaml`
|
|
285
|
+
*/
|
|
286
|
+
readonly tempSplitWorkspaceShrinkwrapFilename: string;
|
|
255
287
|
/**
|
|
256
288
|
* The filename of the variant dependency data file. By default this is
|
|
257
289
|
* called 'current-variant.json' resides in the Rush common folder.
|
|
@@ -518,6 +550,11 @@ export declare class RushConfiguration {
|
|
|
518
550
|
* @beta
|
|
519
551
|
*/
|
|
520
552
|
get projectsByTag(): ReadonlyMap<string, ReadonlySet<RushConfigurationProject>>;
|
|
553
|
+
/**
|
|
554
|
+
* Search for projects according to filter
|
|
555
|
+
* @beta
|
|
556
|
+
*/
|
|
557
|
+
getFilteredProjects(filter: IRushConfigurationProjectsFilter): RushConfigurationProject[];
|
|
521
558
|
/**
|
|
522
559
|
* Settings from the common-versions.json config file.
|
|
523
560
|
* @remarks
|
|
@@ -536,6 +573,10 @@ export declare class RushConfiguration {
|
|
|
536
573
|
* or "rush update".
|
|
537
574
|
*/
|
|
538
575
|
get currentInstalledVariant(): string | undefined;
|
|
576
|
+
/**
|
|
577
|
+
* Is there any split workspace project.
|
|
578
|
+
*/
|
|
579
|
+
get hasSplitWorkspaceProject(): boolean;
|
|
539
580
|
/**
|
|
540
581
|
* Gets the path to the common-versions.json config file for a specific variant.
|
|
541
582
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -568,6 +609,11 @@ export declare class RushConfiguration {
|
|
|
568
609
|
* @param variant - The name of the current variant in use by the active command.
|
|
569
610
|
*/
|
|
570
611
|
getCommittedShrinkwrapFilename(variant?: string | undefined): string;
|
|
612
|
+
/**
|
|
613
|
+
* Gets the committed shrinkwrap file name for split workspace.
|
|
614
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
615
|
+
*/
|
|
616
|
+
getCommittedSplitWorkspaceShrinkwrapFilename(): string;
|
|
571
617
|
/**
|
|
572
618
|
* Gets the absolute path for "pnpmfile.js" for a specific variant.
|
|
573
619
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -603,5 +649,11 @@ export declare class RushConfiguration {
|
|
|
603
649
|
*/
|
|
604
650
|
tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
|
|
605
651
|
private _getVariantConfigFolderPath;
|
|
652
|
+
/**
|
|
653
|
+
* Split workspace can only works on PNPM with "useWorkspaces" enabled.
|
|
654
|
+
* The workspace project can NOT depend on a split workspace project.
|
|
655
|
+
* The split workspace project CAN depend on a workspace project.
|
|
656
|
+
*/
|
|
657
|
+
private _validateSplitWorkspaceRelationships;
|
|
606
658
|
}
|
|
607
659
|
//# sourceMappingURL=RushConfiguration.d.ts.map
|
|
@@ -16,6 +16,7 @@ export interface IRushConfigurationProjectJson {
|
|
|
16
16
|
skipRushCheck?: boolean;
|
|
17
17
|
publishFolder?: string;
|
|
18
18
|
tags?: string[];
|
|
19
|
+
splitWorkspace?: boolean;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* @internal
|
|
@@ -151,6 +152,11 @@ export declare class RushConfigurationProject {
|
|
|
151
152
|
* @beta
|
|
152
153
|
*/
|
|
153
154
|
readonly tags: ReadonlySet<string>;
|
|
155
|
+
/**
|
|
156
|
+
* Whether this project is a split workspace project.
|
|
157
|
+
* @beta
|
|
158
|
+
*/
|
|
159
|
+
readonly splitWorkspace: boolean;
|
|
154
160
|
/** @internal */
|
|
155
161
|
constructor(options: IRushConfigurationProjectOptions);
|
|
156
162
|
/**
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type JsonObject } from '@rushstack/node-core-library';
|
|
2
|
+
/**
|
|
3
|
+
* A base class for flag file.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class BaseFlag<T extends object = JsonObject> {
|
|
7
|
+
/**
|
|
8
|
+
* Flag file path
|
|
9
|
+
*/
|
|
10
|
+
readonly path: string;
|
|
11
|
+
/**
|
|
12
|
+
* Content of the flag
|
|
13
|
+
*/
|
|
14
|
+
protected _state: T;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the current state is modified
|
|
17
|
+
*/
|
|
18
|
+
protected _isModified: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new flag file
|
|
21
|
+
* @param folderPath - the folder that this flag is managing
|
|
22
|
+
* @param state - optional, the state that should be managed or compared
|
|
23
|
+
*/
|
|
24
|
+
constructor(folderPath: string, state?: Partial<T>);
|
|
25
|
+
/**
|
|
26
|
+
* Returns true if the file exists and the contents match the current state.
|
|
27
|
+
*/
|
|
28
|
+
isValid(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Writes the flag file to disk with the current state
|
|
31
|
+
*/
|
|
32
|
+
create(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Merge new data into current state by "merge"
|
|
35
|
+
*/
|
|
36
|
+
mergeFromObject(data: JsonObject): void;
|
|
37
|
+
/**
|
|
38
|
+
* Writes the flag file to disk with the current state if modified
|
|
39
|
+
*/
|
|
40
|
+
saveIfModified(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Removes the flag file
|
|
43
|
+
*/
|
|
44
|
+
clear(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Returns Name of the flag file
|
|
47
|
+
*/
|
|
48
|
+
protected get flagName(): string;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=BaseFlag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("api/base/BaseFlag");
|
|
@@ -11,7 +11,21 @@ export declare class PnpmPackageManager extends PackageManager {
|
|
|
11
11
|
* Example: `pnpmfile.js` or `.pnpmfile.cjs`
|
|
12
12
|
*/
|
|
13
13
|
readonly pnpmfileFilename: string;
|
|
14
|
+
/**
|
|
15
|
+
* The filename of the shrinkwrap file of split workspace that is used by the package manager.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Example: `.pnpmfile-split-workspace.cjs`
|
|
19
|
+
*/
|
|
20
|
+
splitWorkspacePnpmfileFilename: string;
|
|
14
21
|
/** @internal */
|
|
15
22
|
constructor(version: string);
|
|
23
|
+
/**
|
|
24
|
+
* The filename of the global shrinkwrap file that is used by the package manager.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Example: `global-pnpmfile.cjs`
|
|
28
|
+
*/
|
|
29
|
+
get globalPnpmfileFilename(): string;
|
|
16
30
|
}
|
|
17
31
|
//# sourceMappingURL=PnpmPackageManager.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ILaunchOptions } from '../api/Rush';
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*/
|
|
@@ -6,12 +7,9 @@ export interface ILaunchRushXInternalOptions {
|
|
|
6
7
|
alreadyReportedNodeTooNewError?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare class RushXCommandLine {
|
|
9
|
-
static launchRushX(launcherVersion: string,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
static _launchRushXInternal(launcherVersion: string, options: ILaunchRushXInternalOptions): void;
|
|
14
|
-
private static _getCommandLineArguments;
|
|
10
|
+
static launchRushX(launcherVersion: string, options: ILaunchOptions): void;
|
|
11
|
+
private static _launchRushXInternal;
|
|
12
|
+
private static _parseCommandLineArguments;
|
|
15
13
|
private static _showUsage;
|
|
16
14
|
}
|
|
17
15
|
//# sourceMappingURL=RushXCommandLine.d.ts.map
|
|
@@ -3,6 +3,13 @@ import type { IInstallManagerOptions } from '../../logic/base/BaseInstallManager
|
|
|
3
3
|
import type { RushCommandLineParser } from '../RushCommandLineParser';
|
|
4
4
|
export declare class InstallAction extends BaseInstallAction {
|
|
5
5
|
private readonly _checkOnlyParameter;
|
|
6
|
+
private _ignoreScriptsParameter;
|
|
7
|
+
/**
|
|
8
|
+
* Whether split workspace projects are included in install
|
|
9
|
+
*
|
|
10
|
+
* This parameter only supported when there is split workspace project
|
|
11
|
+
*/
|
|
12
|
+
private _includeSplitWorkspaceParameter?;
|
|
6
13
|
constructor(parser: RushCommandLineParser);
|
|
7
14
|
protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
|
|
8
15
|
}
|
|
@@ -34,6 +34,10 @@ export interface IJsonEntry {
|
|
|
34
34
|
* @see {@link ../../api/RushConfigurationProject#RushConfigurationProject.tags | RushConfigurationProject.tags}
|
|
35
35
|
*/
|
|
36
36
|
tags: string[];
|
|
37
|
+
/**
|
|
38
|
+
* @see {@link ../../api/RushConfigurationProject#RushConfigurationProject.splitWorkspace | RushConfigurationProject.splitWorkspace}
|
|
39
|
+
*/
|
|
40
|
+
splitWorkspace: boolean;
|
|
37
41
|
}
|
|
38
42
|
export interface IJsonOutput {
|
|
39
43
|
projects: IJsonEntry[];
|
|
@@ -4,6 +4,13 @@ import type { RushCommandLineParser } from '../RushCommandLineParser';
|
|
|
4
4
|
export declare class UpdateAction extends BaseInstallAction {
|
|
5
5
|
private readonly _fullParameter;
|
|
6
6
|
private readonly _recheckParameter;
|
|
7
|
+
private _ignoreScriptsParameter;
|
|
8
|
+
/**
|
|
9
|
+
* Whether split workspace projects are included in update
|
|
10
|
+
*
|
|
11
|
+
* This parameter only supported when there is split workspace project
|
|
12
|
+
*/
|
|
13
|
+
private _includeSplitWorkspaceParameter?;
|
|
7
14
|
constructor(parser: RushCommandLineParser);
|
|
8
15
|
protected runAsync(): Promise<void>;
|
|
9
16
|
protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
|
|
@@ -20,7 +20,15 @@ export declare class SelectionParameterSet {
|
|
|
20
20
|
private readonly _fromVersionPolicy;
|
|
21
21
|
private readonly _toVersionPolicy;
|
|
22
22
|
private readonly _selectorParserByScope;
|
|
23
|
+
private readonly _selectors;
|
|
24
|
+
private _isSelectionSpecified;
|
|
23
25
|
constructor(rushConfiguration: RushConfiguration, action: CommandLineParameterProvider, gitOptions: IGitSelectorParserOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Check if any of the selection parameters have a value specified on the command line
|
|
28
|
+
*
|
|
29
|
+
* Returns true if specifying any selection parameters, otherwise false.
|
|
30
|
+
*/
|
|
31
|
+
get isSelectionSpecified(): boolean;
|
|
24
32
|
/**
|
|
25
33
|
* Computes the set of selected projects based on all parameter values.
|
|
26
34
|
*
|
|
@@ -28,14 +36,19 @@ export declare class SelectionParameterSet {
|
|
|
28
36
|
*/
|
|
29
37
|
getSelectedProjectsAsync(terminal: ITerminal): Promise<Set<RushConfigurationProject>>;
|
|
30
38
|
/**
|
|
31
|
-
* Represents the selection as `--filter` parameters to pnpm
|
|
39
|
+
* Represents the selection as `--filter` parameters to pnpm, and selected projects when partial install
|
|
32
40
|
*
|
|
33
41
|
* @remarks
|
|
34
42
|
* This is a separate from the selection to allow the filters to be represented more concisely.
|
|
35
43
|
*
|
|
36
|
-
* @see https://pnpm.
|
|
44
|
+
* @see https://pnpm.io/filtering
|
|
37
45
|
*/
|
|
38
|
-
getPnpmFilterArgumentsAsync(terminal: ITerminal): Promise<
|
|
46
|
+
getPnpmFilterArgumentsAsync(terminal: ITerminal): Promise<{
|
|
47
|
+
pnpmFilterArguments: string[];
|
|
48
|
+
splitWorkspacePnpmFilterArguments: string[];
|
|
49
|
+
selectedProjects: Set<RushConfigurationProject> | undefined;
|
|
50
|
+
hasSelectSplitWorkspaceProject: boolean;
|
|
51
|
+
}>;
|
|
39
52
|
/**
|
|
40
53
|
* Usage telemetry for selection parameters. Only saved locally, and if requested in the config.
|
|
41
54
|
*/
|
|
@@ -47,5 +60,6 @@ export declare class SelectionParameterSet {
|
|
|
47
60
|
* Handles '.', unscoped names, and scoped names.
|
|
48
61
|
*/
|
|
49
62
|
private _evaluateProjectParameterAsync;
|
|
63
|
+
toArguments(): string[];
|
|
50
64
|
}
|
|
51
65
|
//# sourceMappingURL=SelectionParameterSet.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -27,7 +27,8 @@ export { RepoStateFile } from './logic/RepoStateFile';
|
|
|
27
27
|
export { LookupByPath, IPrefixMatch } from './logic/LookupByPath';
|
|
28
28
|
export { EventHooks, Event } from './api/EventHooks';
|
|
29
29
|
export { ChangeManager } from './api/ChangeManager';
|
|
30
|
-
export { LastInstallFlag as _LastInstallFlag, ILockfileValidityCheckOptions as _ILockfileValidityCheckOptions } from './api/LastInstallFlag';
|
|
30
|
+
export { LastInstallFlag as _LastInstallFlag, ILastInstallFlagJson as _ILastInstallFlagJson, ILockfileValidityCheckOptions as _ILockfileValidityCheckOptions } from './api/LastInstallFlag';
|
|
31
|
+
export { BaseFlag as _BaseFlag } from './api/base/BaseFlag';
|
|
31
32
|
export { VersionPolicyDefinitionName, BumpType, LockStepVersionPolicy, IndividualVersionPolicy, VersionPolicy } from './api/VersionPolicy';
|
|
32
33
|
export { VersionPolicyConfiguration } from './api/VersionPolicyConfiguration';
|
|
33
34
|
export { ILaunchOptions, Rush } from './api/Rush';
|
|
@@ -9,6 +9,7 @@ export declare class PurgeManager {
|
|
|
9
9
|
private _rushGlobalFolder;
|
|
10
10
|
private _rushUserFolderRecycler;
|
|
11
11
|
readonly commonTempFolderRecycler: AsyncRecycler;
|
|
12
|
+
readonly commonTempSplitFolderRecycler: AsyncRecycler;
|
|
12
13
|
constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder);
|
|
13
14
|
/**
|
|
14
15
|
* Performs the AsyncRecycler.deleteAll() operation. This should be called before
|
|
@@ -43,6 +43,12 @@ export declare class RushConstants {
|
|
|
43
43
|
* Example: `C:\MyRepo\common\temp`
|
|
44
44
|
*/
|
|
45
45
|
static readonly rushTempFolderName: string;
|
|
46
|
+
/**
|
|
47
|
+
* The folder name ("temp-split") under the common folder, or under the .rush folder in each project's directory where
|
|
48
|
+
* temporary files will be stored.
|
|
49
|
+
* Example: `C:\MyRepo\common\temp-split`
|
|
50
|
+
*/
|
|
51
|
+
static readonly rushTempSplitFolderName: string;
|
|
46
52
|
/**
|
|
47
53
|
* The folder name ("projects") where temporary projects will be stored.
|
|
48
54
|
* Example: `C:\MyRepo\common\temp\projects`
|
|
@@ -11,7 +11,7 @@ export declare class UnlinkManager {
|
|
|
11
11
|
*
|
|
12
12
|
* Returns true if anything was deleted.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
unlinkAsync(force?: boolean): Promise<boolean>;
|
|
15
15
|
/**
|
|
16
16
|
* Delete:
|
|
17
17
|
* - all the node_modules symlinks of configured Rush projects
|
|
@@ -19,6 +19,6 @@ export declare class UnlinkManager {
|
|
|
19
19
|
*
|
|
20
20
|
* Returns true if anything was deleted
|
|
21
21
|
* */
|
|
22
|
-
private
|
|
22
|
+
private _deleteProjectFilesAsync;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=UnlinkManager.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { SelectionParameterSet } from '../../cli/parsing/SelectionParameterSet';
|
|
2
|
+
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
1
3
|
export interface IInstallManagerOptions {
|
|
2
4
|
/**
|
|
3
5
|
* Whether the global "--debug" flag was specified.
|
|
@@ -74,5 +76,26 @@ export interface IInstallManagerOptions {
|
|
|
74
76
|
* Callback to invoke between preparing the common/temp folder and running installation.
|
|
75
77
|
*/
|
|
76
78
|
beforeInstallAsync?: () => Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Whether to specify "--ignore-scripts" command-line parameter, which ignores
|
|
81
|
+
* install lifecycle scripts in package.json and its dependencies
|
|
82
|
+
*/
|
|
83
|
+
ignoreScripts: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Whether to install for projects in split workspace
|
|
86
|
+
*/
|
|
87
|
+
includeSplitWorkspace: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Filters to be passed to PNPM during installation for split workspace.
|
|
90
|
+
*/
|
|
91
|
+
splitWorkspacePnpmFilterArguments: string[];
|
|
92
|
+
/**
|
|
93
|
+
* Selected projects during partial install.
|
|
94
|
+
*/
|
|
95
|
+
selectedProjects?: Set<RushConfigurationProject>;
|
|
96
|
+
/**
|
|
97
|
+
* Selection parameters for partial install.
|
|
98
|
+
*/
|
|
99
|
+
selectionParameters?: SelectionParameterSet;
|
|
77
100
|
}
|
|
78
101
|
//# sourceMappingURL=BaseInstallManagerTypes.d.ts.map
|
|
@@ -3,6 +3,7 @@ import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
|
3
3
|
import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
|
|
4
4
|
export declare class InstallHelpers {
|
|
5
5
|
static generateCommonPackageJson(rushConfiguration: RushConfiguration, dependencies?: Map<string, string>): void;
|
|
6
|
+
static generateCommonSplitPackageJson(rushConfiguration: RushConfiguration): void;
|
|
6
7
|
static getPackageManagerEnvironment(rushConfiguration: RushConfiguration, options?: {
|
|
7
8
|
debug?: boolean;
|
|
8
9
|
}): NodeJS.ProcessEnv;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LogBase } from '@pnpm/logger';
|
|
2
2
|
import type { IPackageJson } from '@rushstack/node-core-library';
|
|
3
|
+
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
4
|
import type { IPnpmShrinkwrapYaml } from './PnpmShrinkwrapFile';
|
|
4
5
|
/**
|
|
5
6
|
* The `settings` parameter passed to {@link IPnpmfileShim.hooks.readPackage} and
|
|
@@ -19,6 +20,20 @@ export interface IPnpmfileShimSettings {
|
|
|
19
20
|
workspaceVersions: Record<string, string>;
|
|
20
21
|
userPnpmfilePath?: string;
|
|
21
22
|
}
|
|
23
|
+
export interface IWorkspaceProjectInfo extends Pick<RushConfigurationProject, 'packageName' | 'projectRelativeFolder'> {
|
|
24
|
+
packageVersion: RushConfigurationProject['packageJson']['version'];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The `settings` parameter passed to {@link IPnpmfileShim.hooks.readPackage} and
|
|
28
|
+
* {@link IPnpmfileShim.hooks.afterAllResolved}.
|
|
29
|
+
*/
|
|
30
|
+
export interface ISplitWorkspacePnpmfileShimSettings {
|
|
31
|
+
semverPath: string;
|
|
32
|
+
pathNormalizerPath: string;
|
|
33
|
+
workspaceProjects: Record<string, IWorkspaceProjectInfo>;
|
|
34
|
+
splitWorkspaceProjects: Record<string, IWorkspaceProjectInfo>;
|
|
35
|
+
userPnpmfilePath?: string;
|
|
36
|
+
}
|
|
22
37
|
/**
|
|
23
38
|
* The `context` parameter passed to {@link IPnpmfile.hooks.readPackage}, as defined by the
|
|
24
39
|
* pnpmfile API contract.
|
|
@@ -26,6 +41,7 @@ export interface IPnpmfileShimSettings {
|
|
|
26
41
|
export interface IPnpmfileContext {
|
|
27
42
|
log: (message: string) => void;
|
|
28
43
|
pnpmfileShimSettings?: IPnpmfileShimSettings;
|
|
44
|
+
splitWorkspacePnpmfileShimSettings?: ISplitWorkspacePnpmfileShimSettings;
|
|
29
45
|
}
|
|
30
46
|
/**
|
|
31
47
|
* The `log` parameter passed to {@link IPnpmfile.hooks.filterLog}.
|
|
@@ -90,6 +90,10 @@ export interface IPnpmOptionsJson extends IPackageManagerOptionsJsonBase {
|
|
|
90
90
|
* {@inheritDoc PnpmOptionsConfiguration.resolutionMode}
|
|
91
91
|
*/
|
|
92
92
|
resolutionMode?: PnpmResolutionMode;
|
|
93
|
+
/**
|
|
94
|
+
* {@inheritDoc PnpmOptionsConfiguration.autoInstallPeers}
|
|
95
|
+
*/
|
|
96
|
+
autoInstallPeers?: boolean;
|
|
93
97
|
}
|
|
94
98
|
/**
|
|
95
99
|
* Options that are only used when the PNPM package manager is selected.
|
|
@@ -183,6 +187,13 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
|
|
|
183
187
|
* The default value is true. (For now.)
|
|
184
188
|
*/
|
|
185
189
|
readonly useWorkspaces: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* When true, any missing non-optional peer dependencies are automatically installed.
|
|
192
|
+
*
|
|
193
|
+
* @remarks
|
|
194
|
+
* The default value is same as PNPM default value. (In PNPM 8.x, this value is true)
|
|
195
|
+
*/
|
|
196
|
+
readonly autoInstallPeers: boolean | undefined;
|
|
186
197
|
/**
|
|
187
198
|
* The "globalOverrides" setting provides a simple mechanism for overriding version selections
|
|
188
199
|
* for all dependencies of all projects in the monorepo workspace. The settings are copied
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { BaseProjectShrinkwrapFile } from '../base/BaseProjectShrinkwrapFile';
|
|
2
|
-
import
|
|
2
|
+
import { PnpmShrinkwrapFile } from './PnpmShrinkwrapFile';
|
|
3
|
+
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
*/
|
|
6
7
|
export declare class PnpmProjectShrinkwrapFile extends BaseProjectShrinkwrapFile<PnpmShrinkwrapFile> {
|
|
8
|
+
/**
|
|
9
|
+
* When split workspace projects turn off shared-workspace-lockfiles, Pnpm creates individual
|
|
10
|
+
* shrinkwrap files for each project.
|
|
11
|
+
*/
|
|
12
|
+
static generateIndividualProjectShrinkwrapAsync(project: RushConfigurationProject): Promise<void>;
|
|
7
13
|
/**
|
|
8
14
|
* Generate and write the project shrinkwrap file to <project>/.rush/temp/shrinkwrap-deps.json.
|
|
9
15
|
* @returns True if the project shrinkwrap was created or updated, false otherwise.
|
|
@@ -16,6 +22,7 @@ export declare class PnpmProjectShrinkwrapFile extends BaseProjectShrinkwrapFile
|
|
|
16
22
|
protected generateProjectShrinkwrapMap(): Map<string, string> | undefined;
|
|
17
23
|
protected generateWorkspaceProjectShrinkwrapMap(): Map<string, string> | undefined;
|
|
18
24
|
protected generateLegacyProjectShrinkwrapMap(): Map<string, string>;
|
|
25
|
+
protected generateIndividualProjectShrinkwrapMap(): Map<string, string>;
|
|
19
26
|
private _addDependencyRecursive;
|
|
20
27
|
private _resolveAndAddPeerDependencies;
|
|
21
28
|
/**
|
|
@@ -4,6 +4,7 @@ import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
|
4
4
|
import type { IShrinkwrapFilePolicyValidatorOptions } from '../policy/ShrinkwrapFilePolicy';
|
|
5
5
|
import type { IExperimentsJson } from '../../api/ExperimentsConfiguration';
|
|
6
6
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
7
|
+
import { SplitWorkspacePnpmfileConfiguration } from './SplitWorkspacePnpmfileConfiguration';
|
|
7
8
|
import { PnpmProjectShrinkwrapFile } from './PnpmProjectShrinkwrapFile';
|
|
8
9
|
import type { PackageManagerOptionsConfigurationBase } from '../base/BasePackageManagerOptionsConfiguration';
|
|
9
10
|
export interface IPeerDependenciesMetaYaml {
|
|
@@ -86,6 +87,10 @@ export interface IPnpmShrinkwrapYaml {
|
|
|
86
87
|
lockfileVersion?: string | number;
|
|
87
88
|
/** The list of resolved version numbers for direct dependencies */
|
|
88
89
|
dependencies: Record<string, string>;
|
|
90
|
+
/** The list of resolved version numbers for dev dependencies */
|
|
91
|
+
devDependencies: Record<string, string>;
|
|
92
|
+
/** The list of resolved version numbers for optional dependencies */
|
|
93
|
+
optionalDependencies: Record<string, string>;
|
|
89
94
|
/** The list of importers for local workspace projects */
|
|
90
95
|
importers: Record<string, IPnpmShrinkwrapImporterYaml>;
|
|
91
96
|
/** The description of the solved graph */
|
|
@@ -112,6 +117,8 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
|
112
117
|
readonly isWorkspaceCompatible: boolean;
|
|
113
118
|
readonly registry: string;
|
|
114
119
|
readonly dependencies: ReadonlyMap<string, IPnpmVersionSpecifier>;
|
|
120
|
+
readonly devDependencies: ReadonlyMap<string, IPnpmVersionSpecifier>;
|
|
121
|
+
readonly optionalDependencies: ReadonlyMap<string, IPnpmVersionSpecifier>;
|
|
115
122
|
readonly importers: ReadonlyMap<string, IPnpmShrinkwrapImporterYaml>;
|
|
116
123
|
readonly specifiers: ReadonlyMap<string, string>;
|
|
117
124
|
readonly packages: ReadonlyMap<string, IPnpmShrinkwrapDependencyYaml>;
|
|
@@ -119,9 +126,14 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
|
119
126
|
private readonly _shrinkwrapJson;
|
|
120
127
|
private readonly _integrities;
|
|
121
128
|
private _pnpmfileConfiguration;
|
|
129
|
+
private _splitWorkspaceGlobalPnpmfileConfiguration;
|
|
130
|
+
private _individualPackageName;
|
|
131
|
+
private _individualShrinkwrapImporter;
|
|
122
132
|
private constructor();
|
|
123
133
|
static loadFromFile(shrinkwrapYamlFilename: string): PnpmShrinkwrapFile | undefined;
|
|
124
134
|
static loadFromString(shrinkwrapContent: string): PnpmShrinkwrapFile;
|
|
135
|
+
setIndividualPackage(packageName: string, splitWorkspaceGlobalPnpmfileConfiguration?: SplitWorkspacePnpmfileConfiguration): void;
|
|
136
|
+
get isIndividual(): boolean;
|
|
125
137
|
getShrinkwrapHash(experimentsConfig?: IExperimentsJson): string;
|
|
126
138
|
/** @override */
|
|
127
139
|
validate(packageManagerOptionsConfig: PackageManagerOptionsConfigurationBase, policyOptions: IShrinkwrapFilePolicyValidatorOptions, experimentsConfig?: IExperimentsJson): void;
|
|
@@ -208,8 +220,12 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
|
208
220
|
getImporterKeyByPath(workspaceRoot: string, projectFolder: string): string;
|
|
209
221
|
getImporter(importerKey: string): IPnpmShrinkwrapImporterYaml | undefined;
|
|
210
222
|
getIntegrityForImporter(importerKey: string): Map<string, string> | undefined;
|
|
223
|
+
getIntegrityForIndividualProject(): Map<string, string>;
|
|
211
224
|
/** @override */
|
|
212
225
|
isWorkspaceProjectModifiedAsync(project: RushConfigurationProject, variant?: string): Promise<boolean>;
|
|
226
|
+
isSplitWorkspaceProjectModified(project: RushConfigurationProject): boolean;
|
|
227
|
+
isSplitWorkspaceIndividualProjectModified(project: RushConfigurationProject): boolean;
|
|
228
|
+
private _isProjectModified;
|
|
213
229
|
private _getIntegrityForPackage;
|
|
214
230
|
private _addIntegrities;
|
|
215
231
|
/**
|
|
@@ -219,5 +235,6 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
|
219
235
|
private _getPackageId;
|
|
220
236
|
private _parsePnpmDependencyKey;
|
|
221
237
|
private _serializeInternal;
|
|
238
|
+
private _getIndividualShrinkwrapImporter;
|
|
222
239
|
}
|
|
223
240
|
//# sourceMappingURL=PnpmShrinkwrapFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/pnpm/SplitWorkspaceGlobalPnpmfileShim");
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
3
|
+
/**
|
|
4
|
+
* Loads PNPM's pnpmfile.js configuration, and invokes it to preprocess package.json files,
|
|
5
|
+
* optionally utilizing a pnpmfile shim to inject preferred versions.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SplitWorkspacePnpmfileConfiguration {
|
|
8
|
+
private _context;
|
|
9
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
10
|
+
/**
|
|
11
|
+
* Split workspace use global pnpmfile, because in split workspace, user may set `shared-workspace-lockfile=false`.
|
|
12
|
+
* That means each project owns their individual pnpmfile under project folder. While the global pnpmfile could be
|
|
13
|
+
* under the common/temp-split/ folder and be used by all split workspace projects.
|
|
14
|
+
*/
|
|
15
|
+
static writeCommonTempSplitGlobalPnpmfileAsync(rushConfiguration: RushConfiguration): Promise<void>;
|
|
16
|
+
private static _getSplitWorkspacePnpmfileShimSettings;
|
|
17
|
+
/**
|
|
18
|
+
* Transform a package.json file using the pnpmfile.js hook.
|
|
19
|
+
* @returns the tranformed object, or the original input if pnpmfile.js was not found.
|
|
20
|
+
*/
|
|
21
|
+
transform(packageJson: IPackageJson): IPackageJson;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=SplitWorkspacePnpmfileConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/pnpm/SplitWorkspacePnpmfileConfiguration");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
|
+
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
|
+
import type { IEvaluateSelectorOptions, ISelectorParser } from './ISelectorParser';
|
|
4
|
+
export declare class SplitWorkspaceProjectSelectorParser implements ISelectorParser<RushConfigurationProject> {
|
|
5
|
+
private readonly _rushConfiguration;
|
|
6
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
7
|
+
evaluateSelectorAsync({ unscopedSelector, terminal, parameterName }: IEvaluateSelectorOptions): Promise<Iterable<RushConfigurationProject>>;
|
|
8
|
+
getCompletions(): Iterable<string>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=SplitWorkspaceProjectSelectorParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/selectors/SplitWorkspaceProjectSelectorParser");
|
|
@@ -4,8 +4,10 @@ import type { RushConfigurationProject } from '../../api/RushConfigurationProjec
|
|
|
4
4
|
export declare class VersionMismatchFinderProject extends VersionMismatchFinderEntity {
|
|
5
5
|
packageName: string;
|
|
6
6
|
private _fileManager;
|
|
7
|
+
private _project;
|
|
7
8
|
constructor(project: RushConfigurationProject);
|
|
8
9
|
get filePath(): string;
|
|
10
|
+
get project(): RushConfigurationProject;
|
|
9
11
|
get allDependencies(): ReadonlyArray<PackageJsonDependency>;
|
|
10
12
|
tryGetDependency(packageName: string): PackageJsonDependency | undefined;
|
|
11
13
|
tryGetDevDependency(packageName: string): PackageJsonDependency | undefined;
|
|
@@ -11,6 +11,7 @@ export declare const assetsFolderPath: string;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const scriptsFolderName: string;
|
|
13
13
|
export declare const pnpmfileShimFilename: string;
|
|
14
|
+
export declare const splitWorkspacePnpmfileShimFilename: string;
|
|
14
15
|
export declare const installRunScriptFilename: string;
|
|
15
16
|
export declare const installRunRushScriptFilename: string;
|
|
16
17
|
export declare const installRunRushxScriptFilename: string;
|
|
@@ -47,6 +47,10 @@ export interface ILifecycleCommandOptions {
|
|
|
47
47
|
* If true, suppress the process's output, but if there is a nonzero exit code then print stderr
|
|
48
48
|
*/
|
|
49
49
|
handleOutput: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* an existing environment to copy instead of process.env
|
|
52
|
+
*/
|
|
53
|
+
initialEnvironment?: IEnvironment;
|
|
50
54
|
/**
|
|
51
55
|
* Options for what should be added to the PATH variable
|
|
52
56
|
*/
|
|
@@ -102,6 +106,12 @@ export declare class Utilities {
|
|
|
102
106
|
* hard disk.
|
|
103
107
|
*/
|
|
104
108
|
static dangerouslyDeletePath(folderPath: string): void;
|
|
109
|
+
/**
|
|
110
|
+
* BE VERY CAREFUL CALLING THIS FUNCTION!
|
|
111
|
+
* If you specify the wrong folderPath (e.g. "/"), it could potentially delete your entire
|
|
112
|
+
* hard disk.
|
|
113
|
+
*/
|
|
114
|
+
static dangerouslyDeletePathAsync(folderPath: string): Promise<void>;
|
|
105
115
|
static isFileTimestampCurrent(dateToCompare: Date, inputFilenames: string[]): boolean;
|
|
106
116
|
/**
|
|
107
117
|
* Executes the command with the specified command-line parameters, and waits for it to complete.
|