🎥 Make videos programmatically with React
Require Bun 1.1.7 for contributing
Jonny Burgerb6fd76b3e2ad
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.ymlindex 60b9ab748d..d51d68a1d7 100644--- a/.github/workflows/changelog.yml+++ b/.github/workflows/changelog.yml@@ -12,7 +12,7 @@ jobs:- uses: actions/checkout@main- uses: oven-sh/setup-bun@v1with:- bun-version: 1.1.4+ bun-version: 1.1.7- name: Push changelogenv:DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}diff --git a/.github/workflows/push.yml b/.github/workflows/push.ymlindex 57c9c16b1d..7023caac47 100644--- a/.github/workflows/push.yml+++ b/.github/workflows/push.yml@@ -19,7 +19,7 @@ jobs:node-version: 16- uses: oven-sh/setup-bun@v1with:- bun-version: 1.1.4+ bun-version: 1.1.7- run: |corepack enable- name: Get pnpm store directory@@ -71,7 +71,7 @@ jobs:node-version: 16- uses: oven-sh/setup-bun@v1with:- bun-version: 1.1.4+ bun-version: 1.1.7- run: |corepack enable- name: Get pnpm store directory@@ -138,7 +138,7 @@ jobs:node-version: 16- uses: oven-sh/setup-bun@v1with:- bun-version: 1.1.4+ bun-version: 1.1.7- run: |corepack enable- name: Get pnpm store directory@@ -187,7 +187,7 @@ jobs:node-version: ${{ matrix.node_version }}- uses: oven-sh/setup-bun@v1with:- bun-version: 1.1.4+ bun-version: 1.1.7- run: |corepack enable- name: Get pnpm store directorydiff --git a/packages/animation-utils/bundle.ts b/packages/animation-utils/bundle.tsindex 0b69f3484f..69ddc9bd2b 100644--- a/packages/animation-utils/bundle.ts+++ b/packages/animation-utils/bundle.ts@@ -1,17 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/core/bundle.ts b/packages/core/bundle.tsindex 27fcfe7cc8..05c7c71f4f 100644--- a/packages/core/bundle.ts+++ b/packages/core/bundle.ts@@ -1,16 +1,15 @@-import {build, revision} from 'bun';+import {build, semver, version} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {+if (!semver.satisfies(version, '^1.1.7')) {// eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',+ console.error(+ `There is a bug with bundling when using Bun <1.1.7. You use ${version}. Please use a newer version`,);+ process.exit(1);}const output = await build({diff --git a/packages/docs/docs/contributing/index.mdx b/packages/docs/docs/contributing/index.mdxindex d12e252330..6257e5ee22 100644--- a/packages/docs/docs/contributing/index.mdx+++ b/packages/docs/docs/contributing/index.mdx@@ -38,7 +38,7 @@ Prefix with `sudo` if necessary.The version must be `8.10.2`.We use [Bun](https://bun.sh) to speed up some parts of the build.-Install at least Bun 1.1.1 on your system - see https://bun.sh/ for instructions.+Install at least Bun 1.1.7 on your system - see https://bun.sh/ for instructions.<Step>2</Step> Clone the Remotion repository:<br />diff --git a/packages/gif/bundle.ts b/packages/gif/bundle.tsindex 5b4ef3ff6f..013be1e159 100644--- a/packages/gif/bundle.ts+++ b/packages/gif/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/google-fonts/bundle.ts b/packages/google-fonts/bundle.tsindex b5ffa17f20..44a0a8e683 100644--- a/packages/google-fonts/bundle.ts+++ b/packages/google-fonts/bundle.ts@@ -4,15 +4,6 @@ if (process.env.NODE_ENV !== "production") {throw new Error("This script must be run using NODE_ENV=production");}-if (!revision.startsWith("07ce")) {- // eslint-disable-next-line no-console- console.warn("warn: Remotion currently uses a fork of Bun to bundle.");- // eslint-disable-next-line no-console- console.log(- "You dont currently run the fork, this could lead to duplicate key warnings in React."- );-}-import path from "path";import { filteredFonts } from "./scripts/filtered-fonts";import { removeWhitespace } from "./scripts/utils";diff --git a/packages/lottie/bundle.ts b/packages/lottie/bundle.tsindex 3670138438..175eb55ff2 100644--- a/packages/lottie/bundle.ts+++ b/packages/lottie/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/noise/bundle.ts b/packages/noise/bundle.tsindex 4b5612d613..bf6ec3de4f 100644--- a/packages/noise/bundle.ts+++ b/packages/noise/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/player/bundle.ts b/packages/player/bundle.tsindex 197318bc6f..557d126146 100644--- a/packages/player/bundle.ts+++ b/packages/player/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/rive/bundle.ts b/packages/rive/bundle.tsindex f6d486489c..26457e2fbd 100644--- a/packages/rive/bundle.ts+++ b/packages/rive/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/skia/bundle.ts b/packages/skia/bundle.tsindex 6afd14d9f3..068e5cfb33 100644--- a/packages/skia/bundle.ts+++ b/packages/skia/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const mainModule = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/studio/bundle.ts b/packages/studio/bundle.tsindex 19998be4d3..a895fb8348 100644--- a/packages/studio/bundle.ts+++ b/packages/studio/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const mainModule = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/tailwind/bundle.ts b/packages/tailwind/bundle.tsindex 180d29b368..8820779ec6 100644--- a/packages/tailwind/bundle.ts+++ b/packages/tailwind/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/enable.ts'],naming: '[name].mjs',diff --git a/packages/three/bundle.ts b/packages/three/bundle.tsindex 4b8ea74119..e8fef112c5 100644--- a/packages/three/bundle.ts+++ b/packages/three/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',diff --git a/packages/transitions/bundle.ts b/packages/transitions/bundle.tsindex cd8bf4934e..0c3259ff7a 100644--- a/packages/transitions/bundle.ts+++ b/packages/transitions/bundle.ts@@ -1,19 +1,10 @@-import {build, revision} from 'bun';+import {build} from 'bun';import path from 'path';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const presentations = ['slide', 'flip', 'wipe', 'fade', 'clock-wipe'];const output = await build({diff --git a/packages/zod-types/bundle.ts b/packages/zod-types/bundle.tsindex 67e8a9588b..162c51d88a 100644--- a/packages/zod-types/bundle.ts+++ b/packages/zod-types/bundle.ts@@ -1,18 +1,9 @@-import {build, revision} from 'bun';+import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}-if (!revision.startsWith('07ce')) {- // eslint-disable-next-line no-console- console.warn('warn: Remotion currently uses a fork of Bun to bundle.');- // eslint-disable-next-line no-console- console.log(- 'You dont currently run the fork, this could lead to duplicate key warnings in React.',- );-}-const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',