@rushstack/rush-sdk 5.121.0 → 5.122.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.
@@ -1902,7 +1902,10 @@ export declare interface IPnpmLockfilePolicies {
1902
1902
  /**
1903
1903
  * Forbid sha1 hashes in `pnpm-lock.yaml`
1904
1904
  */
1905
- disallowInsecureSha1?: boolean;
1905
+ disallowInsecureSha1?: {
1906
+ enabled: boolean;
1907
+ exemptPackageVersions: Record<string, string[]>;
1908
+ };
1906
1909
  }
1907
1910
 
1908
1911
  /**
@@ -4616,6 +4619,13 @@ export declare class Subspace {
4616
4619
  * @beta
4617
4620
  */
4618
4621
  getCommonVersionsFilePath(): string;
4622
+ /**
4623
+ * Gets the path to the pnpm-config.json config file for this subspace.
4624
+ *
4625
+ * Example: `C:\MyRepo\common\subspaces\my-subspace\pnpm-config.json`
4626
+ * @beta
4627
+ */
4628
+ getPnpmConfigFilePath(): string;
4619
4629
  /**
4620
4630
  * Gets the settings from the common-versions.json config file.
4621
4631
  * @beta
@@ -81,6 +81,13 @@ export declare class Subspace {
81
81
  * @beta
82
82
  */
83
83
  getCommonVersionsFilePath(): string;
84
+ /**
85
+ * Gets the path to the pnpm-config.json config file for this subspace.
86
+ *
87
+ * Example: `C:\MyRepo\common\subspaces\my-subspace\pnpm-config.json`
88
+ * @beta
89
+ */
90
+ getPnpmConfigFilePath(): string;
84
91
  /**
85
92
  * Gets the settings from the common-versions.json config file.
86
93
  * @beta
@@ -14,6 +14,7 @@ export declare class RushPnpmCommandLineParser {
14
14
  private readonly _pnpmArgs;
15
15
  private _commandName;
16
16
  private readonly _debugEnabled;
17
+ private _subspace;
17
18
  private constructor();
18
19
  static initializeAsync(options: IRushPnpmCommandLineParserOptions): Promise<RushPnpmCommandLineParser>;
19
20
  executeAsync(): Promise<void>;
@@ -99,5 +99,10 @@ export declare class Git {
99
99
  * @internal
100
100
  */
101
101
  _executeGitCommandAndCaptureOutput(gitPath: string, args: string[], repositoryRoot?: string): string;
102
+ /**
103
+ *
104
+ * @param ref Given a ref which can be branch name, commit hash, tag name, etc, check if it is a commit hash
105
+ */
106
+ isRefACommit(ref: string): boolean;
102
107
  }
103
108
  //# sourceMappingURL=Git.d.ts.map
@@ -21,7 +21,7 @@ export declare abstract class BaseShrinkwrapFile {
21
21
  *
22
22
  * @virtual
23
23
  */
24
- validateShrinkwrapAfterUpdate(rushConfiguration: RushConfiguration, terminal: ITerminal): void;
24
+ validateShrinkwrapAfterUpdate(rushConfiguration: RushConfiguration, subspace: Subspace, terminal: ITerminal): void;
25
25
  /**
26
26
  * Validate the shrinkwrap using the provided policy options.
27
27
  *
@@ -26,7 +26,10 @@ export interface IPnpmLockfilePolicies {
26
26
  /**
27
27
  * Forbid sha1 hashes in `pnpm-lock.yaml`
28
28
  */
29
- disallowInsecureSha1?: boolean;
29
+ disallowInsecureSha1?: {
30
+ enabled: boolean;
31
+ exemptPackageVersions: Record<string, string[]>;
32
+ };
30
33
  }
31
34
  /**
32
35
  * @public
@@ -140,9 +140,20 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
140
140
  */
141
141
  private _disallowInsecureSha1;
142
142
  /** @override */
143
- validateShrinkwrapAfterUpdate(rushConfiguration: RushConfiguration, terminal: ITerminal): void;
143
+ validateShrinkwrapAfterUpdate(rushConfiguration: RushConfiguration, subspace: Subspace, terminal: ITerminal): void;
144
144
  /** @override */
145
145
  validate(packageManagerOptionsConfig: PackageManagerOptionsConfigurationBase, policyOptions: IShrinkwrapFilePolicyValidatorOptions, experimentsConfig?: IExperimentsJson): void;
146
+ /**
147
+ * This operation exactly mirrors the behavior of PNPM's own implementation:
148
+ * https://github.com/pnpm/pnpm/blob/73ebfc94e06d783449579cda0c30a40694d210e4/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L162
149
+ */
150
+ private _convertLockfileV6DepPathToV5DepPath;
151
+ /**
152
+ * Normalize dependency paths for PNPM shrinkwrap files.
153
+ * Example: "/eslint-utils@3.0.0(eslint@8.23.1)" --> "/eslint-utils@3.0.0"
154
+ * Example: "/@typescript-eslint/experimental-utils/5.9.1_eslint@8.6.0+typescript@4.4.4" --> "/@typescript-eslint/experimental-utils/5.9.1"
155
+ */
156
+ private _parseDependencyPath;
146
157
  /** @override */
147
158
  getTempProjectNames(): ReadonlyArray<string>;
148
159
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.121.0",
3
+ "version": "5.122.1",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,10 +31,10 @@
31
31
  "devDependencies": {
32
32
  "@types/semver": "7.5.0",
33
33
  "@types/webpack-env": "1.18.0",
34
- "@microsoft/rush-lib": "5.121.0",
35
- "@rushstack/heft": "0.66.3",
36
34
  "local-node-rig": "1.0.0",
35
+ "@microsoft/rush-lib": "5.122.1",
37
36
  "@rushstack/stream-collator": "4.1.41",
37
+ "@rushstack/heft": "0.66.3",
38
38
  "@rushstack/ts-command-line": "4.19.2"
39
39
  },
40
40
  "scripts": {