pnpm tidy up (#33744)

* Fix tsconfig paths

* Tidy pnpm patches

* Fix pnpm-link.ts for devEngines specification
This commit is contained in:
Michael Telatynski
2026-06-05 07:42:26 +00:00
committed by GitHub
parent afc4e52df4
commit 7ad8f58a08
7 changed files with 54 additions and 106 deletions
+3 -2
View File
@@ -59,8 +59,9 @@ try {
console.log(`Linking ${dependency} to ${path}`);
await fs.symlink(path, dependencyPath, "junction"); // use a junction type to avoid EPERM errors on Windows
const pkgJson = await fs.readFile(join(path, "package.json"), "utf-8");
const pkgManager = JSON.parse(pkgJson)["packageManager"]?.split("@").at(0) ?? "yarn";
const pkgJson = JSON.parse(await fs.readFile(join(path, "package.json"), "utf-8"));
const pkgManager =
pkgJson.devEngines?.packageManager?.name ?? pkgJson.packageManager?.split("@").at(0) ?? "yarn";
// pnpm install may have wiped out the `node_modules` dir so we have to restore it
execSync(`${pkgManager} install --ignore-scripts --frozen-lockfile`, {
cwd: dependencyPath,