Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Fix .npmrc syncing to common/temp incorrectly caching results, which caused pnpm-specific properties like hoist-pattern to be stripped when the same .npmrc was processed with different options.",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
10 changes: 0 additions & 10 deletions libraries/rush-lib/src/utilities/npmrcUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export interface ILogger {
* The text of the the .npmrc.
*/

// create a global _combinedNpmrc for cache purpose
const _combinedNpmrcMap: Map<string, string> = new Map();

function _trimNpmrcFile(
options: Pick<
INpmrcTrimOptions,
Expand All @@ -41,10 +38,6 @@ function _trimNpmrcFile(
filterNpmIncompatibleProperties,
env = process.env
} = options;
const combinedNpmrcFromCache: string | undefined = _combinedNpmrcMap.get(sourceNpmrcPath);
if (combinedNpmrcFromCache !== undefined) {
return combinedNpmrcFromCache;
}

let npmrcFileLines: string[] = [];
if (linesToPrepend) {
Expand All @@ -70,9 +63,6 @@ function _trimNpmrcFile(

const combinedNpmrc: string = resultLines.join('\n');

//save the cache
_combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc);

return combinedNpmrc;
}

Expand Down