@rushstack/rush-sdk 5.157.0 → 5.158.1

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.
@@ -1612,7 +1612,12 @@ export declare interface IGetChangedProjectsOptions {
1612
1612
  export declare interface IGlobalCommand extends IRushCommand {
1613
1613
  }
1614
1614
 
1615
- declare interface IIndividualVersionJson extends IVersionPolicyJson {
1615
+ /**
1616
+ * This interface represents the raw individual version policy JSON object which extends the base version policy
1617
+ * with additional fields specific to individual versioning.
1618
+ * @public
1619
+ */
1620
+ export declare interface IIndividualVersionJson extends IVersionPolicyJson {
1616
1621
  lockedMajor?: number;
1617
1622
  }
1618
1623
 
@@ -1697,7 +1702,12 @@ declare interface ILocalBuildCacheJson extends IBaseBuildCacheJson {
1697
1702
  readonly cacheProvider: 'local-only';
1698
1703
  }
1699
1704
 
1700
- declare interface ILockStepVersionJson extends IVersionPolicyJson {
1705
+ /**
1706
+ * This interface represents the raw lock-step version policy JSON object which extends the base version policy
1707
+ * with additional fields specific to lock-step versioning.
1708
+ * @public
1709
+ */
1710
+ export declare interface ILockStepVersionJson extends IVersionPolicyJson {
1701
1711
  version: string;
1702
1712
  nextBump?: string;
1703
1713
  mainProject?: string;
@@ -1756,19 +1766,17 @@ export declare interface ILogger {
1756
1766
  */
1757
1767
  export declare class IndividualVersionPolicy extends VersionPolicy {
1758
1768
  /**
1759
- * The major version that has been locked
1769
+ * @internal
1760
1770
  */
1761
- readonly lockedMajor: number | undefined;
1771
+ readonly _json: IIndividualVersionJson;
1762
1772
  /**
1763
- * @internal
1773
+ * The major version that has been locked
1764
1774
  */
1765
- constructor(versionPolicyJson: IIndividualVersionJson);
1775
+ get lockedMajor(): number | undefined;
1766
1776
  /**
1767
- * Serialized json for this policy
1768
- *
1769
1777
  * @internal
1770
1778
  */
1771
- get _json(): IIndividualVersionJson;
1779
+ constructor(versionPolicyJson: IIndividualVersionJson);
1772
1780
  /**
1773
1781
  * Returns an updated package json that satisfies the version policy.
1774
1782
  *
@@ -2765,12 +2773,24 @@ export declare interface ITryFindRushJsonLocationOptions {
2765
2773
  startingFolder?: string;
2766
2774
  }
2767
2775
 
2776
+ /**
2777
+ * This interface represents the `dependencies` field in a version policy JSON object,
2778
+ * allowing repo maintainers to specify how dependencies' versions should be handled
2779
+ * during publishing and committing.
2780
+ * @public
2781
+ */
2768
2782
  declare interface IVersionPolicyDependencyJson {
2769
2783
  versionFormatForPublish?: VersionFormatForPublish;
2770
2784
  versionFormatForCommit?: VersionFormatForCommit;
2771
2785
  }
2772
2786
 
2773
- declare interface IVersionPolicyJson {
2787
+ /**
2788
+ * This interface represents the raw version policy JSON object which allows repo
2789
+ * maintainers to define how different groups of projects will be published by Rush,
2790
+ * and how their version numbers will be determined.
2791
+ * @public
2792
+ */
2793
+ export declare interface IVersionPolicyJson {
2774
2794
  policyName: string;
2775
2795
  definitionName: string;
2776
2796
  dependencies?: IVersionPolicyDependencyJson;
@@ -2798,18 +2818,22 @@ export declare interface _IYarnOptionsJson extends IPackageManagerOptionsJsonBas
2798
2818
  * @public
2799
2819
  */
2800
2820
  export declare class LockStepVersionPolicy extends VersionPolicy {
2821
+ /**
2822
+ * @internal
2823
+ */
2824
+ readonly _json: ILockStepVersionJson;
2801
2825
  private _version;
2802
2826
  /**
2803
2827
  * The type of bump for next bump.
2804
2828
  */
2805
- readonly nextBump: BumpType | undefined;
2829
+ get nextBump(): BumpType | undefined;
2806
2830
  /**
2807
2831
  * The main project for the version policy.
2808
2832
  *
2809
2833
  * If the value is provided, change logs will only be generated in that project.
2810
2834
  * If the value is not provided, change logs will be hosted in each project associated with the policy.
2811
2835
  */
2812
- readonly mainProject: string | undefined;
2836
+ get mainProject(): string | undefined;
2813
2837
  /**
2814
2838
  * @internal
2815
2839
  */
@@ -2818,12 +2842,6 @@ export declare class LockStepVersionPolicy extends VersionPolicy {
2818
2842
  * The value of the lockstep version
2819
2843
  */
2820
2844
  get version(): string;
2821
- /**
2822
- * Serialized json for this policy
2823
- *
2824
- * @internal
2825
- */
2826
- get _json(): ILockStepVersionJson;
2827
2845
  /**
2828
2846
  * Returns an updated package json that satisfies the version policy.
2829
2847
  *
@@ -5096,39 +5114,45 @@ export declare class SubspacesConfiguration {
5096
5114
  static tryLoadFromDefaultLocation(rushConfiguration: RushConfiguration): SubspacesConfiguration | undefined;
5097
5115
  }
5098
5116
 
5099
- declare enum VersionFormatForCommit {
5100
- wildcard = "wildcard",
5101
- original = "original"
5102
- }
5117
+ /**
5118
+ * @public
5119
+ */
5120
+ declare type VersionFormatForCommit = 'wildcard' | 'original';
5103
5121
 
5104
- declare enum VersionFormatForPublish {
5105
- original = "original",
5106
- exact = "exact"
5107
- }
5122
+ /**
5123
+ * @public
5124
+ */
5125
+ declare type VersionFormatForPublish = 'original' | 'exact';
5108
5126
 
5109
5127
  /**
5110
5128
  * This is the base class for version policy which controls how versions get bumped.
5111
5129
  * @public
5112
5130
  */
5113
5131
  export declare abstract class VersionPolicy {
5114
- private _versionFormatForCommit;
5115
- private _versionFormatForPublish;
5132
+ /**
5133
+ * Serialized json for the policy
5134
+ *
5135
+ * @internal
5136
+ */
5137
+ readonly _json: IVersionPolicyJson;
5138
+ private get _versionFormatForCommit();
5139
+ private get _versionFormatForPublish();
5116
5140
  /**
5117
5141
  * Version policy name
5118
5142
  */
5119
- readonly policyName: string;
5143
+ get policyName(): string;
5120
5144
  /**
5121
5145
  * Version policy definition name
5122
5146
  */
5123
- readonly definitionName: VersionPolicyDefinitionName;
5147
+ get definitionName(): VersionPolicyDefinitionName;
5124
5148
  /**
5125
5149
  * Determines if a version policy wants to opt out of changelog files.
5126
5150
  */
5127
- readonly exemptFromRushChange: boolean;
5151
+ get exemptFromRushChange(): boolean;
5128
5152
  /**
5129
5153
  * Determines if a version policy wants to opt in to including email.
5130
5154
  */
5131
- readonly includeEmailInChangeFile: boolean;
5155
+ get includeEmailInChangeFile(): boolean;
5132
5156
  /**
5133
5157
  * @internal
5134
5158
  */
@@ -5159,12 +5183,6 @@ export declare abstract class VersionPolicy {
5159
5183
  * @param identifier - (optional) override prerelease Id
5160
5184
  */
5161
5185
  abstract bump(bumpType?: BumpType, identifier?: string): void;
5162
- /**
5163
- * Serialized json for the policy
5164
- *
5165
- * @internal
5166
- */
5167
- abstract get _json(): IVersionPolicyJson;
5168
5186
  /**
5169
5187
  * Validates the specified version and throws if the version does not satisfy the policy.
5170
5188
  *
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.9"
8
+ "packageVersion": "7.52.11"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,5 +1,5 @@
1
1
  import { type IPackageJson } from '@rushstack/node-core-library';
2
- import { type IVersionPolicyJson, type ILockStepVersionJson, type IIndividualVersionJson } from './VersionPolicyConfiguration';
2
+ import type { IVersionPolicyJson, ILockStepVersionJson, IIndividualVersionJson } from './VersionPolicyConfiguration';
3
3
  import type { RushConfiguration } from './RushConfiguration';
4
4
  /**
5
5
  * Type of version bumps
@@ -33,24 +33,30 @@ export declare enum VersionPolicyDefinitionName {
33
33
  * @public
34
34
  */
35
35
  export declare abstract class VersionPolicy {
36
- private _versionFormatForCommit;
37
- private _versionFormatForPublish;
36
+ /**
37
+ * Serialized json for the policy
38
+ *
39
+ * @internal
40
+ */
41
+ readonly _json: IVersionPolicyJson;
42
+ private get _versionFormatForCommit();
43
+ private get _versionFormatForPublish();
38
44
  /**
39
45
  * Version policy name
40
46
  */
41
- readonly policyName: string;
47
+ get policyName(): string;
42
48
  /**
43
49
  * Version policy definition name
44
50
  */
45
- readonly definitionName: VersionPolicyDefinitionName;
51
+ get definitionName(): VersionPolicyDefinitionName;
46
52
  /**
47
53
  * Determines if a version policy wants to opt out of changelog files.
48
54
  */
49
- readonly exemptFromRushChange: boolean;
55
+ get exemptFromRushChange(): boolean;
50
56
  /**
51
57
  * Determines if a version policy wants to opt in to including email.
52
58
  */
53
- readonly includeEmailInChangeFile: boolean;
59
+ get includeEmailInChangeFile(): boolean;
54
60
  /**
55
61
  * @internal
56
62
  */
@@ -81,12 +87,6 @@ export declare abstract class VersionPolicy {
81
87
  * @param identifier - (optional) override prerelease Id
82
88
  */
83
89
  abstract bump(bumpType?: BumpType, identifier?: string): void;
84
- /**
85
- * Serialized json for the policy
86
- *
87
- * @internal
88
- */
89
- abstract get _json(): IVersionPolicyJson;
90
90
  /**
91
91
  * Validates the specified version and throws if the version does not satisfy the policy.
92
92
  *
@@ -110,18 +110,22 @@ export declare abstract class VersionPolicy {
110
110
  * @public
111
111
  */
112
112
  export declare class LockStepVersionPolicy extends VersionPolicy {
113
+ /**
114
+ * @internal
115
+ */
116
+ readonly _json: ILockStepVersionJson;
113
117
  private _version;
114
118
  /**
115
119
  * The type of bump for next bump.
116
120
  */
117
- readonly nextBump: BumpType | undefined;
121
+ get nextBump(): BumpType | undefined;
118
122
  /**
119
123
  * The main project for the version policy.
120
124
  *
121
125
  * If the value is provided, change logs will only be generated in that project.
122
126
  * If the value is not provided, change logs will be hosted in each project associated with the policy.
123
127
  */
124
- readonly mainProject: string | undefined;
128
+ get mainProject(): string | undefined;
125
129
  /**
126
130
  * @internal
127
131
  */
@@ -130,12 +134,6 @@ export declare class LockStepVersionPolicy extends VersionPolicy {
130
134
  * The value of the lockstep version
131
135
  */
132
136
  get version(): string;
133
- /**
134
- * Serialized json for this policy
135
- *
136
- * @internal
137
- */
138
- get _json(): ILockStepVersionJson;
139
137
  /**
140
138
  * Returns an updated package json that satisfies the version policy.
141
139
  *
@@ -171,19 +169,17 @@ export declare class LockStepVersionPolicy extends VersionPolicy {
171
169
  */
172
170
  export declare class IndividualVersionPolicy extends VersionPolicy {
173
171
  /**
174
- * The major version that has been locked
172
+ * @internal
175
173
  */
176
- readonly lockedMajor: number | undefined;
174
+ readonly _json: IIndividualVersionJson;
177
175
  /**
178
- * @internal
176
+ * The major version that has been locked
179
177
  */
180
- constructor(versionPolicyJson: IIndividualVersionJson);
178
+ get lockedMajor(): number | undefined;
181
179
  /**
182
- * Serialized json for this policy
183
- *
184
180
  * @internal
185
181
  */
186
- get _json(): IIndividualVersionJson;
182
+ constructor(versionPolicyJson: IIndividualVersionJson);
187
183
  /**
188
184
  * Returns an updated package json that satisfies the version policy.
189
185
  *
@@ -1,5 +1,11 @@
1
1
  import { VersionPolicy, type BumpType } from './VersionPolicy';
2
2
  import type { RushConfigurationProject } from './RushConfigurationProject';
3
+ /**
4
+ * This interface represents the raw version policy JSON object which allows repo
5
+ * maintainers to define how different groups of projects will be published by Rush,
6
+ * and how their version numbers will be determined.
7
+ * @public
8
+ */
3
9
  export interface IVersionPolicyJson {
4
10
  policyName: string;
5
11
  definitionName: string;
@@ -7,22 +13,38 @@ export interface IVersionPolicyJson {
7
13
  exemptFromRushChange?: boolean;
8
14
  includeEmailInChangeFile?: boolean;
9
15
  }
16
+ /**
17
+ * This interface represents the raw lock-step version policy JSON object which extends the base version policy
18
+ * with additional fields specific to lock-step versioning.
19
+ * @public
20
+ */
10
21
  export interface ILockStepVersionJson extends IVersionPolicyJson {
11
22
  version: string;
12
23
  nextBump?: string;
13
24
  mainProject?: string;
14
25
  }
26
+ /**
27
+ * This interface represents the raw individual version policy JSON object which extends the base version policy
28
+ * with additional fields specific to individual versioning.
29
+ * @public
30
+ */
15
31
  export interface IIndividualVersionJson extends IVersionPolicyJson {
16
32
  lockedMajor?: number;
17
33
  }
18
- export declare enum VersionFormatForPublish {
19
- original = "original",
20
- exact = "exact"
21
- }
22
- export declare enum VersionFormatForCommit {
23
- wildcard = "wildcard",
24
- original = "original"
25
- }
34
+ /**
35
+ * @public
36
+ */
37
+ export type VersionFormatForPublish = 'original' | 'exact';
38
+ /**
39
+ * @public
40
+ */
41
+ export type VersionFormatForCommit = 'wildcard' | 'original';
42
+ /**
43
+ * This interface represents the `dependencies` field in a version policy JSON object,
44
+ * allowing repo maintainers to specify how dependencies' versions should be handled
45
+ * during publishing and committing.
46
+ * @public
47
+ */
26
48
  export interface IVersionPolicyDependencyJson {
27
49
  versionFormatForPublish?: VersionFormatForPublish;
28
50
  versionFormatForCommit?: VersionFormatForCommit;
package/lib/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export { EventHooks, Event } from './api/EventHooks';
32
32
  export { ChangeManager } from './api/ChangeManager';
33
33
  export { FlagFile as _FlagFile } from './api/FlagFile';
34
34
  export { VersionPolicyDefinitionName, BumpType, LockStepVersionPolicy, IndividualVersionPolicy, VersionPolicy } from './api/VersionPolicy';
35
- export { VersionPolicyConfiguration } from './api/VersionPolicyConfiguration';
35
+ export { VersionPolicyConfiguration, type ILockStepVersionJson, type IIndividualVersionJson, type IVersionPolicyJson } from './api/VersionPolicyConfiguration';
36
36
  export { type ILaunchOptions, Rush } from './api/Rush';
37
37
  export { RushInternals as _RushInternals } from './api/RushInternals';
38
38
  export { ExperimentsConfiguration, type IExperimentsJson } from './api/ExperimentsConfiguration';
@@ -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
@@ -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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.157.0",
3
+ "version": "5.158.1",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,9 +36,9 @@
36
36
  "dependencies": {
37
37
  "@pnpm/lockfile.types": "~1.0.3",
38
38
  "tapable": "2.2.1",
39
- "@rushstack/package-deps-hash": "4.4.3",
40
- "@rushstack/lookup-by-path": "0.7.2",
41
39
  "@rushstack/node-core-library": "5.14.0",
40
+ "@rushstack/package-deps-hash": "4.4.5",
41
+ "@rushstack/lookup-by-path": "0.7.4",
42
42
  "@rushstack/terminal": "0.15.4"
43
43
  },
44
44
  "devDependencies": {
@@ -46,12 +46,12 @@
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.157.0",
50
- "@rushstack/heft-webpack5-plugin": "0.11.35",
51
- "@rushstack/heft": "0.74.1",
52
- "@rushstack/stream-collator": "4.1.105",
49
+ "@microsoft/rush-lib": "5.158.1",
50
+ "@rushstack/heft": "0.74.3",
53
51
  "@rushstack/ts-command-line": "5.0.2",
54
- "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.104",
52
+ "@rushstack/heft-webpack5-plugin": "0.11.40",
53
+ "@rushstack/stream-collator": "4.1.107",
54
+ "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.106",
55
55
  "local-node-rig": "1.0.0"
56
56
  },
57
57
  "scripts": {