@rushstack/rush-sdk 5.100.0-pr4132.1 → 5.100.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.
@@ -8,6 +8,7 @@ export declare class AddAction extends BaseAddAndRemoveAction {
8
8
  private readonly _exactFlag;
9
9
  private readonly _caretFlag;
10
10
  private readonly _devDependencyFlag;
11
+ private readonly _peerDependencyFlag;
11
12
  private readonly _makeConsistentFlag;
12
13
  constructor(parser: RushCommandLineParser);
13
14
  getUpdateOptions(): IPackageJsonUpdaterRushAddOptions;
@@ -58,6 +58,10 @@ export interface IPackageJsonUpdaterRushAddOptions extends IPackageJsonUpdaterRu
58
58
  * Whether or not this dependency should be added as a devDependency or a regular dependency.
59
59
  */
60
60
  devDependency: boolean;
61
+ /**
62
+ * Whether or not this dependency should be added as a peerDependency or a regular dependency.
63
+ */
64
+ peerDependency: boolean;
61
65
  /**
62
66
  * If specified, other packages that use this dependency will also have their package.json's updated.
63
67
  */
@@ -9,6 +9,12 @@ import { PackageManagerOptionsConfigurationBase } from '../base/BasePackageManag
9
9
  export interface IPeerDependenciesMetaYaml {
10
10
  optional?: boolean;
11
11
  }
12
+ export type IPnpmV7VersionSpecifier = string;
13
+ export interface IPnpmV8VersionSpecifier {
14
+ version: string;
15
+ specifier: string;
16
+ }
17
+ export type IPnpmVersionSpecifier = IPnpmV7VersionSpecifier | IPnpmV8VersionSpecifier;
12
18
  export interface IPnpmShrinkwrapDependencyYaml {
13
19
  /** Information about the resolved package */
14
20
  resolution?: {
@@ -18,42 +24,31 @@ export interface IPnpmShrinkwrapDependencyYaml {
18
24
  tarball?: string;
19
25
  };
20
26
  /** The list of dependencies and the resolved version */
21
- dependencies?: {
22
- [dependency: string]: string;
23
- };
27
+ dependencies?: Record<string, IPnpmVersionSpecifier>;
24
28
  /** The list of optional dependencies and the resolved version */
25
- optionalDependencies?: {
26
- [dependency: string]: string;
27
- };
29
+ optionalDependencies?: Record<string, IPnpmVersionSpecifier>;
28
30
  /** The list of peer dependencies and the resolved version */
29
- peerDependencies?: {
30
- [dependency: string]: string;
31
- };
31
+ peerDependencies?: Record<string, IPnpmVersionSpecifier>;
32
32
  /**
33
33
  * Used to indicate optional peer dependencies, as described in this RFC:
34
34
  * https://github.com/yarnpkg/rfcs/blob/master/accepted/0000-optional-peer-dependencies.md
35
35
  */
36
- peerDependenciesMeta?: {
37
- [dependency: string]: IPeerDependenciesMetaYaml;
38
- };
36
+ peerDependenciesMeta?: Record<string, IPeerDependenciesMetaYaml>;
39
37
  }
40
38
  export interface IPnpmShrinkwrapImporterYaml {
41
39
  /** The list of resolved version numbers for direct dependencies */
42
- dependencies?: {
43
- [dependency: string]: string;
44
- };
40
+ dependencies?: Record<string, IPnpmVersionSpecifier>;
45
41
  /** The list of resolved version numbers for dev dependencies */
46
- devDependencies?: {
47
- [dependency: string]: string;
48
- };
42
+ devDependencies?: Record<string, IPnpmVersionSpecifier>;
49
43
  /** The list of resolved version numbers for optional dependencies */
50
- optionalDependencies?: {
51
- [dependency: string]: string;
52
- };
53
- /** The list of specifiers used to resolve dependency versions */
54
- specifiers: {
55
- [dependency: string]: string;
56
- };
44
+ optionalDependencies?: Record<string, IPnpmVersionSpecifier>;
45
+ /**
46
+ * The list of specifiers used to resolve dependency versions
47
+ *
48
+ * @remarks
49
+ * This has been removed in PNPM v8
50
+ */
51
+ specifiers?: Record<string, IPnpmVersionSpecifier>;
57
52
  }
58
53
  /**
59
54
  * This interface represents the raw pnpm-lock.YAML file
@@ -87,24 +82,18 @@ export interface IPnpmShrinkwrapImporterYaml {
87
82
  * }
88
83
  */
89
84
  export interface IPnpmShrinkwrapYaml {
85
+ /** The version of the lockfile format */
86
+ lockfileVersion?: string | number;
90
87
  /** The list of resolved version numbers for direct dependencies */
91
- dependencies: {
92
- [dependency: string]: string;
93
- };
88
+ dependencies: Record<string, string>;
94
89
  /** The list of importers for local workspace projects */
95
- importers: {
96
- [relativePath: string]: IPnpmShrinkwrapImporterYaml;
97
- };
90
+ importers: Record<string, IPnpmShrinkwrapImporterYaml>;
98
91
  /** The description of the solved graph */
99
- packages: {
100
- [dependencyVersion: string]: IPnpmShrinkwrapDependencyYaml;
101
- };
92
+ packages: Record<string, IPnpmShrinkwrapDependencyYaml>;
102
93
  /** URL of the registry which was used */
103
94
  registry: string;
104
95
  /** The list of specifiers used to resolve direct dependency versions */
105
- specifiers: {
106
- [dependency: string]: string;
107
- };
96
+ specifiers: Record<string, string>;
108
97
  }
109
98
  /**
110
99
  * Given an encoded "dependency key" from the PNPM shrinkwrap file, this parses it into an equivalent
@@ -112,11 +101,13 @@ export interface IPnpmShrinkwrapYaml {
112
101
  *
113
102
  * @returns a SemVer string, or undefined if the version specifier cannot be parsed
114
103
  */
115
- export declare function parsePnpmDependencyKey(dependencyName: string, dependencyKey: string): DependencySpecifier | undefined;
104
+ export declare function parsePnpmDependencyKey(dependencyName: string, versionSpecifier: IPnpmVersionSpecifier): DependencySpecifier | undefined;
105
+ export declare function normalizePnpmVersionSpecifier(versionSpecifier: IPnpmVersionSpecifier): string;
116
106
  export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
107
+ readonly shrinkwrapFileMajorVersion: number;
117
108
  readonly isWorkspaceCompatible: boolean;
118
109
  readonly registry: string;
119
- readonly dependencies: ReadonlyMap<string, string>;
110
+ readonly dependencies: ReadonlyMap<string, IPnpmVersionSpecifier>;
120
111
  readonly importers: ReadonlyMap<string, IPnpmShrinkwrapImporterYaml>;
121
112
  readonly specifiers: ReadonlyMap<string, string>;
122
113
  readonly packages: ReadonlyMap<string, IPnpmShrinkwrapDependencyYaml>;
@@ -137,7 +128,7 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
137
128
  * Example of return value: file:projects/build-tools.tgz
138
129
  */
139
130
  getTarballPath(packageName: string): string | undefined;
140
- getTopLevelDependencyKey(dependencyName: string): string | undefined;
131
+ getTopLevelDependencyKey(dependencyName: string): IPnpmVersionSpecifier | undefined;
141
132
  /**
142
133
  * Gets the version number from the list of top-level dependencies in the "dependencies" section
143
134
  * of the shrinkwrap file. Sample return values:
@@ -150,7 +141,7 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
150
141
  */
151
142
  getTopLevelDependencyVersion(dependencyName: string): DependencySpecifier | undefined;
152
143
  /**
153
- * The PNPM shrinkwrap file has top-level dependencies on the temp projects like this:
144
+ * The PNPM shrinkwrap file has top-level dependencies on the temp projects like this (version 5.x):
154
145
  *
155
146
  * ```
156
147
  * dependencies:
@@ -164,12 +155,32 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
164
155
  * version: 0.0.0
165
156
  * ```
166
157
  *
167
- * We refer to 'file:projects/my-app.tgz_25c559a5921686293a001a397be4dce0' as the temp project dependency key
168
- * of the temp project '@rush-temp/my-app'.
158
+ * or in version 6.1, like this:
159
+ * ```
160
+ * dependencies:
161
+ * '@rush-temp/my-app':
162
+ * specifier: file:./projects/my-app.tgz
163
+ * version: file:projects/my-app.tgz
164
+ * packages:
165
+ * /@types/node@10.14.15:
166
+ * resolution: {integrity: sha512-iAB+**==}
167
+ * dev: false
168
+ * file:projects/my-app.tgz
169
+ * resolution: {integrity: sha512-guuoFIc**==, tarball: file:projects/sp-filepicker.tgz}
170
+ * name: '@rush-temp/my-app'
171
+ * version: 0.0.0
172
+ * dependencies:
173
+ * '@microsoft/load-themed-styles': 1.10.7
174
+ * ...
175
+ * dev: false
176
+ * ```
177
+ *
178
+ * We refer to 'file:projects/my-app.tgz_25c559a5921686293a001a397be4dce0' or 'file:projects/my-app.tgz' as
179
+ * the temp project dependency key of the temp project '@rush-temp/my-app'.
169
180
  */
170
181
  getTempProjectDependencyKey(tempProjectName: string): string | undefined;
171
182
  getShrinkwrapEntryFromTempProjectDependencyKey(tempProjectDependencyKey: string): IPnpmShrinkwrapDependencyYaml | undefined;
172
- getShrinkwrapEntry(name: string, version: string): IPnpmShrinkwrapDependencyYaml | undefined;
183
+ getShrinkwrapEntry(name: string, version: IPnpmVersionSpecifier): IPnpmShrinkwrapDependencyYaml | undefined;
173
184
  /**
174
185
  * Serializes the PNPM Shrinkwrap file
175
186
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.100.0-pr4132.1",
3
+ "version": "5.100.1",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,13 +19,13 @@
19
19
  "devDependencies": {
20
20
  "@types/semver": "7.3.5",
21
21
  "@types/webpack-env": "1.18.0",
22
- "@microsoft/rush-lib": "5.100.0-pr4132.1",
22
+ "@microsoft/rush-lib": "5.100.1",
23
23
  "@rushstack/eslint-config": "3.3.1",
24
- "@rushstack/heft": "0.52.1",
25
- "@rushstack/heft-node-rig": "2.2.1",
26
- "@rushstack/stream-collator": "4.0.241",
27
- "@rushstack/ts-command-line": "4.14.0",
28
- "@rushstack/terminal": "0.5.16"
24
+ "@rushstack/heft": "0.55.1",
25
+ "@rushstack/heft-node-rig": "2.2.8",
26
+ "@rushstack/stream-collator": "4.0.248",
27
+ "@rushstack/ts-command-line": "4.15.0",
28
+ "@rushstack/terminal": "0.5.23"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "heft build --clean",