diff --git a/CHANGES.md b/CHANGES.md index 8cdf1ba7d0..4e63461ac5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -50,6 +50,7 @@ ### :bug: Bugs fixed +- Remove `corepack` from the MCP local launcher so it runs on Node.js 25+, where corepack is no longer bundled [Github #8877](https://github.com/penpot/penpot/issues/8877) - Fix Copy as SVG: emit a single valid SVG document when multiple shapes are selected, and publish `image/svg+xml` to the clipboard so the paste target works in Inkscape and other SVG-native tools [Github #838](https://github.com/penpot/penpot/issues/838) - Reset profile submenu state when the account menu closes (by @eureka0928) [Github #8947](https://github.com/penpot/penpot/issues/8947) - Add export panel to inspect styles tab [Taiga #13582](https://tree.taiga.io/project/penpot/issue/13582) diff --git a/mcp/bin/mcp-local.js b/mcp/bin/mcp-local.js index 65a2b0f763..b77b245dea 100644 --- a/mcp/bin/mcp-local.js +++ b/mcp/bin/mcp-local.js @@ -5,6 +5,12 @@ const fs = require("fs"); const path = require("path"); const root = path.resolve(__dirname, ".."); +const pkg = require(path.join(root, "package.json")); + +function pnpmVersion() { + const match = (pkg.packageManager || "").match(/^pnpm@([^+]+)/); + return match ? match[1] : "latest"; +} function run(command) { execSync(command, { cwd: root, stdio: "inherit" }); @@ -19,13 +25,7 @@ if (fs.existsSync(distLock)) { } try { - run("corepack pnpm run bootstrap"); + run(`npx -y pnpm@${pnpmVersion()} run bootstrap`); } catch (error) { - if (error.code === "ENOENT") { - console.error( - "corepack is required but was not found. It ships with Node.js >= 16." - ); - process.exit(1); - } process.exit(error.status ?? 1); }