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
40 changes: 40 additions & 0 deletions tools/sdk-testgen/common/config/rush/.pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"use strict";

/**
* When using the PNPM package manager, you can use pnpmfile.js to workaround
* dependencies that have mistakes in their package.json file. (This feature is
* functionally similar to Yarn's "resolutions".)
*
* For details, see the PNPM documentation:
* https://pnpm.js.org/docs/en/hooks.html
*
* IMPORTANT: SINCE THIS FILE CONTAINS EXECUTABLE CODE, MODIFYING IT IS LIKELY TO INVALIDATE
* ANY CACHED DEPENDENCY ANALYSIS. After any modification to pnpmfile.js, it's recommended to run
* "rush update --full" so that PNPM will recalculate all version selections.
*/
module.exports = {
hooks: {
readPackage,
},
};

const fixups = {
braces: {
applyTo: ["micromatch"],
with: "3.0.2",
}
};

function readPackage(packageJson, context) {
for (const dep of Object.keys(fixups)) {
const to = fixups[dep];
if (to.applyTo.includes(packageJson.name)) {
context.log(
`Fixed up dependencies for ${packageJson.name} => ${dep}:${to.with}`
);
packageJson.dependencies[dep] = to.with
}
}

return packageJson;
}
Loading