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>
This commit is contained in:
parent
30a3b8e779
commit
efe9e3345d
3 changed files with 6 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
// Browser-compatible exports
|
// Browser-compatible exports
|
||||||
export * from "./schemas/index.js";
|
export * from "./schemas/index.js";
|
||||||
export * from "./shared/config.js";
|
export * from "./shared/config.js";
|
||||||
|
export * from "./shared/constants.js";
|
||||||
export * from "./types.js";
|
export * from "./types.js";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import type * as z from "zod";
|
import type * as z from "zod";
|
||||||
|
|
||||||
import type { McpbManifestSchema as McpbManifestSchemaAny } from "./schemas/any.js";
|
import type { McpbManifestSchema as McpbManifestSchemaAny } from "./schemas/any.js";
|
||||||
|
import type { McpbManifestSchema as McpbManifestSchemaV0_2 } from "./schemas/0.2.js";
|
||||||
import type {
|
import type {
|
||||||
McpbManifestAuthorSchema,
|
McpbManifestAuthorSchema,
|
||||||
McpbManifestCompatibilitySchema,
|
McpbManifestCompatibilitySchema,
|
||||||
|
|
@ -52,9 +53,10 @@ export type McpbUserConfigValues = z.infer<typeof McpbUserConfigValuesSchema>;
|
||||||
export type McpbManifestAny = z.infer<typeof McpbManifestSchemaAny>;
|
export type McpbManifestAny = z.infer<typeof McpbManifestSchemaAny>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* McpbManifest type for v0.2 (default version) for backwards compatibility
|
||||||
* @deprecated Use McpbManifestAny instead to support all manifest versions.
|
* @deprecated Use McpbManifestAny instead to support all manifest versions.
|
||||||
*/
|
*/
|
||||||
export type McpbManifest = McpbManifestAny;
|
export type McpbManifest = z.infer<typeof McpbManifestSchemaV0_2>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information about a MCPB package signature
|
* Information about a MCPB package signature
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ describe("getMcpConfigForManifest", () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const baseManifest: McpbManifest = {
|
const baseManifest: McpbManifest = {
|
||||||
manifest_version: "0.3",
|
manifest_version: "0.2",
|
||||||
name: "test-extension",
|
name: "test-extension",
|
||||||
version: "1.0.0",
|
version: "1.0.0",
|
||||||
description: "Test extension",
|
description: "Test extension",
|
||||||
|
|
@ -305,7 +305,7 @@ describe("getMcpConfigForManifest", () => {
|
||||||
|
|
||||||
describe("hasRequiredConfigMissing", () => {
|
describe("hasRequiredConfigMissing", () => {
|
||||||
const baseManifest: McpbManifest = {
|
const baseManifest: McpbManifest = {
|
||||||
manifest_version: "0.3",
|
manifest_version: "0.2",
|
||||||
name: "test-extension",
|
name: "test-extension",
|
||||||
version: "1.0.0",
|
version: "1.0.0",
|
||||||
description: "Test extension",
|
description: "Test extension",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue