🎥 Make videos programmatically with React
Fix mediabunny version mismatch in templates, add test
JonnyBurger01ef7326683f
diff --git a/.claude/commands/upgrade-mediabunny.md b/.claude/commands/upgrade-mediabunny.mdindex 61064bbb6c..a88465c8be 100644--- a/.claude/commands/upgrade-mediabunny.md+++ b/.claude/commands/upgrade-mediabunny.md@@ -1,7 +1,7 @@- Find the latest version of Mediabunny: `npm view mediabunny version`-- Look in the root package.json and update the version of Mediabunny to that version.-- Also upgrade @mediabunny/mp3-encoder to the same version.-- Look in packages/template-\*/package.json and update the version of Mediabunny to the desired version.+- Look in the root package.json and update the version of Mediabunny to that version in the `catalog` section.+- Also upgrade @mediabunny/mp3-encoder and @mediabunny/ac3 to the same version in the `catalog` section.+- Look in packages/template-\*/package.json and update the version of Mediabunny (and @mediabunny/\* packages if present) to the same version. Templates use explicit versions (not `catalog:`), so they must be updated manually.- Update `packages/cli/src/extra-packages.ts` with the new Mediabunny version.- Update `packages/studio-shared/src/package-info.ts` with the new Mediabunny version in `extraPackages`.- Update `packages/docs/docs/mediabunny/version.mdx` compatiblity table. To find the next version this upgrade is going to be applied, look in the root package.json for the version and increment the patch version by onediff --git a/bun.lock b/bun.lockindex 59d2bccea4..0d19405b66 100644--- a/bun.lock+++ b/bun.lock@@ -1623,7 +1623,7 @@"@remotion/media": "workspace:*","@remotion/media-utils": "workspace:*","@remotion/zod-types": "workspace:*",- "mediabunny": "1.34.4",+ "mediabunny": "1.35.1","react": "19.2.3","react-dom": "19.2.3","remotion": "workspace:*",@@ -1946,7 +1946,7 @@"connect": "3.7.0","eslint": "9.19.0","lucide-react": "0.516.0",- "mediabunny": "1.34.4",+ "mediabunny": "1.35.1","react": "19.2.3","react-dom": "19.2.3","remotion": "workspace:*",@@ -2082,7 +2082,7 @@"@remotion/media": "workspace:*","@remotion/three": "workspace:*","@remotion/zod-types": "workspace:*",- "mediabunny": "1.34.4",+ "mediabunny": "1.35.1","react": "19.2.3","react-dom": "19.2.3","remotion": "workspace:*",@@ -10188,8 +10188,6 @@"template-ai-video/uuid": ["[email protected]", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w=="],- "template-music-visualization/mediabunny": ["[email protected]", "", { "dependencies": { "@types/dom-mediacapture-transform": "^0.1.11", "@types/dom-webcodecs": "0.1.13" } }, "sha512-f1B95A60YoCsZQO/JQYxPDorybEz2Sjasf4RrpwGSMmJW6JVyhI/iJDri9LF6kk5WwUovF8oiTvRNM6xGjWo5w=="],-"template-next-app/@eslint/js": ["@eslint/[email protected]", "", {}, "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A=="],"template-next-app/@typescript-eslint/eslint-plugin": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.46.0", "@typescript-eslint/type-utils": "8.46.0", "@typescript-eslint/utils": "8.46.0", "@typescript-eslint/visitor-keys": "8.46.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.46.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA=="],@@ -10260,8 +10258,6 @@"template-recorder/lucide-react": ["[email protected]", "", { "peerDependencies": { "react": "19.0.0" } }, "sha512-aybBJzLHcw1CIn3rUcRkztB37dsJATtpffLNX+0/w+ws2p21nYIlOwX/B5fqxq8F/BjqVemnJX8chKwRidvROg=="],- "template-recorder/mediabunny": ["[email protected]", "", { "dependencies": { "@types/dom-mediacapture-transform": "^0.1.11", "@types/dom-webcodecs": "0.1.13" } }, "sha512-f1B95A60YoCsZQO/JQYxPDorybEz2Sjasf4RrpwGSMmJW6JVyhI/iJDri9LF6kk5WwUovF8oiTvRNM6xGjWo5w=="],-"template-recorder/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "3.3.11", "picocolors": "1.1.1", "source-map-js": "1.2.1" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],"template-recorder/prettier-plugin-organize-imports": ["[email protected]", "", { "peerDependencies": { "prettier": "3.6.0", "typescript": "5.8.2" } }, "sha512-KFvk8C/zGyvUaE3RvxN2MhCLwzV6OBbFSkwZ2OamCrs9ZY4i5L77jQ/w4UmUr+lqX8qbaqVq6bZZkApn+IgJSg=="],@@ -10280,8 +10276,6 @@"template-still/p-limit": ["[email protected]", "", { "dependencies": { "yocto-queue": "0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],- "template-three/mediabunny": ["[email protected]", "", { "dependencies": { "@types/dom-mediacapture-transform": "^0.1.11", "@types/dom-webcodecs": "0.1.13" } }, "sha512-f1B95A60YoCsZQO/JQYxPDorybEz2Sjasf4RrpwGSMmJW6JVyhI/iJDri9LF6kk5WwUovF8oiTvRNM6xGjWo5w=="],-"template-vercel/@eslint/js": ["@eslint/[email protected]", "", {}, "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A=="],"template-vercel/@typescript-eslint/eslint-plugin": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.46.0", "@typescript-eslint/type-utils": "8.46.0", "@typescript-eslint/utils": "8.46.0", "@typescript-eslint/visitor-keys": "8.46.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.46.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA=="],@@ -13006,8 +13000,6 @@"teeny-request/https-proxy-agent/debug": ["[email protected]", "", { "dependencies": { "ms": "2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="],- "template-music-visualization/mediabunny/@types/dom-webcodecs": ["@types/[email protected]", "", {}, "sha512-O5hkiFIcjjszPIYyUSyvScyvrBoV3NOEEZx/pMlsu44TKzWNkLVBBxnxJz42in5n3QIolYOcBYFCPZZ0h8SkwQ=="],-"template-next-app-tailwind/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.46.0", "@typescript-eslint/visitor-keys": "8.46.0" } }, "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw=="],"template-next-app-tailwind/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.46.0", "@typescript-eslint/typescript-estree": "8.46.0", "@typescript-eslint/utils": "8.46.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hy+lvYV1lZpVs2jRaEYvgCblZxUoJiPyCemwbQZ+NGulWkQRy0HRPYAoef/CNSzaLt+MLvMptZsHXHlkEilaeg=="],@@ -13218,8 +13210,6 @@"template-recorder/lucide-react/react": ["[email protected]", "", {}, "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ=="],- "template-recorder/mediabunny/@types/dom-webcodecs": ["@types/[email protected]", "", {}, "sha512-O5hkiFIcjjszPIYyUSyvScyvrBoV3NOEEZx/pMlsu44TKzWNkLVBBxnxJz42in5n3QIolYOcBYFCPZZ0h8SkwQ=="],-"template-recorder/tailwindcss/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "3.3.11", "picocolors": "1.1.1", "source-map-js": "1.2.1" } }, "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ=="],"template-recorder/tailwindcss/resolve": ["[email protected]", "", { "dependencies": { "is-core-module": "2.15.1", "path-parse": "1.0.7", "supports-preserve-symlinks-flag": "1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw=="],@@ -13256,8 +13246,6 @@"template-still/p-limit/yocto-queue": ["[email protected]", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],- "template-three/mediabunny/@types/dom-webcodecs": ["@types/[email protected]", "", {}, "sha512-O5hkiFIcjjszPIYyUSyvScyvrBoV3NOEEZx/pMlsu44TKzWNkLVBBxnxJz42in5n3QIolYOcBYFCPZZ0h8SkwQ=="],-"template-vercel/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.46.0", "@typescript-eslint/visitor-keys": "8.46.0" } }, "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw=="],"template-vercel/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/types": "8.46.0", "@typescript-eslint/typescript-estree": "8.46.0", "@typescript-eslint/utils": "8.46.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hy+lvYV1lZpVs2jRaEYvgCblZxUoJiPyCemwbQZ+NGulWkQRy0HRPYAoef/CNSzaLt+MLvMptZsHXHlkEilaeg=="],diff --git a/packages/it-tests/src/templates/validate-templates.test.ts b/packages/it-tests/src/templates/validate-templates.test.tsindex 31c0d61db7..cc48730cc4 100644--- a/packages/it-tests/src/templates/validate-templates.test.ts+++ b/packages/it-tests/src/templates/validate-templates.test.ts@@ -42,6 +42,30 @@ describe('Templates should be valid', () => {expect(body.dependencies['@types/web']).toInclude('0.0.166');}+ const rootPackageJson = JSON.parse(+ readFileSync(+ path.join(process.cwd(), '..', '..', 'package.json'),+ 'utf8',+ ),+ );+ const catalog = rootPackageJson.workspaces.catalog;++ if (body.dependencies.mediabunny) {+ expect(body.dependencies.mediabunny).toBe(catalog.mediabunny);+ }++ if (body.dependencies['@mediabunny/mp3-encoder']) {+ expect(body.dependencies['@mediabunny/mp3-encoder']).toBe(+ catalog['@mediabunny/mp3-encoder'],+ );+ }++ if (body.dependencies['@mediabunny/ac3']) {+ expect(body.dependencies['@mediabunny/ac3']).toBe(+ catalog['@mediabunny/ac3'],+ );+ }+expect(body.devDependencies.prettier).toMatch('3.8.1');expect(body.private).toBe(true);expect(body.name).toStartWith('template-');diff --git a/packages/template-music-visualization/package.json b/packages/template-music-visualization/package.jsonindex 0177cf957b..9dd3e658d7 100644--- a/packages/template-music-visualization/package.json+++ b/packages/template-music-visualization/package.json@@ -17,7 +17,7 @@"@remotion/media-utils": "workspace:*","@remotion/google-fonts": "workspace:*","@remotion/zod-types": "workspace:*",- "mediabunny": "1.34.4",+ "mediabunny": "1.35.1","react": "19.2.3","react-dom": "19.2.3","remotion": "workspace:*",diff --git a/packages/template-recorder/package.json b/packages/template-recorder/package.jsonindex 5d62a4a8f1..6cbfe63bb8 100644--- a/packages/template-recorder/package.json+++ b/packages/template-recorder/package.json@@ -39,7 +39,7 @@"connect": "3.7.0","eslint": "9.19.0","lucide-react": "0.516.0",- "mediabunny": "1.34.4",+ "mediabunny": "1.35.1","react": "19.2.3","react-dom": "19.2.3","tailwind-merge": "1.14.0",diff --git a/packages/template-three/package.json b/packages/template-three/package.jsonindex baef800c28..d31d3437e4 100644--- a/packages/template-three/package.json+++ b/packages/template-three/package.json@@ -21,7 +21,7 @@"remotion": "workspace:*","three": "0.178.0","zod": "4.3.6",- "mediabunny": "1.34.4"+ "mediabunny": "1.35.1"},"devDependencies": {"@remotion/eslint-config-flat": "workspace:*",