Skip to content

Commit efe9e33

Browse files
Make McpbManifest point to v0.2 for backwards compatibility
- Change McpbManifest type to point to v0.2 schema instead of McpbManifestAny - Add DEFAULT_MANIFEST_VERSION export to browser.ts - Update test fixtures to use manifest_version "0.2" when using McpbManifest type - Keep @deprecated annotation directing users to McpbManifestAny for multi-version support This maintains backwards compatibility for existing code using McpbManifest while encouraging new code to use McpbManifestAny for broader version support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 30a3b8e commit efe9e33

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/browser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Browser-compatible exports
22
export * from "./schemas/index.js";
33
export * from "./shared/config.js";
4+
export * from "./shared/constants.js";
45
export * from "./types.js";

src/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type * as z from "zod";
22

33
import type { McpbManifestSchema as McpbManifestSchemaAny } from "./schemas/any.js";
4+
import type { McpbManifestSchema as McpbManifestSchemaV0_2 } from "./schemas/0.2.js";
45
import type {
56
McpbManifestAuthorSchema,
67
McpbManifestCompatibilitySchema,
@@ -52,9 +53,10 @@ export type McpbUserConfigValues = z.infer<typeof McpbUserConfigValuesSchema>;
5253
export type McpbManifestAny = z.infer<typeof McpbManifestSchemaAny>;
5354

5455
/**
56+
* McpbManifest type for v0.2 (default version) for backwards compatibility
5557
* @deprecated Use McpbManifestAny instead to support all manifest versions.
5658
*/
57-
export type McpbManifest = McpbManifestAny;
59+
export type McpbManifest = z.infer<typeof McpbManifestSchemaV0_2>;
5860

5961
/**
6062
* Information about a MCPB package signature

test/config.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe("getMcpConfigForManifest", () => {
9090
};
9191

9292
const baseManifest: McpbManifest = {
93-
manifest_version: "0.3",
93+
manifest_version: "0.2",
9494
name: "test-extension",
9595
version: "1.0.0",
9696
description: "Test extension",
@@ -305,7 +305,7 @@ describe("getMcpConfigForManifest", () => {
305305

306306
describe("hasRequiredConfigMissing", () => {
307307
const baseManifest: McpbManifest = {
308-
manifest_version: "0.3",
308+
manifest_version: "0.2",
309309
name: "test-extension",
310310
version: "1.0.0",
311311
description: "Test extension",

0 commit comments

Comments
 (0)