Skip to content

Commit ed5ea69

Browse files
authored
fix(packaging): resolve runtime deps from plugin package (#6)
## Summary - resolve `cosmiconfig` and `@modelcontextprotocol/sdk` relative to the plugin package instead of `process.cwd()` - add MCP SDK to generated npm package dependencies and cover the generated metadata in packaging tests - exercise package-name loading from a bare cwd in Node/OpenCode packaging regression coverage ## Test Plan - [x] `deno task build` - [x] `deno task check` - [x] `deno task lint` - [x] `deno task fmt` - [x] `deno test -A packaging.test.ts` - [x] `deno test -A`
1 parent d5dece4 commit ed5ea69

6 files changed

Lines changed: 777 additions & 25 deletions

File tree

dnt.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { build } from "jsr:@deno/dnt@^0.42.3";
22
import manifest from "./deno.json" with { type: "json" };
33

44
const version = Deno.env.get("VERSION")?.trim() || manifest.version?.trim();
5+
const sdkVersionFromDenoJson = manifest.imports["@modelcontextprotocol/sdk"]
6+
.replace("npm:@modelcontextprotocol/sdk@", "");
57
if (!version) {
68
throw new Error('Specify $VERSION or set "version" in deno.json.');
79
}
@@ -44,6 +46,7 @@ await build({
4446
node: ">=20",
4547
},
4648
dependencies: {
49+
"@modelcontextprotocol/sdk": sdkVersionFromDenoJson,
4750
cosmiconfig: "^9.0.0",
4851
},
4952
devDependencies: {

0 commit comments

Comments
 (0)