Skip to content

Commit 5c5a972

Browse files
committed
Rename getPnpmFilename() to getPnpmfilePath()
1 parent 34fa672 commit 5c5a972

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎apps/rush-lib/src/api/RushConfiguration.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export class RushConfiguration {
382382
break;
383383
case 'pnpm':
384384
knownSet.add(RushConstants.pnpmShrinkwrapFilename.toUpperCase());
385-
knownSet.add(RushConstants.pnpmFileFilename.toUpperCase());
385+
knownSet.add(RushConstants.pnpmfileFilename.toUpperCase());
386386
break;
387387
case 'yarn':
388388
knownSet.add(RushConstants.yarnShrinkwrapFilename.toUpperCase());
@@ -791,15 +791,17 @@ export class RushConfiguration {
791791
}
792792

793793
/**
794-
* Gets the PNPM file name for a specific variant.
794+
* Gets the absolute path for "pnpmfile.js" for a specific variant.
795795
* @param variant - The name of the current variant in use by the active command.
796+
* @remarks
797+
* The file path is returned even if PNPM is not configured as the package manager.
796798
*/
797-
public getPnpmFilename(variant?: string | undefined): string {
799+
public getPnpmfilePath(variant?: string | undefined): string {
798800
const variantConfigFolderPath: string = this._getVariantConfigFolderPath(variant);
799801

800802
return path.join(
801803
variantConfigFolderPath,
802-
RushConstants.pnpmFileFilename);
804+
RushConstants.pnpmfileFilename);
803805
}
804806

805807
/**

‎apps/rush-lib/src/logic/InstallManager.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ export class InstallManager {
483483
// also, copy the pnpmfile.js if it exists
484484
if (this._rushConfiguration.packageManager === 'pnpm') {
485485
const committedPnpmFilePath: string =
486-
this._rushConfiguration.getPnpmFilename(this._options.variant);
486+
this._rushConfiguration.getPnpmfilePath(this._options.variant);
487487
const tempPnpmFilePath: string
488-
= path.join(this._rushConfiguration.commonTempFolder, RushConstants.pnpmFileFilename);
488+
= path.join(this._rushConfiguration.commonTempFolder, RushConstants.pnpmfileFilename);
489489

490490
// ensure that we remove any old one that may be hanging around
491491
this._syncFile(committedPnpmFilePath, tempPnpmFilePath);
@@ -750,7 +750,7 @@ export class InstallManager {
750750

751751
if (this._rushConfiguration.packageManager === 'pnpm') {
752752
// If the repo is using pnpmfile.js, consider that also
753-
const pnpmFileFilename: string = this._rushConfiguration.getPnpmFilename(options.variant);
753+
const pnpmFileFilename: string = this._rushConfiguration.getPnpmfilePath(options.variant);
754754

755755
if (FileSystem.exists(pnpmFileFilename)) {
756756
potentiallyChangedFiles.push(pnpmFileFilename);

‎apps/rush-lib/src/logic/RushConstants.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export namespace RushConstants {
7777
/**
7878
* The filename ("pnpmfile.js") used to add custom configuration to PNPM
7979
*/
80-
export const pnpmFileFilename: string = 'pnpmfile.js';
80+
export const pnpmfileFilename: string = 'pnpmfile.js';
8181

8282
/**
8383
* The filename ("shrinkwrap.yaml") used to store state for pnpm

‎common/reviews/api/rush-lib.api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class RushConfiguration {
212212
findProjectByTempName(tempProjectName: string): RushConfigurationProject | undefined;
213213
getCommittedShrinkwrapFilename(variant?: string | undefined): string;
214214
getCommonVersions(variant?: string | undefined): CommonVersionsConfiguration;
215-
getPnpmFilename(variant?: string | undefined): string;
215+
getPnpmfilePath(variant?: string | undefined): string;
216216
getProjectByName(projectName: string): RushConfigurationProject | undefined;
217217
readonly gitAllowedEmailRegExps: string[];
218218
readonly gitSampleEmail: string;

0 commit comments

Comments
 (0)