@rushstack/rush-sdk 5.112.1 → 5.112.2

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.
@@ -181,11 +181,19 @@ export declare class BuildCacheConfiguration {
181
181
  /**
182
182
  * Type of version bumps
183
183
  * @public
184
+ *
185
+ * @internalRemarks
186
+ * This is a copy of the semver ReleaseType enum, but with the `none` value added and
187
+ * the `premajor` and `prepatch` omitted.
188
+ * See {@link LockStepVersionPolicy._getReleaseType}.
189
+ *
190
+ * TODO: Consider supporting `premajor` and `prepatch` in the future.
184
191
  */
185
192
  export declare enum BumpType {
186
193
  'none' = 0,
187
194
  'prerelease' = 1,
188
195
  'patch' = 2,
196
+ 'preminor' = 3,
189
197
  'minor' = 4,
190
198
  'major' = 5
191
199
  }
@@ -1989,6 +1997,7 @@ declare interface IRushConfigurationProjectJson {
1989
1997
  skipRushCheck?: boolean;
1990
1998
  publishFolder?: string;
1991
1999
  tags?: string[];
2000
+ subspaceName?: string;
1992
2001
  }
1993
2002
 
1994
2003
  /**
@@ -3264,6 +3273,7 @@ export declare class RushConfiguration {
3264
3273
  private _projects;
3265
3274
  private _projectsByName;
3266
3275
  private _projectsByTag;
3276
+ private _rushProjectsBySubspaceName;
3267
3277
  private _commonVersionsConfigurationsByVariant;
3268
3278
  /**
3269
3279
  * The name of the package manager being used to install dependencies
@@ -3372,6 +3382,11 @@ export declare class RushConfiguration {
3372
3382
  * or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
3373
3383
  */
3374
3384
  readonly tempShrinkwrapPreinstallFilename: string;
3385
+ /**
3386
+ * The object that specifies subspace configurations if they are provided in the rush workspace.
3387
+ * @beta
3388
+ */
3389
+ readonly subspaceConfiguration?: SubspaceConfiguration;
3375
3390
  /**
3376
3391
  * The filename of the variant dependency data file. By default this is
3377
3392
  * called 'current-variant.json' resides in the Rush common folder.
@@ -3610,6 +3625,25 @@ export declare class RushConfiguration {
3610
3625
  * shrinkwrap file name for a given active variant.
3611
3626
  */
3612
3627
  get committedShrinkwrapFilename(): string;
3628
+ /**
3629
+ * Returns full path of the temporary shrinkwrap file for a specific subspace.
3630
+ * @remarks
3631
+ * This function takes the subspace name, and returns the full path for the subspace's shrinkwrap file.
3632
+ * This function also consults the deprecated option to allow for shrinkwraps to be stored under a package folder.
3633
+ * This shrinkwrap file is used during "rush install", and may be rewritten by the package manager during installation
3634
+ * This property merely reports the filename, the file itself may not actually exist.
3635
+ * example: `C:\MyRepo\common\<subspace_name>\pnpm-lock.yaml`
3636
+ * @beta
3637
+ */
3638
+ getTempSubspaceShrinkwrapFileName(subspaceName: string): string;
3639
+ /**
3640
+ * The filename (without any path) of the shrinkwrap file used for individual subspaces, used by the package manager.
3641
+ * @remarks
3642
+ * This property merely reports the filename; The file itself may not actually exist.
3643
+ * Example: From "pnpm-lock.yaml" to "subspace-pnpm-lock.yaml"
3644
+ * @beta
3645
+ */
3646
+ subspaceShrinkwrapFilenames(subspaceName: string): string;
3613
3647
  /**
3614
3648
  * Returns an English phrase such as "shrinkwrap file" that can be used in logging messages
3615
3649
  * to refer to the shrinkwrap file using appropriate terminology for the currently selected
@@ -3632,6 +3666,14 @@ export declare class RushConfiguration {
3632
3666
  */
3633
3667
  get repositoryDefaultFullyQualifiedRemoteBranch(): string;
3634
3668
  get projects(): RushConfigurationProject[];
3669
+ /**
3670
+ * A list of all the available subspaces in this workspace.
3671
+ * @beta
3672
+ */
3673
+ get subspaceNames(): Iterable<string>;
3674
+ /**
3675
+ * @beta
3676
+ */
3635
3677
  get projectsByName(): Map<string, RushConfigurationProject>;
3636
3678
  /**
3637
3679
  * Obtains the mapping from custom tags to projects.
@@ -3661,6 +3703,12 @@ export declare class RushConfiguration {
3661
3703
  * @param variant - The name of the current variant in use by the active command.
3662
3704
  */
3663
3705
  getCommonVersionsFilePath(variant?: string | undefined): string;
3706
+ /**
3707
+ * Returns `true` if the subspaces feature is enabled and at least one subspaces is defined
3708
+ * in the `subspaces.json` config file.
3709
+ * @beta
3710
+ */
3711
+ get hasSubspaces(): boolean;
3664
3712
  /**
3665
3713
  * Gets the settings from the common-versions.json config file for a specific variant.
3666
3714
  * @param variant - The name of the current variant in use by the active command.
@@ -3838,6 +3886,18 @@ export declare class RushConfigurationProject {
3838
3886
  * @beta
3839
3887
  */
3840
3888
  readonly tags: ReadonlySet<string>;
3889
+ /**
3890
+ * Returns the name of the subspace that this project belongs to, as assigned by the `"subspaceName"`
3891
+ * property in `rush.json`.
3892
+ *
3893
+ * @remarks
3894
+ * If the Rush subspaces feature is disabled, the value is still return.
3895
+ * When the Rush subspaces feature is enabled, an undefined `subspaceName` specifies that
3896
+ * the project belongs to the default subspace (whose name is `"default"`).
3897
+ *
3898
+ * @beta
3899
+ */
3900
+ readonly subspaceName: string | undefined;
3841
3901
  /** @internal */
3842
3902
  constructor(options: IRushConfigurationProjectOptions);
3843
3903
  /**
@@ -4049,6 +4109,10 @@ export declare class RushConstants {
4049
4109
  * The artifactory.json configuration file name.
4050
4110
  */
4051
4111
  static readonly artifactoryFilename: string;
4112
+ /**
4113
+ * The subspaces.json configuration file name
4114
+ */
4115
+ static readonly subspacesConfigFilename: string;
4052
4116
  /**
4053
4117
  * Build cache configuration file.
4054
4118
  */
@@ -4313,6 +4377,26 @@ export declare class RushUserConfiguration {
4313
4377
  static getRushUserFolderPath(): string;
4314
4378
  }
4315
4379
 
4380
+ /**
4381
+ * This represents the subspace configurations for a repository, based on the "subspaces.json"
4382
+ * configuration file.
4383
+ * @beta
4384
+ */
4385
+ export declare class SubspaceConfiguration {
4386
+ private static _jsonSchema;
4387
+ /**
4388
+ * The absolute path to the "subspaces.json" configuration file that was loaded to construct this object.
4389
+ */
4390
+ readonly subspaceJsonFilePath: string;
4391
+ /**
4392
+ * A set of the available subspaces
4393
+ */
4394
+ readonly subspaceNames: Set<string>;
4395
+ private constructor();
4396
+ static tryLoadFromConfigurationFile(subspaceJsonFilePath: string): SubspaceConfiguration | undefined;
4397
+ static tryLoadFromDefaultLocation(rushConfiguration: RushConfiguration): SubspaceConfiguration | undefined;
4398
+ }
4399
+
4316
4400
  declare enum VersionFormatForCommit {
4317
4401
  wildcard = "wildcard",
4318
4402
  original = "original"
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.38.3"
8
+ "packageVersion": "7.38.5"
9
9
  }
10
10
  ]
11
11
  }
@@ -14,6 +14,7 @@ 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 { SubspaceConfiguration } from './SubspaceConfiguration';
17
18
  /**
18
19
  * Part of IRushConfigurationJson.
19
20
  */
@@ -118,6 +119,15 @@ export interface IRushConfigurationJson {
118
119
  export interface ICurrentVariantJson {
119
120
  variant: string | JsonNull;
120
121
  }
122
+ /**
123
+ * The filter parameters to search from all projects
124
+ */
125
+ export interface IRushConfigurationProjectsFilter {
126
+ /**
127
+ * A string representation of the subspace to filter for
128
+ */
129
+ subspace: string;
130
+ }
121
131
  /**
122
132
  * Options for `RushConfiguration.tryFindRushJsonLocation`.
123
133
  * @public
@@ -144,6 +154,7 @@ export declare class RushConfiguration {
144
154
  private _projects;
145
155
  private _projectsByName;
146
156
  private _projectsByTag;
157
+ private _rushProjectsBySubspaceName;
147
158
  private _commonVersionsConfigurationsByVariant;
148
159
  /**
149
160
  * The name of the package manager being used to install dependencies
@@ -252,6 +263,11 @@ export declare class RushConfiguration {
252
263
  * or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
253
264
  */
254
265
  readonly tempShrinkwrapPreinstallFilename: string;
266
+ /**
267
+ * The object that specifies subspace configurations if they are provided in the rush workspace.
268
+ * @beta
269
+ */
270
+ readonly subspaceConfiguration?: SubspaceConfiguration;
255
271
  /**
256
272
  * The filename of the variant dependency data file. By default this is
257
273
  * called 'current-variant.json' resides in the Rush common folder.
@@ -490,6 +506,25 @@ export declare class RushConfiguration {
490
506
  * shrinkwrap file name for a given active variant.
491
507
  */
492
508
  get committedShrinkwrapFilename(): string;
509
+ /**
510
+ * Returns full path of the temporary shrinkwrap file for a specific subspace.
511
+ * @remarks
512
+ * This function takes the subspace name, and returns the full path for the subspace's shrinkwrap file.
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.
522
+ * @remarks
523
+ * This property merely reports the filename; The file itself may not actually exist.
524
+ * Example: From "pnpm-lock.yaml" to "subspace-pnpm-lock.yaml"
525
+ * @beta
526
+ */
527
+ subspaceShrinkwrapFilenames(subspaceName: string): string;
493
528
  /**
494
529
  * Returns an English phrase such as "shrinkwrap file" that can be used in logging messages
495
530
  * to refer to the shrinkwrap file using appropriate terminology for the currently selected
@@ -512,6 +547,14 @@ export declare class RushConfiguration {
512
547
  */
513
548
  get repositoryDefaultFullyQualifiedRemoteBranch(): string;
514
549
  get projects(): RushConfigurationProject[];
550
+ /**
551
+ * A list of all the available subspaces in this workspace.
552
+ * @beta
553
+ */
554
+ get subspaceNames(): Iterable<string>;
555
+ /**
556
+ * @beta
557
+ */
515
558
  get projectsByName(): Map<string, RushConfigurationProject>;
516
559
  /**
517
560
  * Obtains the mapping from custom tags to projects.
@@ -541,6 +584,12 @@ export declare class RushConfiguration {
541
584
  * @param variant - The name of the current variant in use by the active command.
542
585
  */
543
586
  getCommonVersionsFilePath(variant?: string | undefined): string;
587
+ /**
588
+ * Returns `true` if the subspaces feature is enabled and at least one subspaces is defined
589
+ * in the `subspaces.json` config file.
590
+ * @beta
591
+ */
592
+ get hasSubspaces(): boolean;
544
593
  /**
545
594
  * Gets the settings from the common-versions.json config file for a specific variant.
546
595
  * @param variant - The name of the current variant in use by the active command.
@@ -16,6 +16,7 @@ export interface IRushConfigurationProjectJson {
16
16
  skipRushCheck?: boolean;
17
17
  publishFolder?: string;
18
18
  tags?: string[];
19
+ subspaceName?: string;
19
20
  }
20
21
  /**
21
22
  * @internal
@@ -151,6 +152,18 @@ export declare class RushConfigurationProject {
151
152
  * @beta
152
153
  */
153
154
  readonly tags: ReadonlySet<string>;
155
+ /**
156
+ * Returns the name of the subspace that this project belongs to, as assigned by the `"subspaceName"`
157
+ * property in `rush.json`.
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"`).
163
+ *
164
+ * @beta
165
+ */
166
+ readonly subspaceName: string | undefined;
154
167
  /** @internal */
155
168
  constructor(options: IRushConfigurationProjectOptions);
156
169
  /**
@@ -0,0 +1,26 @@
1
+ import type { RushConfiguration } from './RushConfiguration';
2
+ /**
3
+ * The allowed naming convention for subspace names.
4
+ * Allows for names to be formed of letters, numbers, and hyphens (-)
5
+ */
6
+ export declare const SUBSPACE_NAME_REGEXP: RegExp;
7
+ /**
8
+ * This represents the subspace configurations for a repository, based on the "subspaces.json"
9
+ * configuration file.
10
+ * @beta
11
+ */
12
+ export declare class SubspaceConfiguration {
13
+ private static _jsonSchema;
14
+ /**
15
+ * The absolute path to the "subspaces.json" configuration file that was loaded to construct this object.
16
+ */
17
+ readonly subspaceJsonFilePath: string;
18
+ /**
19
+ * A set of the available subspaces
20
+ */
21
+ readonly subspaceNames: Set<string>;
22
+ private constructor();
23
+ static tryLoadFromConfigurationFile(subspaceJsonFilePath: string): SubspaceConfiguration | undefined;
24
+ static tryLoadFromDefaultLocation(rushConfiguration: RushConfiguration): SubspaceConfiguration | undefined;
25
+ }
26
+ //# sourceMappingURL=SubspaceConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/SubspaceConfiguration");
@@ -4,11 +4,19 @@ import type { RushConfiguration } from './RushConfiguration';
4
4
  /**
5
5
  * Type of version bumps
6
6
  * @public
7
+ *
8
+ * @internalRemarks
9
+ * This is a copy of the semver ReleaseType enum, but with the `none` value added and
10
+ * the `premajor` and `prepatch` omitted.
11
+ * See {@link LockStepVersionPolicy._getReleaseType}.
12
+ *
13
+ * TODO: Consider supporting `premajor` and `prepatch` in the future.
7
14
  */
8
15
  export declare enum BumpType {
9
16
  'none' = 0,
10
17
  'prerelease' = 1,
11
18
  'patch' = 2,
19
+ 'preminor' = 3,
12
20
  'minor' = 4,
13
21
  'major' = 5
14
22
  }
@@ -3,6 +3,7 @@ import { BaseConfiglessRushAction } from './BaseRushAction';
3
3
  export declare class InitAction extends BaseConfiglessRushAction {
4
4
  private readonly _overwriteParameter;
5
5
  private readonly _rushExampleParameter;
6
+ private readonly _experimentsParameter;
6
7
  private _commentedBySectionName;
7
8
  constructor(parser: RushCommandLineParser);
8
9
  protected runAsync(): Promise<void>;
package/lib/index.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export { ApprovedPackagesPolicy } from './api/ApprovedPackagesPolicy';
6
6
  export { RushConfiguration, ITryFindRushJsonLocationOptions } from './api/RushConfiguration';
7
+ export { SubspaceConfiguration } from './api/SubspaceConfiguration';
7
8
  export { IPackageManagerOptionsJsonBase, IConfigurationEnvironment, IConfigurationEnvironmentVariable, PackageManagerOptionsConfigurationBase } from './logic/base/BasePackageManagerOptionsConfiguration';
8
9
  export { INpmOptionsJson as _INpmOptionsJson, NpmOptionsConfiguration } from './logic/npm/NpmOptionsConfiguration';
9
10
  export { IYarnOptionsJson as _IYarnOptionsJson, YarnOptionsConfiguration } from './logic/yarn/YarnOptionsConfiguration';
@@ -43,7 +43,6 @@ export declare class PublishUtilities {
43
43
  [key: string]: string;
44
44
  }, dependencyName: string, newProjectVersion: string): string;
45
45
  private static _getReleaseType;
46
- private static _getChangeTypeForSemverReleaseType;
47
46
  private static _getNewRangeDependency;
48
47
  private static _shouldSkipVersionBump;
49
48
  private static _updateCommitDetails;
@@ -145,6 +145,10 @@ export declare class RushConstants {
145
145
  * The artifactory.json configuration file name.
146
146
  */
147
147
  static readonly artifactoryFilename: string;
148
+ /**
149
+ * The subspaces.json configuration file name
150
+ */
151
+ static readonly subspacesConfigFilename: string;
148
152
  /**
149
153
  * Build cache configuration file.
150
154
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.112.1",
3
+ "version": "5.112.2",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,17 +25,17 @@
25
25
  "dependencies": {
26
26
  "@types/node-fetch": "2.6.2",
27
27
  "tapable": "2.2.1",
28
- "@rushstack/node-core-library": "3.61.0"
28
+ "@rushstack/node-core-library": "3.62.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/semver": "7.5.0",
32
32
  "@types/webpack-env": "1.18.0",
33
- "@rushstack/heft": "0.63.2",
34
- "@microsoft/rush-lib": "5.112.1",
33
+ "@microsoft/rush-lib": "5.112.2",
34
+ "@rushstack/heft": "0.63.4",
35
35
  "local-node-rig": "1.0.0",
36
- "@rushstack/stream-collator": "4.1.13",
36
+ "@rushstack/terminal": "0.7.14",
37
37
  "@rushstack/ts-command-line": "4.17.1",
38
- "@rushstack/terminal": "0.7.12"
38
+ "@rushstack/stream-collator": "4.1.15"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "heft build --clean",