From d75124bc8c1c52597dd136d25f17ad934bcd13a0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:08:19 +0000 Subject: [PATCH 1/3] Initial plan From eb66e3fdd50ab9240664b6aba4066fd8eec52ef8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:21:58 +0000 Subject: [PATCH 2/3] @remotion/cli, @remotion/player: Fix gitSource subfolder for Vercel deployments, fix setVolume error message --- packages/cli/src/get-github-repository.ts | 21 ++++++++++++------- packages/cli/src/test/get-github-repo.test.ts | 8 ++++++- packages/player/src/PlayerUI.tsx | 2 +- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/packages/cli/src/get-github-repository.ts b/packages/cli/src/get-github-repository.ts index 4cba19c3b40..87725cddbe8 100644 --- a/packages/cli/src/get-github-repository.ts +++ b/packages/cli/src/get-github-repository.ts @@ -1,9 +1,9 @@ -import {execSync} from 'child_process'; -import {existsSync, readFileSync} from 'fs'; -import path from 'path'; import {BundlerInternals} from '@remotion/bundler'; import type {LogLevel} from '@remotion/renderer'; import type {GitSource} from '@remotion/studio-shared'; +import {execSync} from 'child_process'; +import {existsSync, readFileSync} from 'fs'; +import path from 'path'; import {Log} from './log'; export type ParsedGitRemote = { @@ -112,7 +112,7 @@ export const getGifRef = (logLevel: LogLevel): string | null => { } }; -const getFromEnvVariables = (): GitSource | null => { +const getFromEnvVariables = (remotionRoot: string): GitSource | null => { const { VERCEL_GIT_PROVIDER, VERCEL_GIT_COMMIT_SHA, @@ -125,12 +125,19 @@ const getFromEnvVariables = (): GitSource | null => { VERCEL_GIT_REPO_SLUG && VERCEL_GIT_PROVIDER === 'github' ) { + let relativeFromGitRoot = ''; + const gitConfig = getGitConfig(remotionRoot); + if (gitConfig) { + const gitRoot = path.dirname(path.dirname(gitConfig)); + relativeFromGitRoot = path.relative(gitRoot, remotionRoot); + } + return { name: VERCEL_GIT_REPO_SLUG, org: VERCEL_GIT_REPO_OWNER, ref: VERCEL_GIT_COMMIT_SHA, type: 'github', - relativeFromGitRoot: '', + relativeFromGitRoot, }; } @@ -150,9 +157,9 @@ export const getGitSource = ({ return null; } - const fromEnv = getFromEnvVariables(); + const fromEnv = getFromEnvVariables(remotionRoot); if (fromEnv) { - return getFromEnvVariables(); + return fromEnv; } const ref = getGifRef(logLevel); diff --git a/packages/cli/src/test/get-github-repo.test.ts b/packages/cli/src/test/get-github-repo.test.ts index 9c0b9c387b8..dcfd0dd9047 100644 --- a/packages/cli/src/test/get-github-repo.test.ts +++ b/packages/cli/src/test/get-github-repo.test.ts @@ -69,7 +69,7 @@ test('Should recognize VERCEL', () => { process.env.VERCEL_GIT_REPO_OWNER = 'remotion-dev'; const source = getGitSource({ - remotionRoot: 'dontmatter', + remotionRoot: process.cwd(), disableGitSource: false, logLevel: 'info', }); @@ -78,4 +78,10 @@ test('Should recognize VERCEL', () => { expect(source?.org).toBe('remotion-dev'); expect(source?.ref).toBe('123'); expect(source?.type).toBe('github'); + expect(source?.relativeFromGitRoot).toBe(`packages${path.sep}cli`); + + delete process.env.VERCEL_GIT_COMMIT_SHA; + delete process.env.VERCEL_GIT_PROVIDER; + delete process.env.VERCEL_GIT_REPO_SLUG; + delete process.env.VERCEL_GIT_REPO_OWNER; }); diff --git a/packages/player/src/PlayerUI.tsx b/packages/player/src/PlayerUI.tsx index bbc64546782..9697a1ef660 100644 --- a/packages/player/src/PlayerUI.tsx +++ b/packages/player/src/PlayerUI.tsx @@ -439,7 +439,7 @@ const PlayerUI: React.ForwardRefRenderFunction< if (vol < 0 || vol > 1) { throw new TypeError( - `setVolume() got a number that is out of range. Must be between 0 and 1, got ${typeof vol}`, + `setVolume() got a number that is out of range. Must be between 0 and 1, got ${vol}`, ); } From 4099e10a04143882e61e1a3dcfda990f987d5ac0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:41:28 +0000 Subject: [PATCH 3/3] @remotion/cli: Fix import order per oxfmt formatting --- packages/cli/src/get-github-repository.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/get-github-repository.ts b/packages/cli/src/get-github-repository.ts index 87725cddbe8..dcb64597725 100644 --- a/packages/cli/src/get-github-repository.ts +++ b/packages/cli/src/get-github-repository.ts @@ -1,9 +1,9 @@ -import {BundlerInternals} from '@remotion/bundler'; -import type {LogLevel} from '@remotion/renderer'; -import type {GitSource} from '@remotion/studio-shared'; import {execSync} from 'child_process'; import {existsSync, readFileSync} from 'fs'; import path from 'path'; +import {BundlerInternals} from '@remotion/bundler'; +import type {LogLevel} from '@remotion/renderer'; +import type {GitSource} from '@remotion/studio-shared'; import {Log} from './log'; export type ParsedGitRemote = {