mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test(ci): strengthen deprecated facade guard (#107927)
* fix(ci): repair runner and chat guards * fix(ci): repair main validation guards * test(ui): use isolated TouchEvent globals * fix(ci): remove retired ingress exports * test(ci): strengthen deprecated facade guard
This commit is contained in:
committed by
GitHub
parent
30738a3c3b
commit
d78dbc0628
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user