From bd8e5a5cbdd6274a3eac505512a7cad105df6ee4 Mon Sep 17 00:00:00 2001 From: Tolga Ergin Date: Thu, 12 Nov 2026 12:55:42 +0000 Subject: [PATCH] Release 0.4.1: let the LPM CLI install the package again Since MCP SDK 1.32.2, LPM CLI releases before 0.86.0 failed to install this package for their `lpm mcp serve`: the SDK takes zod as both a dependency and a peer, this package's `^3.24.0` resolved a second zod beside the SDK's 4.x, and the LPM CLI's linker refuses a peer with two installed versions. Ask for zod with the SDK's own range so one zod is installed, and run on zod 4. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++++ lib/__tests__/manifest.test.js | 37 ++++++++++++++++++++++++++++++++++ package-lock.json | 13 ++++++------ package.json | 4 ++-- 4 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 lib/__tests__/manifest.test.js diff --git a/CHANGELOG.md b/CHANGELOG.md index a0156c4..d3394d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [0.4.1] - 2026-11-12 + +### Fixed + +- **The LPM CLI installs the package again.** Since MCP SDK 1.32.2, `lpm mcp serve` in LPM CLI releases before 0.86.0 failed to install this package, with "cannot derive peer \"zod\"". The SDK takes zod as both a dependency and a peer, and this package's narrower range resolved a second zod, which the LPM CLI's linker refuses. This package now asks for zod with the SDK's range, `^3.25 || ^4.0`, and runs on zod 4, so those releases start the server and see that it is retired. + ## [0.4.0] - 2026-11-12 This is the last release. The LPM CLI serves MCP itself from version 0.86.0, as `lpm mcp serve`; run `lpm mcp setup` to move your editors to it. diff --git a/lib/__tests__/manifest.test.js b/lib/__tests__/manifest.test.js new file mode 100644 index 0000000..ea5ffce --- /dev/null +++ b/lib/__tests__/manifest.test.js @@ -0,0 +1,37 @@ +import { readFileSync } from "node:fs" +import { createRequire } from "node:module" +import path from "node:path" +import { expect, it } from "vitest" + +const manifest = JSON.parse( + readFileSync(new URL("../../package.json", import.meta.url), "utf8"), +) +const require = createRequire(import.meta.url) + +// The SDK's exports map sends package.json to a nested build manifest. +function sdkManifest() { + let directory = path.dirname( + require.resolve("@modelcontextprotocol/sdk/server/mcp.js"), + ) + for (;;) { + try { + const candidate = JSON.parse( + readFileSync(path.join(directory, "package.json"), "utf8"), + ) + if (candidate.name === "@modelcontextprotocol/sdk") return candidate + } catch {} + const parent = path.dirname(directory) + if (parent === directory) throw new Error("MCP SDK manifest not found") + directory = parent + } +} + +// LPM CLI releases before 0.86.0 install this package for `lpm mcp serve`. +// The LPM CLI's linker refuses a peer that has two installed versions, and +// the MCP SDK takes zod as both a dependency and a peer: a narrower zod range +// here resolves a second zod, and the install fails. +it("asks for zod with the range the MCP SDK asks for", () => { + const sdk = sdkManifest() + expect(sdk.peerDependencies.zod).toBe(sdk.dependencies.zod) + expect(manifest.dependencies.zod).toBe(sdk.dependencies.zod) +}) diff --git a/package-lock.json b/package-lock.json index 70616d1..604e1ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@lpm-registry/mcp-server", - "version": "0.4.0", + "version": "0.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@lpm-registry/mcp-server", - "version": "0.4.0", + "version": "0.4.1", "license": "ISC", "dependencies": { "@modelcontextprotocol/sdk": "^1.12.0", - "zod": "^3.24.0" + "zod": "^3.25 || ^4.0" }, "bin": { "lpm-mcp-server": "bin/mcp-server.js" @@ -3313,11 +3313,10 @@ "license": "ISC" }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index 4f83c4a..a6e4b67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lpm-registry/mcp-server", - "version": "0.4.0", + "version": "0.4.1", "description": "Retired: the LPM CLI serves MCP itself from 0.86.0 as `lpm mcp serve`. This last release hands off to it when installed.", "author": "LPM (https://lpm.dev)", "repository": { @@ -40,7 +40,7 @@ }, "dependencies": { "@modelcontextprotocol/sdk": "^1.12.0", - "zod": "^3.24.0" + "zod": "^3.25 || ^4.0" }, "optionalDependencies": { "keytar": "^7.9.0"