Skip to content

Commit 8f1f790

Browse files
committed
fix(release): accept optional Discord voice decoder
1 parent c410658 commit 8f1f790

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

scripts/openclaw-npm-postpublish-verify.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ const OPTIONAL_OR_EXTERNALIZED_RUNTIME_IMPORTS = new Set([
7676
"matrix-js-sdk",
7777
// Discord voice decoder fallback. The root chunk catches missing decoders and the owning
7878
// Discord plugin remains externalized from the root package.
79+
"opus-decoder",
7980
"opusscript",
8081
// Public plugin SDK contract helpers are intentionally test-only entrypoints.
8182
// Consumers importing them run under their own Vitest dev dependency.

test/openclaw-npm-postpublish-verify.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,12 @@ describe("collectInstalledRootDependencyManifestErrors", () => {
353353
);
354354
writeFileSync(
355355
join(packageRoot, "dist", "discord-voice-runtime.js"),
356-
'const OpusScript = require("opusscript");\nexport { OpusScript };\n',
356+
[
357+
'const { OpusDecoder } = require("opus-decoder");',
358+
'const OpusScript = require("opusscript");',
359+
"export { OpusDecoder, OpusScript };",
360+
"",
361+
].join("\n"),
357362
"utf8",
358363
);
359364
writeFileSync(

0 commit comments

Comments
 (0)