@rushstack/rush-sdk 5.112.2-pr4485.2 → 5.113.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.
- package/dist/rush-lib.d.ts +250 -104
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/LastInstallFlag.d.ts +2 -1
- package/lib/api/LastLinkFlag.d.ts +2 -2
- package/lib/api/PackageJsonEditor.d.ts +15 -0
- package/lib/api/RushConfiguration.d.ts +56 -74
- package/lib/api/RushConfigurationProject.d.ts +14 -8
- package/lib/api/RushProjectConfiguration.d.ts +0 -7
- package/lib/api/Subspace.d.ts +117 -0
- package/lib/api/{SubspaceConfiguration.js → Subspace.js} +1 -1
- package/lib/api/SubspacesConfiguration.d.ts +58 -0
- package/lib/api/SubspacesConfiguration.js +1 -0
- package/lib/api/VersionPolicyConfiguration.d.ts +1 -1
- package/lib/api/packageManager/PnpmPackageManager.d.ts +7 -0
- package/lib/cli/actions/BaseInstallAction.d.ts +4 -0
- package/lib/index.d.ts +3 -2
- package/lib/logic/ChangeManager.d.ts +1 -1
- package/lib/logic/ChangelogGenerator.d.ts +2 -2
- package/lib/logic/PublishUtilities.d.ts +2 -2
- package/lib/logic/RepoStateFile.d.ts +5 -3
- package/lib/logic/RushConstants.d.ts +8 -0
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +5 -0
- package/lib/logic/base/BaseShrinkwrapFile.d.ts +3 -2
- package/lib/logic/installManager/InstallHelpers.d.ts +2 -1
- package/lib/logic/npm/NpmShrinkwrapFile.d.ts +2 -1
- package/lib/logic/operations/IOperationRunner.d.ts +10 -5
- package/lib/logic/operations/OperationExecutionRecord.d.ts +3 -6
- package/lib/logic/operations/ProjectLogWritable.d.ts +1 -0
- package/lib/logic/operations/ShellOperationRunner.d.ts +10 -3
- package/lib/logic/pnpm/IPnpmfile.d.ts +15 -0
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +8 -2
- package/lib/logic/pnpm/PnpmfileConfiguration.d.ts +3 -2
- package/lib/logic/policy/PolicyValidator.d.ts +2 -1
- package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +2 -1
- package/lib/logic/selectors/SubspaceSelectorParser.d.ts +10 -0
- package/lib/logic/selectors/SubspaceSelectorParser.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +2 -0
- package/lib/logic/yarn/YarnShrinkwrapFile.d.ts +2 -1
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +0 -6
- package/lib/utilities/PathConstants.d.ts +1 -0
- package/lib/utilities/Utilities.d.ts +0 -4
- package/lib/utilities/npmrcUtilities.d.ts +1 -1
- package/package.json +6 -6
- package/lib/api/SubspaceConfiguration.d.ts +0 -26
|
@@ -3,10 +3,10 @@ import { RushConfigurationProject, type IRushConfigurationProjectJson } from './
|
|
|
3
3
|
import { ApprovedPackagesPolicy } from './ApprovedPackagesPolicy';
|
|
4
4
|
import { EventHooks } from './EventHooks';
|
|
5
5
|
import { VersionPolicyConfiguration } from './VersionPolicyConfiguration';
|
|
6
|
-
import { CommonVersionsConfiguration } from './CommonVersionsConfiguration';
|
|
6
|
+
import type { CommonVersionsConfiguration } from './CommonVersionsConfiguration';
|
|
7
7
|
import type { PackageManagerName, PackageManager } from './packageManager/PackageManager';
|
|
8
8
|
import { ExperimentsConfiguration } from './ExperimentsConfiguration';
|
|
9
|
-
import { RepoStateFile } from '../logic/RepoStateFile';
|
|
9
|
+
import type { RepoStateFile } from '../logic/RepoStateFile';
|
|
10
10
|
import { LookupByPath } from '../logic/LookupByPath';
|
|
11
11
|
import { RushPluginsConfiguration } from './RushPluginsConfiguration';
|
|
12
12
|
import { type IPnpmOptionsJson, PnpmOptionsConfiguration } from '../logic/pnpm/PnpmOptionsConfiguration';
|
|
@@ -14,7 +14,8 @@ import { type INpmOptionsJson, NpmOptionsConfiguration } from '../logic/npm/NpmO
|
|
|
14
14
|
import { type IYarnOptionsJson, YarnOptionsConfiguration } from '../logic/yarn/YarnOptionsConfiguration';
|
|
15
15
|
import type { PackageManagerOptionsConfigurationBase } from '../logic/base/BasePackageManagerOptionsConfiguration';
|
|
16
16
|
import { CustomTipsConfiguration } from './CustomTipsConfiguration';
|
|
17
|
-
import {
|
|
17
|
+
import { SubspacesConfiguration } from './SubspacesConfiguration';
|
|
18
|
+
import { Subspace } from './Subspace';
|
|
18
19
|
/**
|
|
19
20
|
* Part of IRushConfigurationJson.
|
|
20
21
|
*/
|
|
@@ -154,8 +155,9 @@ export declare class RushConfiguration {
|
|
|
154
155
|
private _projects;
|
|
155
156
|
private _projectsByName;
|
|
156
157
|
private _projectsByTag;
|
|
157
|
-
private _rushProjectsBySubspaceName;
|
|
158
158
|
private _commonVersionsConfigurationsByVariant;
|
|
159
|
+
private readonly _subspacesByName;
|
|
160
|
+
private readonly _subspaces;
|
|
159
161
|
/**
|
|
160
162
|
* The name of the package manager being used to install dependencies
|
|
161
163
|
*/
|
|
@@ -245,29 +247,15 @@ export declare class RushConfiguration {
|
|
|
245
247
|
* Example: `npm-shrinkwrap.json` or `pnpm-lock.yaml`
|
|
246
248
|
*/
|
|
247
249
|
readonly shrinkwrapFilename: string;
|
|
248
|
-
/**
|
|
249
|
-
* The full path of the temporary shrinkwrap file that is used during "rush install".
|
|
250
|
-
* This file may get rewritten by the package manager during installation.
|
|
251
|
-
* @remarks
|
|
252
|
-
* This property merely reports the filename; the file itself may not actually exist.
|
|
253
|
-
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap.json` or `C:\MyRepo\common\temp\pnpm-lock.yaml`
|
|
254
|
-
*/
|
|
255
|
-
readonly tempShrinkwrapFilename: string;
|
|
256
|
-
/**
|
|
257
|
-
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
|
|
258
|
-
* before installation begins, and can be compared to determine how the package manager
|
|
259
|
-
* modified tempShrinkwrapFilename.
|
|
260
|
-
* @remarks
|
|
261
|
-
* This property merely reports the filename; the file itself may not actually exist.
|
|
262
|
-
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap-preinstall.json`
|
|
263
|
-
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
264
|
-
*/
|
|
265
|
-
readonly tempShrinkwrapPreinstallFilename: string;
|
|
266
250
|
/**
|
|
267
251
|
* The object that specifies subspace configurations if they are provided in the rush workspace.
|
|
268
252
|
* @beta
|
|
269
253
|
*/
|
|
270
|
-
readonly
|
|
254
|
+
readonly subspacesConfiguration: SubspacesConfiguration | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* Returns true if subspaces.json is present with "enabled=true".
|
|
257
|
+
*/
|
|
258
|
+
readonly subspacesFeatureEnabled: boolean;
|
|
271
259
|
/**
|
|
272
260
|
* The filename of the variant dependency data file. By default this is
|
|
273
261
|
* called 'current-variant.json' resides in the Rush common folder.
|
|
@@ -496,35 +484,27 @@ export declare class RushConfiguration {
|
|
|
496
484
|
*/
|
|
497
485
|
get rushPluginOptionsFolder(): string;
|
|
498
486
|
/**
|
|
499
|
-
* The full path of the shrinkwrap file that is
|
|
500
|
-
*
|
|
487
|
+
* The full path of the temporary shrinkwrap file that is used during "rush install".
|
|
488
|
+
* This file may get rewritten by the package manager during installation.
|
|
501
489
|
* @remarks
|
|
502
490
|
* This property merely reports the filename; the file itself may not actually exist.
|
|
503
|
-
* Example: `C:\MyRepo\common\npm-shrinkwrap.json` or `C:\MyRepo\common\pnpm-lock.yaml`
|
|
491
|
+
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap.json` or `C:\MyRepo\common\temp\pnpm-lock.yaml`
|
|
504
492
|
*
|
|
505
|
-
* @deprecated
|
|
506
|
-
* shrinkwrap file name for a given active variant.
|
|
493
|
+
* @deprecated Introduced with subspaces is subspace specific tempShrinkwrapFilename accessible from the Subspace class.
|
|
507
494
|
*/
|
|
508
|
-
get
|
|
495
|
+
get tempShrinkwrapFilename(): string;
|
|
509
496
|
/**
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
* This function also consults the deprecated option to allow for shrinkwraps to be stored under a package folder.
|
|
514
|
-
* This shrinkwrap file is used during "rush install", and may be rewritten by the package manager during installation
|
|
515
|
-
* This property merely reports the filename, the file itself may not actually exist.
|
|
516
|
-
* example: `C:\MyRepo\common\<subspace_name>\pnpm-lock.yaml`
|
|
517
|
-
* @beta
|
|
518
|
-
*/
|
|
519
|
-
getTempSubspaceShrinkwrapFileName(subspaceName: string): string;
|
|
520
|
-
/**
|
|
521
|
-
* The filename (without any path) of the shrinkwrap file used for individual subspaces, used by the package manager.
|
|
497
|
+
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
|
|
498
|
+
* before installation begins, and can be compared to determine how the package manager
|
|
499
|
+
* modified tempShrinkwrapFilename.
|
|
522
500
|
* @remarks
|
|
523
|
-
* This property merely reports the filename;
|
|
524
|
-
* Example:
|
|
525
|
-
*
|
|
501
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
502
|
+
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap-preinstall.json`
|
|
503
|
+
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
504
|
+
*
|
|
505
|
+
* @deprecated Introduced with subspaces is subspace specific tempShrinkwrapPreinstallFilename accessible from the Subspace class.
|
|
526
506
|
*/
|
|
527
|
-
|
|
507
|
+
get tempShrinkwrapPreinstallFilename(): string;
|
|
528
508
|
/**
|
|
529
509
|
* Returns an English phrase such as "shrinkwrap file" that can be used in logging messages
|
|
530
510
|
* to refer to the shrinkwrap file using appropriate terminology for the currently selected
|
|
@@ -547,15 +527,32 @@ export declare class RushConfiguration {
|
|
|
547
527
|
*/
|
|
548
528
|
get repositoryDefaultFullyQualifiedRemoteBranch(): string;
|
|
549
529
|
get projects(): RushConfigurationProject[];
|
|
530
|
+
/**
|
|
531
|
+
* @beta
|
|
532
|
+
*/
|
|
533
|
+
get defaultSubspace(): Subspace;
|
|
550
534
|
/**
|
|
551
535
|
* A list of all the available subspaces in this workspace.
|
|
552
536
|
* @beta
|
|
553
537
|
*/
|
|
554
|
-
get
|
|
538
|
+
get subspaces(): readonly Subspace[];
|
|
539
|
+
/**
|
|
540
|
+
* @beta
|
|
541
|
+
*/
|
|
542
|
+
tryGetSubspace(subspaceName: string): Subspace | undefined;
|
|
543
|
+
/**
|
|
544
|
+
* @beta
|
|
545
|
+
*/
|
|
546
|
+
getSubspace(subspaceName: string): Subspace;
|
|
555
547
|
/**
|
|
548
|
+
* Returns the set of subspaces that the given projects belong to
|
|
556
549
|
* @beta
|
|
557
550
|
*/
|
|
558
|
-
|
|
551
|
+
getSubspacesForProjects(projects: ReadonlySet<RushConfigurationProject>): ReadonlySet<Subspace>;
|
|
552
|
+
/**
|
|
553
|
+
* @beta
|
|
554
|
+
*/
|
|
555
|
+
get projectsByName(): ReadonlyMap<string, RushConfigurationProject>;
|
|
559
556
|
/**
|
|
560
557
|
* Obtains the mapping from custom tags to projects.
|
|
561
558
|
* @beta
|
|
@@ -580,21 +577,13 @@ export declare class RushConfiguration {
|
|
|
580
577
|
*/
|
|
581
578
|
get currentInstalledVariant(): string | undefined;
|
|
582
579
|
/**
|
|
583
|
-
*
|
|
584
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
580
|
+
* @deprecated Use {@link Subspace.getCommonVersionsFilePath} instead
|
|
585
581
|
*/
|
|
586
|
-
getCommonVersionsFilePath(
|
|
582
|
+
getCommonVersionsFilePath(subspace?: Subspace): string;
|
|
587
583
|
/**
|
|
588
|
-
*
|
|
589
|
-
* in the `subspaces.json` config file.
|
|
590
|
-
* @beta
|
|
584
|
+
* @deprecated Use {@link Subspace.getCommonVersions} instead
|
|
591
585
|
*/
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Gets the settings from the common-versions.json config file for a specific variant.
|
|
595
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
596
|
-
*/
|
|
597
|
-
getCommonVersions(variant?: string | undefined): CommonVersionsConfiguration;
|
|
586
|
+
getCommonVersions(subspace?: Subspace): CommonVersionsConfiguration;
|
|
598
587
|
/**
|
|
599
588
|
* Returns a map of all direct dependencies that only have a single semantic version specifier.
|
|
600
589
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -603,27 +592,21 @@ export declare class RushConfiguration {
|
|
|
603
592
|
*/
|
|
604
593
|
getImplicitlyPreferredVersions(variant?: string | undefined): Map<string, string>;
|
|
605
594
|
/**
|
|
606
|
-
*
|
|
607
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
595
|
+
* @deprecated Use {@link Subspace.getRepoStateFilePath} instead
|
|
608
596
|
*/
|
|
609
|
-
getRepoStateFilePath(
|
|
597
|
+
getRepoStateFilePath(subspace?: Subspace): string;
|
|
610
598
|
/**
|
|
611
|
-
*
|
|
612
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
599
|
+
* @deprecated Use {@link Subspace.getRepoState} instead
|
|
613
600
|
*/
|
|
614
|
-
getRepoState(
|
|
601
|
+
getRepoState(subspace?: Subspace): RepoStateFile;
|
|
615
602
|
/**
|
|
616
|
-
*
|
|
617
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
603
|
+
* @deprecated Use {@link Subspace.getCommittedShrinkwrapFilename} instead
|
|
618
604
|
*/
|
|
619
|
-
getCommittedShrinkwrapFilename(
|
|
605
|
+
getCommittedShrinkwrapFilename(subspace?: Subspace): string;
|
|
620
606
|
/**
|
|
621
|
-
*
|
|
622
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
623
|
-
* @remarks
|
|
624
|
-
* The file path is returned even if PNPM is not configured as the package manager.
|
|
607
|
+
* @deprecated Use {@link Subspace.getRepoStateFilePath} instead
|
|
625
608
|
*/
|
|
626
|
-
getPnpmfilePath(
|
|
609
|
+
getPnpmfilePath(subspace?: Subspace): string;
|
|
627
610
|
/**
|
|
628
611
|
* Looks up a project in the projectsByName map. If the project is not found,
|
|
629
612
|
* then undefined is returned.
|
|
@@ -651,6 +634,5 @@ export declare class RushConfiguration {
|
|
|
651
634
|
* If the path is not under any project's folder, returns undefined.
|
|
652
635
|
*/
|
|
653
636
|
tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
|
|
654
|
-
private _getVariantConfigFolderPath;
|
|
655
637
|
}
|
|
656
638
|
//# sourceMappingURL=RushConfiguration.d.ts.map
|
|
@@ -2,6 +2,7 @@ import { type IPackageJson } from '@rushstack/node-core-library';
|
|
|
2
2
|
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
3
3
|
import type { VersionPolicy } from './VersionPolicy';
|
|
4
4
|
import type { PackageJsonEditor } from './PackageJsonEditor';
|
|
5
|
+
import type { Subspace } from './Subspace';
|
|
5
6
|
/**
|
|
6
7
|
* This represents the JSON data object for a project entry in the rush.json configuration file.
|
|
7
8
|
*/
|
|
@@ -38,6 +39,10 @@ export interface IRushConfigurationProjectOptions {
|
|
|
38
39
|
* If specified, validate project tags against this list.
|
|
39
40
|
*/
|
|
40
41
|
allowedProjectTags: Set<string> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The containing subspace.
|
|
44
|
+
*/
|
|
45
|
+
subspace: Subspace;
|
|
41
46
|
}
|
|
42
47
|
/**
|
|
43
48
|
* This represents the configuration of a project that is built by Rush, based on
|
|
@@ -85,6 +90,11 @@ export declare class RushConfigurationProject {
|
|
|
85
90
|
* The Rush configuration for the monorepo that the project belongs to.
|
|
86
91
|
*/
|
|
87
92
|
readonly rushConfiguration: RushConfiguration;
|
|
93
|
+
/**
|
|
94
|
+
* Returns the subspace name that a project belongs to.
|
|
95
|
+
* If subspaces is not enabled, returns the default subspace.
|
|
96
|
+
*/
|
|
97
|
+
readonly subspace: Subspace;
|
|
88
98
|
/**
|
|
89
99
|
* The review category name, or undefined if no category was assigned.
|
|
90
100
|
* This name must be one of the valid choices listed in RushConfiguration.reviewCategories.
|
|
@@ -153,17 +163,13 @@ export declare class RushConfigurationProject {
|
|
|
153
163
|
*/
|
|
154
164
|
readonly tags: ReadonlySet<string>;
|
|
155
165
|
/**
|
|
156
|
-
* Returns the
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* @remarks
|
|
160
|
-
* If the Rush subspaces feature is disabled, the value is still return.
|
|
161
|
-
* When the Rush subspaces feature is enabled, an undefined `subspaceName` specifies that
|
|
162
|
-
* the project belongs to the default subspace (whose name is `"default"`).
|
|
166
|
+
* Returns the subspace name specified in the `"subspaceName"` field in `rush.json`.
|
|
167
|
+
* Note that this field may be undefined, if the `default` subspace is being used,
|
|
168
|
+
* and this field may be ignored if the subspaces feature is disabled.
|
|
163
169
|
*
|
|
164
170
|
* @beta
|
|
165
171
|
*/
|
|
166
|
-
readonly
|
|
172
|
+
readonly configuredSubspaceName: string | undefined;
|
|
167
173
|
/** @internal */
|
|
168
174
|
constructor(options: IRushConfigurationProjectOptions);
|
|
169
175
|
/**
|
|
@@ -73,13 +73,6 @@ export interface IOperationSettings {
|
|
|
73
73
|
* calculating final hash value when reading and writing the build cache
|
|
74
74
|
*/
|
|
75
75
|
dependsOnAdditionalFiles?: string[];
|
|
76
|
-
/**
|
|
77
|
-
* When running this operation in watch mode, enable IPC functionality. This allows reusing a long-lived child
|
|
78
|
-
* process instead of spawning a new child process for each incremental build.
|
|
79
|
-
*
|
|
80
|
-
* Implicitly disables the build cache for this operation.
|
|
81
|
-
*/
|
|
82
|
-
useIPCInWatchMode?: boolean;
|
|
83
76
|
}
|
|
84
77
|
/**
|
|
85
78
|
* Use this class to load the "config/rush-project.json" config file.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { RushConfiguration } from './RushConfiguration';
|
|
2
|
+
import type { RushConfigurationProject } from './RushConfigurationProject';
|
|
3
|
+
import { CommonVersionsConfiguration } from './CommonVersionsConfiguration';
|
|
4
|
+
import { RepoStateFile } from '../logic/RepoStateFile';
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface ISubspaceOptions {
|
|
9
|
+
subspaceName: string;
|
|
10
|
+
rushConfiguration: RushConfiguration;
|
|
11
|
+
splitWorkspaceCompatibility: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This represents the subspace configurations for a repository, based on the "subspaces.json"
|
|
15
|
+
* configuration file.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export declare class Subspace {
|
|
19
|
+
readonly subspaceName: string;
|
|
20
|
+
private readonly _rushConfiguration;
|
|
21
|
+
private readonly _projects;
|
|
22
|
+
private readonly _splitWorkspaceCompatibility;
|
|
23
|
+
private _commonVersionsConfiguration;
|
|
24
|
+
private _detail;
|
|
25
|
+
constructor(options: ISubspaceOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Returns the list of projects belonging to this subspace.
|
|
28
|
+
* @beta
|
|
29
|
+
*/
|
|
30
|
+
getProjects(): RushConfigurationProject[];
|
|
31
|
+
private _ensureDetail;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
34
|
+
*
|
|
35
|
+
* Example: `common/config/subspaces/my-subspace`
|
|
36
|
+
* @beta
|
|
37
|
+
*/
|
|
38
|
+
getSubspaceConfigFolder(): string;
|
|
39
|
+
/**
|
|
40
|
+
* The folder where the subspace's node_modules and other temporary files will be stored.
|
|
41
|
+
*
|
|
42
|
+
* Example: `common/temp/subspaces/my-subspace`
|
|
43
|
+
* @beta
|
|
44
|
+
*/
|
|
45
|
+
getSubspaceTempFolder(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Returns full path of the temporary shrinkwrap file for a specific subspace and returns the common workspace
|
|
48
|
+
* shrinkwrap if no subspaceName is provided.
|
|
49
|
+
* @remarks
|
|
50
|
+
* This function takes the subspace name, and returns the full path for the subspace's shrinkwrap file.
|
|
51
|
+
* This function also consults the deprecated option to allow for shrinkwraps to be stored under a package folder.
|
|
52
|
+
* This shrinkwrap file is used during "rush install", and may be rewritten by the package manager during installation
|
|
53
|
+
* This property merely reports the filename, the file itself may not actually exist.
|
|
54
|
+
* example: `C:\MyRepo\common\<subspace_name>\pnpm-lock.yaml`
|
|
55
|
+
* @beta
|
|
56
|
+
*/
|
|
57
|
+
getTempShrinkwrapFilename(): string;
|
|
58
|
+
/**
|
|
59
|
+
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made
|
|
60
|
+
* before installation begins, and can be compared to determine how the package manager
|
|
61
|
+
* modified tempShrinkwrapFilename.
|
|
62
|
+
* @remarks
|
|
63
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
64
|
+
* Example: `C:\MyRepo\common\temp\npm-shrinkwrap-preinstall.json`
|
|
65
|
+
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
66
|
+
* @beta
|
|
67
|
+
*/
|
|
68
|
+
getTempShrinkwrapPreinstallFilename(subspaceName?: string | undefined): string;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the path to the common-versions.json config file for this subspace.
|
|
71
|
+
*
|
|
72
|
+
* Example: `C:\MyRepo\common\subspaces\my-subspace\common-versions.json`
|
|
73
|
+
* @beta
|
|
74
|
+
*/
|
|
75
|
+
getCommonVersionsFilePath(): string;
|
|
76
|
+
/**
|
|
77
|
+
* Gets the settings from the common-versions.json config file for a specific variant.
|
|
78
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
79
|
+
* @beta
|
|
80
|
+
*/
|
|
81
|
+
getCommonVersions(): CommonVersionsConfiguration;
|
|
82
|
+
/**
|
|
83
|
+
* Gets the path to the repo-state.json file for a specific variant.
|
|
84
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
85
|
+
* @beta
|
|
86
|
+
*/
|
|
87
|
+
getRepoStateFilePath(): string;
|
|
88
|
+
/**
|
|
89
|
+
* Gets the contents from the repo-state.json file for a specific variant.
|
|
90
|
+
* @param subspaceName - The name of the subspace in use by the active command.
|
|
91
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
92
|
+
* @beta
|
|
93
|
+
*/
|
|
94
|
+
getRepoState(): RepoStateFile;
|
|
95
|
+
/**
|
|
96
|
+
* Gets the committed shrinkwrap file name for a specific variant.
|
|
97
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
98
|
+
* @beta
|
|
99
|
+
*/
|
|
100
|
+
getCommittedShrinkwrapFilename(): string;
|
|
101
|
+
/**
|
|
102
|
+
* Gets the absolute path for "pnpmfile.js" for a specific subspace.
|
|
103
|
+
* @param subspace - The name of the current subspace in use by the active command.
|
|
104
|
+
* @remarks
|
|
105
|
+
* The file path is returned even if PNPM is not configured as the package manager.
|
|
106
|
+
* @beta
|
|
107
|
+
*/
|
|
108
|
+
getPnpmfilePath(): string;
|
|
109
|
+
/**
|
|
110
|
+
* Returns true if the specified project belongs to this subspace.
|
|
111
|
+
* @beta
|
|
112
|
+
*/
|
|
113
|
+
contains(project: RushConfigurationProject): boolean;
|
|
114
|
+
/** @internal */
|
|
115
|
+
_addProject(project: RushConfigurationProject): void;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=Subspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/Subspace");
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { RushConfiguration } from './RushConfiguration';
|
|
2
|
+
/**
|
|
3
|
+
* The allowed naming convention for subspace names.
|
|
4
|
+
* Allows for names to be formed of identifiers separated by hyphens (-)
|
|
5
|
+
*
|
|
6
|
+
* Example: "my-subspace"
|
|
7
|
+
*/
|
|
8
|
+
export declare const SUBSPACE_NAME_REGEXP: RegExp;
|
|
9
|
+
export declare const SPLIT_WORKSPACE_SUBSPACE_NAME_REGEXP: RegExp;
|
|
10
|
+
/**
|
|
11
|
+
* This represents the subspace configurations for a repository, based on the "subspaces.json"
|
|
12
|
+
* configuration file.
|
|
13
|
+
* @beta
|
|
14
|
+
*/
|
|
15
|
+
export declare class SubspacesConfiguration {
|
|
16
|
+
private static _jsonSchema;
|
|
17
|
+
/**
|
|
18
|
+
* The absolute path to the "subspaces.json" configuration file that was loaded to construct this object.
|
|
19
|
+
*/
|
|
20
|
+
readonly subspaceJsonFilePath: string;
|
|
21
|
+
/**
|
|
22
|
+
* Determines if the subspace feature is enabled
|
|
23
|
+
*/
|
|
24
|
+
readonly enabled: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* This determines if the subspaces feature supports adding configuration files under the project folder itself
|
|
27
|
+
*/
|
|
28
|
+
readonly splitWorkspaceCompatibility: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* A set of the available subspaces
|
|
31
|
+
*/
|
|
32
|
+
readonly subspaceNames: ReadonlySet<string>;
|
|
33
|
+
private constructor();
|
|
34
|
+
/**
|
|
35
|
+
* Checks whether the provided string could be used as a subspace name.
|
|
36
|
+
* Returns `undefined` if the name is valid; otherwise returns an error message.
|
|
37
|
+
* @remarks
|
|
38
|
+
* This is a syntax check only; it does not test whether the subspace is actually defined in the Rush configuration.
|
|
39
|
+
*/
|
|
40
|
+
static explainIfInvalidSubspaceName(subspaceName: string, splitWorkspaceCompatibility?: boolean): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Checks whether the provided string could be used as a subspace name.
|
|
43
|
+
* If not, an exception is thrown.
|
|
44
|
+
* @remarks
|
|
45
|
+
* This is a syntax check only; it does not test whether the subspace is actually defined in the Rush configuration.
|
|
46
|
+
*/
|
|
47
|
+
static requireValidSubspaceName(subspaceName: string, splitWorkspaceCompatibility?: boolean): void;
|
|
48
|
+
static tryLoadFromConfigurationFile(subspaceJsonFilePath: string): SubspacesConfiguration | undefined;
|
|
49
|
+
static tryLoadFromDefaultLocation(rushConfiguration: RushConfiguration): SubspacesConfiguration | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Returns a name of the form `_RUSH_SUBSPACE_XYZ_TEMP_FOLDER` where `XYZ` is
|
|
52
|
+
* derived from the subspace name.
|
|
53
|
+
*
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
static _convertNameToEnvironmentVariable(subspaceName: string, splitWorkspaceCompatibility: boolean): string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=SubspacesConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/SubspacesConfiguration");
|
|
@@ -47,7 +47,7 @@ export declare class VersionPolicyConfiguration {
|
|
|
47
47
|
/**
|
|
48
48
|
* Validate the version policy configuration against the rush config
|
|
49
49
|
*/
|
|
50
|
-
validate(projectsByName:
|
|
50
|
+
validate(projectsByName: ReadonlyMap<string, RushConfigurationProject>): void;
|
|
51
51
|
/**
|
|
52
52
|
* Gets the version policy by its name.
|
|
53
53
|
* Throws error if the version policy is not found.
|
|
@@ -11,6 +11,13 @@ 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 a subspace that is used by the package manager.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Example: `.pnpmfile-subspace.cjs`
|
|
19
|
+
*/
|
|
20
|
+
subspacePnpmfileFilename: string;
|
|
14
21
|
/** @internal */
|
|
15
22
|
constructor(version: string);
|
|
16
23
|
}
|
|
@@ -3,6 +3,7 @@ import { type ITerminal } from '@rushstack/node-core-library';
|
|
|
3
3
|
import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';
|
|
4
4
|
import type { IInstallManagerOptions } from '../../logic/base/BaseInstallManagerTypes';
|
|
5
5
|
import type { SelectionParameterSet } from '../parsing/SelectionParameterSet';
|
|
6
|
+
import type { Subspace } from '../../api/Subspace';
|
|
6
7
|
/**
|
|
7
8
|
* This is the common base class for InstallAction and UpdateAction.
|
|
8
9
|
*/
|
|
@@ -17,10 +18,13 @@ export declare abstract class BaseInstallAction extends BaseRushAction {
|
|
|
17
18
|
protected readonly _maxInstallAttempts: CommandLineIntegerParameter;
|
|
18
19
|
protected readonly _ignoreHooksParameter: CommandLineFlagParameter;
|
|
19
20
|
protected readonly _offlineParameter: CommandLineFlagParameter;
|
|
21
|
+
protected readonly _subspaceParameter: CommandLineStringParameter;
|
|
20
22
|
protected _selectionParameters?: SelectionParameterSet;
|
|
21
23
|
constructor(options: IBaseRushActionOptions);
|
|
22
24
|
protected abstract buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
|
|
25
|
+
protected getTargetSubspace(): Subspace;
|
|
23
26
|
protected runAsync(): Promise<void>;
|
|
27
|
+
private _doInstall;
|
|
24
28
|
private _collectTelemetry;
|
|
25
29
|
}
|
|
26
30
|
//# sourceMappingURL=BaseInstallAction.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { ApprovedPackagesPolicy } from './api/ApprovedPackagesPolicy';
|
|
6
6
|
export { RushConfiguration, ITryFindRushJsonLocationOptions } from './api/RushConfiguration';
|
|
7
|
-
export {
|
|
7
|
+
export { Subspace } from './api/Subspace';
|
|
8
|
+
export { SubspacesConfiguration } from './api/SubspacesConfiguration';
|
|
8
9
|
export { IPackageManagerOptionsJsonBase, IConfigurationEnvironment, IConfigurationEnvironmentVariable, PackageManagerOptionsConfigurationBase } from './logic/base/BasePackageManagerOptionsConfiguration';
|
|
9
10
|
export { INpmOptionsJson as _INpmOptionsJson, NpmOptionsConfiguration } from './logic/npm/NpmOptionsConfiguration';
|
|
10
11
|
export { IYarnOptionsJson as _IYarnOptionsJson, YarnOptionsConfiguration } from './logic/yarn/YarnOptionsConfiguration';
|
|
@@ -23,7 +24,7 @@ export { RushUserConfiguration } from './api/RushUserConfiguration';
|
|
|
23
24
|
export { RushGlobalFolder as _RushGlobalFolder } from './api/RushGlobalFolder';
|
|
24
25
|
export { ApprovedPackagesItem, ApprovedPackagesConfiguration } from './api/ApprovedPackagesConfiguration';
|
|
25
26
|
export { CommonVersionsConfiguration } from './api/CommonVersionsConfiguration';
|
|
26
|
-
export { PackageJsonEditor, PackageJsonDependency, DependencyType } from './api/PackageJsonEditor';
|
|
27
|
+
export { PackageJsonEditor, PackageJsonDependency, DependencyType, PackageJsonDependencyMeta } from './api/PackageJsonEditor';
|
|
27
28
|
export { RepoStateFile } from './logic/RepoStateFile';
|
|
28
29
|
export { LookupByPath, IPrefixMatch } from './logic/LookupByPath';
|
|
29
30
|
export { EventHooks, Event } from './api/EventHooks';
|
|
@@ -26,7 +26,7 @@ export declare class ChangeManager {
|
|
|
26
26
|
loadAsync(changesPath: string, prereleaseToken?: PrereleaseToken, includeCommitDetails?: boolean): Promise<void>;
|
|
27
27
|
hasChanges(): boolean;
|
|
28
28
|
get packageChanges(): IChangeInfo[];
|
|
29
|
-
get allPackages():
|
|
29
|
+
get allPackages(): ReadonlyMap<string, RushConfigurationProject>;
|
|
30
30
|
validateChanges(versionConfig: VersionPolicyConfiguration): void;
|
|
31
31
|
/**
|
|
32
32
|
* Apply changes to package.json
|
|
@@ -12,11 +12,11 @@ export declare class ChangelogGenerator {
|
|
|
12
12
|
/**
|
|
13
13
|
* Updates the appropriate changelogs with the given changes.
|
|
14
14
|
*/
|
|
15
|
-
static updateChangelogs(allChanges: IChangeRequests, allProjects:
|
|
15
|
+
static updateChangelogs(allChanges: IChangeRequests, allProjects: ReadonlyMap<string, RushConfigurationProject>, rushConfiguration: RushConfiguration, shouldCommit: boolean): IChangelog[];
|
|
16
16
|
/**
|
|
17
17
|
* Fully regenerate the markdown files based on the current json files.
|
|
18
18
|
*/
|
|
19
|
-
static regenerateChangelogs(allProjects:
|
|
19
|
+
static regenerateChangelogs(allProjects: ReadonlyMap<string, RushConfigurationProject>, rushConfiguration: RushConfiguration): void;
|
|
20
20
|
/**
|
|
21
21
|
* Updates an individual changelog for a single project.
|
|
22
22
|
*/
|
|
@@ -15,7 +15,7 @@ export declare class PublishUtilities {
|
|
|
15
15
|
* @param changesPath Path to the changes folder.
|
|
16
16
|
* @returns Dictionary of all change requests, keyed by package name.
|
|
17
17
|
*/
|
|
18
|
-
static findChangeRequestsAsync(allPackages:
|
|
18
|
+
static findChangeRequestsAsync(allPackages: ReadonlyMap<string, RushConfigurationProject>, rushConfiguration: RushConfiguration, changeFiles: ChangeFiles, includeCommitDetails?: boolean, prereleaseToken?: PrereleaseToken, projectsToExclude?: Set<string>): Promise<IChangeRequests>;
|
|
19
19
|
/**
|
|
20
20
|
* Given the changes hash, flattens them into a sorted array based on their dependency order.
|
|
21
21
|
* @params packageChanges - hash of change requests.
|
|
@@ -25,7 +25,7 @@ export declare class PublishUtilities {
|
|
|
25
25
|
/**
|
|
26
26
|
* Given a single change request, updates the package json file with updated versions on disk.
|
|
27
27
|
*/
|
|
28
|
-
static updatePackages(allChanges: IChangeRequests, allPackages:
|
|
28
|
+
static updatePackages(allChanges: IChangeRequests, allPackages: ReadonlyMap<string, RushConfigurationProject>, rushConfiguration: RushConfiguration, shouldCommit: boolean, prereleaseToken?: PrereleaseToken, projectsToExclude?: Set<string>): Map<string, IPackageJson>;
|
|
29
29
|
/**
|
|
30
30
|
* Returns the generated tagname to use for a published commit, given package name and version.
|
|
31
31
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
import type { Subspace } from '../api/Subspace';
|
|
2
3
|
/**
|
|
3
4
|
* This file is used to track the state of various Rush-related features. It is generated
|
|
4
5
|
* and updated by Rush.
|
|
@@ -7,7 +8,6 @@ import type { RushConfiguration } from '../api/RushConfiguration';
|
|
|
7
8
|
*/
|
|
8
9
|
export declare class RepoStateFile {
|
|
9
10
|
private static _jsonSchema;
|
|
10
|
-
private _variant;
|
|
11
11
|
private _pnpmShrinkwrapHash;
|
|
12
12
|
private _preferredVersionsHash;
|
|
13
13
|
private _isValid;
|
|
@@ -36,16 +36,18 @@ export declare class RepoStateFile {
|
|
|
36
36
|
* @param jsonFilename - The path to the repo-state.json file.
|
|
37
37
|
* @param variant - The variant currently being used by Rush.
|
|
38
38
|
*/
|
|
39
|
-
static loadFromFile(jsonFilename: string
|
|
39
|
+
static loadFromFile(jsonFilename: string): RepoStateFile;
|
|
40
40
|
/**
|
|
41
41
|
* Refresh the data contained in repo-state.json using the current state
|
|
42
42
|
* of the Rush repo, and save the file if changes were made.
|
|
43
43
|
*
|
|
44
44
|
* @param rushConfiguration - The Rush configuration for the repo.
|
|
45
|
+
* @param subspace - The subspace that repo-state.json was loaded from,
|
|
46
|
+
* or `undefined` for the default subspace.
|
|
45
47
|
*
|
|
46
48
|
* @returns true if the file was modified, otherwise false.
|
|
47
49
|
*/
|
|
48
|
-
refreshState(rushConfiguration: RushConfiguration): boolean;
|
|
50
|
+
refreshState(rushConfiguration: RushConfiguration, subspace: Subspace | undefined): boolean;
|
|
49
51
|
/**
|
|
50
52
|
* Writes the "repo-state.json" file to disk, using the filename that was passed to loadFromFile().
|
|
51
53
|
*/
|
|
@@ -75,6 +75,10 @@ export declare class RushConstants {
|
|
|
75
75
|
* The filename (".pnpmfile.cjs") used to add custom configuration to PNPM (PNPM version 6.x and later).
|
|
76
76
|
*/
|
|
77
77
|
static readonly pnpmfileV6Filename: string;
|
|
78
|
+
/**
|
|
79
|
+
* The filename ("global-pnpmfile.cjs") used to add custom configuration to subspaces
|
|
80
|
+
*/
|
|
81
|
+
static readonly pnpmfileGlobalFilename: string;
|
|
78
82
|
/**
|
|
79
83
|
* The folder name used to store patch files for pnpm
|
|
80
84
|
* Example: `C:\MyRepo\common\config\pnpm-patches`
|
|
@@ -149,6 +153,10 @@ export declare class RushConstants {
|
|
|
149
153
|
* The subspaces.json configuration file name
|
|
150
154
|
*/
|
|
151
155
|
static readonly subspacesConfigFilename: string;
|
|
156
|
+
/**
|
|
157
|
+
* The name of the default subspace if one isn't specified but subspaces is enabled.
|
|
158
|
+
*/
|
|
159
|
+
static readonly defaultSubspaceName: string;
|
|
152
160
|
/**
|
|
153
161
|
* Build cache configuration file.
|
|
154
162
|
*/
|