diff --git a/test/scripts/check-deprecated-api-usage.test.ts b/test/scripts/check-deprecated-api-usage.test.ts index 472c5491b6f0..1175aa559cc2 100644 --- a/test/scripts/check-deprecated-api-usage.test.ts +++ b/test/scripts/check-deprecated-api-usage.test.ts @@ -57,7 +57,7 @@ describe("scripts/check-deprecated-api-usage", () => { it("bans the scoped @openclaw/plugin-sdk spelling of every deprecated specifier", () => { const specifiers = new Set(buildDeprecatedPluginSdkModuleSpecifiers()); - for (const specifier of [...specifiers]) { + for (const specifier of specifiers) { if (!specifier.startsWith("@")) { expect(specifiers.has(`@${specifier}`), specifier).toBe(true); } @@ -99,6 +99,7 @@ describe("scripts/check-deprecated-api-usage", () => { 'const facade = await import ("../plugin-sdk/channel-message.js", { with: {} });', 'import { formatInboundEnvelope } from "@openclaw/plugin-sdk/channel-envelope";', ].join("\n"), + "src/plugin-sdk/channel-message-runtime.ts": 'export * from "./channel-message.js";', }); expect(result.status).toBe(1); @@ -110,11 +111,14 @@ describe("scripts/check-deprecated-api-usage", () => { expect(result.stderr).toContain( "src/channels/probe.ts:4: @openclaw/plugin-sdk/channel-envelope", ); + expect(result.stderr).toContain( + "src/plugin-sdk/channel-message-runtime.ts:1: ./channel-message.js", + ); }); - it("keeps the compat re-export chain and test files off the facade import rule", () => { + it("allows canonical compat re-exports and test files", () => { const result = runFacadeImportRule({ - "src/plugin-sdk/channel-message-runtime.ts": 'export * from "./channel-message.js";', + "src/plugin-sdk/channel-message-runtime.ts": 'export * from "./channel-outbound.js";', "src/plugin-sdk/channel-inbound.ts": 'export { runChannelInboundEvent } from "../channels/message/inbound-reply-dispatch.js";', "src/plugin-sdk/channel-message.test.ts":