@rushstack/rush-sdk 5.141.4 → 5.143.0-pr5009.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.
@@ -3118,7 +3118,6 @@ export declare class PhasedCommandHooks {
3118
3118
  * @public
3119
3119
  */
3120
3120
  export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfigurationBase {
3121
- private static _jsonSchema;
3122
3121
  private readonly _json;
3123
3122
  private _globalPatchedDependencies;
3124
3123
  /**
@@ -3276,6 +3275,8 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
3276
3275
  * dependencies. The settings are copied into the pnpm.ignoredOptionalDependencies field of the common/temp/package.json
3277
3276
  * file that is generated by Rush during installation.
3278
3277
  *
3278
+ * (SUPPORTED ONLY IN PNPM 9.0.0 AND NEWER)
3279
+ *
3279
3280
  * PNPM documentation: https://pnpm.io/package_json#pnpmignoredoptionaldependencies
3280
3281
  */
3281
3282
  readonly globalIgnoredOptionalDependencies: string[] | undefined;
@@ -4743,7 +4744,6 @@ export declare class Subspace {
4743
4744
  * - Lockfiles: (i.e. - `pnpm-lock.yaml`, `npm-shrinkwrap.json`, `yarn.lock`, etc)
4744
4745
  * - 'common-versions.json'
4745
4746
  * - 'pnpmfile.js'/'.pnpmfile.cjs'
4746
- * - 'pnpm-config.js'
4747
4747
  */
4748
4748
  getVariantDependentSubspaceConfigFolderPath(variant: string | undefined): string;
4749
4749
  /**
@@ -4808,7 +4808,7 @@ export declare class Subspace {
4808
4808
  * Example: `C:\MyRepo\common\subspaces\my-subspace\pnpm-config.json`
4809
4809
  * @beta
4810
4810
  */
4811
- getPnpmConfigFilePath(variant?: string): string;
4811
+ getPnpmConfigFilePath(): string;
4812
4812
  /**
4813
4813
  * Gets the settings from the common-versions.json config file.
4814
4814
  * @beta
@@ -49,7 +49,6 @@ export declare class Subspace {
49
49
  * - Lockfiles: (i.e. - `pnpm-lock.yaml`, `npm-shrinkwrap.json`, `yarn.lock`, etc)
50
50
  * - 'common-versions.json'
51
51
  * - 'pnpmfile.js'/'.pnpmfile.cjs'
52
- * - 'pnpm-config.js'
53
52
  */
54
53
  getVariantDependentSubspaceConfigFolderPath(variant: string | undefined): string;
55
54
  /**
@@ -114,7 +113,7 @@ export declare class Subspace {
114
113
  * Example: `C:\MyRepo\common\subspaces\my-subspace\pnpm-config.json`
115
114
  * @beta
116
115
  */
117
- getPnpmConfigFilePath(variant?: string): string;
116
+ getPnpmConfigFilePath(): string;
118
117
  /**
119
118
  * Gets the settings from the common-versions.json config file.
120
119
  * @beta
@@ -1,9 +1,10 @@
1
1
  /// <reference types="node" />
2
+ import { type ITerminal } from '@rushstack/terminal';
2
3
  import type { RushConfiguration } from '../../api/RushConfiguration';
3
4
  import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
4
5
  import type { Subspace } from '../../api/Subspace';
5
6
  export declare class InstallHelpers {
6
- static generateCommonPackageJson(rushConfiguration: RushConfiguration, subspace: Subspace, dependencies?: Map<string, string>): void;
7
+ static generateCommonPackageJson(rushConfiguration: RushConfiguration, subspace: Subspace, dependencies: Map<string, string> | undefined, terminal: ITerminal): void;
7
8
  static getPackageManagerEnvironment(rushConfiguration: RushConfiguration, options?: {
8
9
  debug?: boolean;
9
10
  }): NodeJS.ProcessEnv;
@@ -142,7 +142,6 @@ export interface IPnpmOptionsJson extends IPackageManagerOptionsJsonBase {
142
142
  * @public
143
143
  */
144
144
  export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfigurationBase {
145
- private static _jsonSchema;
146
145
  private readonly _json;
147
146
  private _globalPatchedDependencies;
148
147
  /**
@@ -300,6 +299,8 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
300
299
  * dependencies. The settings are copied into the pnpm.ignoredOptionalDependencies field of the common/temp/package.json
301
300
  * file that is generated by Rush during installation.
302
301
  *
302
+ * (SUPPORTED ONLY IN PNPM 9.0.0 AND NEWER)
303
+ *
303
304
  * PNPM documentation: https://pnpm.io/package_json#pnpmignoredoptionaldependencies
304
305
  */
305
306
  readonly globalIgnoredOptionalDependencies: string[] | undefined;
@@ -0,0 +1,11 @@
1
+ import type { Lockfile, LockfileFileV9 } from '@pnpm/lockfile.types';
2
+ /**
3
+ * Convert lockfile v9 object to standard lockfile object.
4
+ *
5
+ * This function will mutate the lockfile object. It will:
6
+ * 1. Ensure importers['.'] exists.
7
+ * 2. Merge snapshots and packages into packages.
8
+ * 3. Extract specifier from importers['xxx'] into the specifiers field.
9
+ */
10
+ export declare function convertLockfileV9ToLockfileObject(lockfile: LockfileFileV9): Lockfile;
11
+ //# sourceMappingURL=PnpmShrinkWrapFileConverters.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/pnpm/PnpmShrinkWrapFileConverters");
@@ -8,6 +8,11 @@ import type { RushConfigurationProject } from '../../api/RushConfigurationProjec
8
8
  import { PnpmProjectShrinkwrapFile } from './PnpmProjectShrinkwrapFile';
9
9
  import type { PackageManagerOptionsConfigurationBase } from '../base/BasePackageManagerOptionsConfiguration';
10
10
  import type { Subspace } from '../../api/Subspace';
11
+ import type { Lockfile, PackageSnapshot, ProjectSnapshot } from '@pnpm/lockfile.types';
12
+ export declare enum ShrinkwrapFileMajorVersion {
13
+ V6 = 6,
14
+ V9 = 9
15
+ }
11
16
  export interface IPeerDependenciesMetaYaml {
12
17
  optional?: boolean;
13
18
  }
@@ -19,10 +24,10 @@ export interface IPnpmV8VersionSpecifier {
19
24
  version: string;
20
25
  specifier: string;
21
26
  }
22
- export type IPnpmVersionSpecifier = IPnpmV7VersionSpecifier | IPnpmV8VersionSpecifier;
23
- export interface IPnpmShrinkwrapDependencyYaml {
24
- /** Information about the resolved package */
25
- resolution?: {
27
+ export type IPnpmV9VersionSpecifier = string;
28
+ export type IPnpmVersionSpecifier = IPnpmV7VersionSpecifier | IPnpmV8VersionSpecifier | IPnpmV9VersionSpecifier;
29
+ export interface IPnpmShrinkwrapDependencyYaml extends Omit<PackageSnapshot, 'resolution'> {
30
+ resolution: {
26
31
  /** The directory this package should clone, for injected dependencies */
27
32
  directory?: string;
28
33
  /** The hash of the tarball, to ensure archive integrity */
@@ -30,101 +35,51 @@ export interface IPnpmShrinkwrapDependencyYaml {
30
35
  /** The name of the tarball, if this was from a TGZ file */
31
36
  tarball?: string;
32
37
  };
33
- /** The list of bundled dependencies in this package */
34
- bundledDependencies?: ReadonlyArray<string>;
35
- /** The list of dependencies and the resolved version */
36
- dependencies?: Record<string, IPnpmVersionSpecifier>;
37
- /** The list of optional dependencies and the resolved version */
38
- optionalDependencies?: Record<string, IPnpmVersionSpecifier>;
39
- /** The list of peer dependencies and the resolved version */
40
- peerDependencies?: Record<string, IPnpmVersionSpecifier>;
41
- /**
42
- * Used to indicate optional peer dependencies, as described in this RFC:
43
- * https://github.com/yarnpkg/rfcs/blob/master/accepted/0000-optional-peer-dependencies.md
44
- */
45
- peerDependenciesMeta?: Record<string, IPeerDependenciesMetaYaml>;
46
- /** The name of the package, if the package is a local tarball */
47
- name?: string;
48
- /** If this is an optional dependency */
49
- optional?: boolean;
50
- /** The values of process.platform supported by this package */
51
- os?: readonly string[];
52
- /** The values of process.arch supported by this package */
53
- cpu?: readonly string[];
54
- /** The libc runtimes supported by this package */
55
- libc?: readonly string[];
56
38
  }
57
- export interface IPnpmShrinkwrapImporterYaml {
58
- /** The list of resolved version numbers for direct dependencies */
59
- dependencies?: Record<string, IPnpmVersionSpecifier>;
60
- /** The list of resolved version numbers for dev dependencies */
61
- devDependencies?: Record<string, IPnpmVersionSpecifier>;
62
- /** The list of resolved version numbers for optional dependencies */
63
- optionalDependencies?: Record<string, IPnpmVersionSpecifier>;
64
- /** The list of metadata for dependencies declared inside dependencies, optionalDependencies, and devDependencies. */
65
- dependenciesMeta?: Record<string, IDependenciesMetaYaml>;
39
+ export type IPnpmShrinkwrapImporterYaml = ProjectSnapshot;
40
+ export interface IPnpmShrinkwrapYaml extends Lockfile {
66
41
  /**
67
- * The list of specifiers used to resolve dependency versions
68
- *
69
- * @remarks
70
- * This has been removed in PNPM v8
42
+ * This interface represents the raw pnpm-lock.YAML file
43
+ * Example:
44
+ * {
45
+ * "dependencies": {
46
+ * "@rush-temp/project1": "file:./projects/project1.tgz"
47
+ * },
48
+ * "packages": {
49
+ * "file:projects/library1.tgz": {
50
+ * "dependencies: {
51
+ * "markdown": "0.5.0"
52
+ * },
53
+ * "name": "@rush-temp/library1",
54
+ * "resolution": {
55
+ * "tarball": "file:projects/library1.tgz"
56
+ * },
57
+ * "version": "0.0.0"
58
+ * },
59
+ * "markdown/0.5.0": {
60
+ * "resolution": {
61
+ * "integrity": "sha1-KCBbVlqK51kt4gdGPWY33BgnIrI="
62
+ * }
63
+ * }
64
+ * },
65
+ * "registry": "http://localhost:4873/",
66
+ * "shrinkwrapVersion": 3,
67
+ * "specifiers": {
68
+ * "@rush-temp/project1": "file:./projects/project1.tgz"
69
+ * }
70
+ * }
71
71
  */
72
- specifiers?: Record<string, IPnpmVersionSpecifier>;
73
- }
74
- /**
75
- * This interface represents the raw pnpm-lock.YAML file
76
- * Example:
77
- * {
78
- * "dependencies": {
79
- * "@rush-temp/project1": "file:./projects/project1.tgz"
80
- * },
81
- * "packages": {
82
- * "file:projects/library1.tgz": {
83
- * "dependencies: {
84
- * "markdown": "0.5.0"
85
- * },
86
- * "name": "@rush-temp/library1",
87
- * "resolution": {
88
- * "tarball": "file:projects/library1.tgz"
89
- * },
90
- * "version": "0.0.0"
91
- * },
92
- * "markdown/0.5.0": {
93
- * "resolution": {
94
- * "integrity": "sha1-KCBbVlqK51kt4gdGPWY33BgnIrI="
95
- * }
96
- * }
97
- * },
98
- * "registry": "http://localhost:4873/",
99
- * "shrinkwrapVersion": 3,
100
- * "specifiers": {
101
- * "@rush-temp/project1": "file:./projects/project1.tgz"
102
- * }
103
- * }
104
- */
105
- export interface IPnpmShrinkwrapYaml {
106
- /** The version of the lockfile format */
107
- lockfileVersion?: string | number;
108
72
  /** The list of resolved version numbers for direct dependencies */
109
- dependencies: Record<string, string>;
110
- /** The list of importers for local workspace projects */
111
- importers: Record<string, IPnpmShrinkwrapImporterYaml>;
112
- /** The description of the solved graph */
113
- packages: Record<string, IPnpmShrinkwrapDependencyYaml>;
114
- /** URL of the registry which was used */
115
- registry: string;
73
+ dependencies?: Record<string, string>;
116
74
  /** The list of specifiers used to resolve direct dependency versions */
117
- specifiers: Record<string, string>;
118
- /** The list of override version number for dependencies */
119
- overrides?: {
120
- [dependency: string]: string;
121
- };
122
- /** The checksum of package extensions fields for extending dependencies */
123
- packageExtensionsChecksum?: string;
75
+ specifiers?: Record<string, string>;
76
+ /** URL of the registry which was used */
77
+ registry?: string;
124
78
  }
125
79
  export interface ILoadFromFileOptions {
126
80
  withCaching?: boolean;
127
81
  }
82
+ export declare function parsePnpm9DependencyKey(dependencyName: string, versionSpecifier: IPnpmVersionSpecifier): DependencySpecifier | undefined;
128
83
  /**
129
84
  * Given an encoded "dependency key" from the PNPM shrinkwrap file, this parses it into an equivalent
130
85
  * DependencySpecifier.
@@ -148,6 +103,7 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
148
103
  private readonly _integrities;
149
104
  private _pnpmfileConfiguration;
150
105
  private constructor();
106
+ static getLockfileV9PackageId(name: string, version: string): string;
151
107
  static loadFromFile(shrinkwrapYamlFilePath: string, { withCaching }?: ILoadFromFileOptions): PnpmShrinkwrapFile | undefined;
152
108
  static loadFromString(shrinkwrapContent: string): PnpmShrinkwrapFile;
153
109
  getShrinkwrapHash(experimentsConfig?: IExperimentsJson): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.141.4",
3
+ "version": "5.143.0-pr5009.0",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,24 +33,25 @@
33
33
  },
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
+ "@pnpm/lockfile.types": "~1.0.3",
36
37
  "@types/node-fetch": "2.6.2",
37
38
  "tapable": "2.2.1",
38
- "@rushstack/lookup-by-path": "0.4.4",
39
- "@rushstack/node-core-library": "5.10.0",
39
+ "@rushstack/lookup-by-path": "0.4.5",
40
+ "@rushstack/package-deps-hash": "4.2.10",
40
41
  "@rushstack/terminal": "0.14.3",
41
- "@rushstack/package-deps-hash": "4.2.9"
42
+ "@rushstack/node-core-library": "5.10.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@types/semver": "7.5.0",
45
46
  "@types/webpack-env": "1.18.0",
46
47
  "webpack": "~5.95.0",
47
- "@microsoft/rush-lib": "5.141.4",
48
- "@rushstack/heft-webpack5-plugin": "0.11.6",
48
+ "@rushstack/heft": "0.68.9",
49
+ "@microsoft/rush-lib": "5.143.0-pr5009.0",
49
50
  "local-node-rig": "1.0.0",
51
+ "@rushstack/heft-webpack5-plugin": "0.11.7",
52
+ "@rushstack/stream-collator": "4.1.77",
50
53
  "@rushstack/ts-command-line": "4.23.1",
51
- "@rushstack/heft": "0.68.8",
52
- "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.75",
53
- "@rushstack/stream-collator": "4.1.76"
54
+ "@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.76"
54
55
  },
55
56
  "scripts": {
56
57
  "build": "heft build --clean",