diff --git a/scripts/openclaw-npm-postpublish-verify.ts b/scripts/openclaw-npm-postpublish-verify.ts index 41563fbc5f9..9cbee2f3b29 100644 --- a/scripts/openclaw-npm-postpublish-verify.ts +++ b/scripts/openclaw-npm-postpublish-verify.ts @@ -59,6 +59,9 @@ const OPTIONAL_OR_EXTERNALIZED_RUNTIME_IMPORTS = new Set([ "@matrix-org/matrix-sdk-crypto-nodejs", "link-preview-js", "matrix-js-sdk", + // Discord voice decoder fallback. The root chunk catches missing decoders and the owning + // Discord plugin remains externalized from the root package. + "opusscript", ]); const require = createRequire(import.meta.url); const acorn = require("acorn") as typeof import("acorn"); diff --git a/test/openclaw-npm-postpublish-verify.test.ts b/test/openclaw-npm-postpublish-verify.test.ts index a298ec24a6e..9ad7a03141c 100644 --- a/test/openclaw-npm-postpublish-verify.test.ts +++ b/test/openclaw-npm-postpublish-verify.test.ts @@ -240,6 +240,11 @@ describe("collectInstalledRootDependencyManifestErrors", () => { 'await import("@lancedb/lancedb");\n', "utf8", ); + writeFileSync( + join(packageRoot, "dist", "discord-voice-runtime.js"), + 'const OpusScript = require("opusscript");\nexport { OpusScript };\n', + "utf8", + ); expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toEqual([]); } finally {