@remotion/renderer 4.0.498 → 4.0.500

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18616,12 +18616,15 @@ var wrapWithErrorHandling = (fn) => {
18616
18616
  };
18617
18617
 
18618
18618
  // src/get-compositions.ts
18619
- var convertGetCompositionsArgumentsToOptions = (args) => {
18619
+ var convertGetCompositionsArgumentsToOptions = (args, enableV5BreakingChanges) => {
18620
18620
  if (args.length === 0) {
18621
18621
  throw new Error("No serve URL or webpack bundle directory was passed to getCompositions().");
18622
18622
  }
18623
18623
  const firstArg = args[0];
18624
18624
  if (typeof firstArg === "string") {
18625
+ if (enableV5BreakingChanges) {
18626
+ throw new TypeError("getCompositions() no longer supports the legacy positional arguments. Pass an options object instead: getCompositions({serveUrl, ...options}).");
18627
+ }
18625
18628
  return {
18626
18629
  ...args[1] ?? {},
18627
18630
  serveUrl: firstArg
@@ -18815,7 +18818,7 @@ var internalGetCompositionsRaw = async ({
18815
18818
  };
18816
18819
  var internalGetCompositions = wrapWithErrorHandling(internalGetCompositionsRaw);
18817
18820
  var getCompositions = (...args) => {
18818
- const options2 = convertGetCompositionsArgumentsToOptions(args);
18821
+ const options2 = convertGetCompositionsArgumentsToOptions(args, NoReactInternals10.ENABLE_V5_BREAKING_CHANGES);
18819
18822
  if (typeof options2?.serveUrl !== "string" || !options2.serveUrl) {
18820
18823
  throw new Error("No serve URL or webpack bundle directory was passed to getCompositions().");
18821
18824
  }
@@ -1,4 +1,5 @@
1
1
  import type { VideoConfig } from 'remotion/no-react';
2
+ import { NoReactInternals } from 'remotion/no-react';
2
3
  import type { BrowserExecutable } from './browser-executable';
3
4
  import type { BrowserLog } from './browser-log';
4
5
  import type { HeadlessBrowser } from './browser/Browser';
@@ -21,7 +22,7 @@ type InternalGetCompositionsOptions = {
21
22
  serveUrlOrWebpackUrl: string;
22
23
  onLog: OnLog;
23
24
  } & ToOptions<typeof optionsMap.getCompositions>;
24
- export type LegacyGetCompositionsOptions = RequiredInputPropsInV5 & {
25
+ type SharedGetCompositionsOptions = {
25
26
  envVariables?: Record<string, string>;
26
27
  puppeteerInstance?: HeadlessBrowser;
27
28
  onBrowserLog?: (log: BrowserLog) => void;
@@ -29,10 +30,15 @@ export type LegacyGetCompositionsOptions = RequiredInputPropsInV5 & {
29
30
  chromiumOptions?: ChromiumOptions;
30
31
  port?: number | null;
31
32
  } & Partial<ToOptions<typeof optionsMap.getCompositions>>;
32
- export type GetCompositionsOptions = LegacyGetCompositionsOptions & {
33
+ type V4LegacyGetCompositionsOptions = {
34
+ inputProps?: Record<string, unknown>;
35
+ } & SharedGetCompositionsOptions;
36
+ export type LegacyGetCompositionsOptions = typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES extends true ? never : V4LegacyGetCompositionsOptions;
37
+ export type GetCompositionsOptions = RequiredInputPropsInV5 & SharedGetCompositionsOptions & {
33
38
  serveUrl: string;
34
39
  };
35
- type GetCompositionsArguments = [options: GetCompositionsOptions] | [serveUrlOrWebpackUrl: string, config?: LegacyGetCompositionsOptions];
40
+ type V4GetCompositionsArguments = [options: GetCompositionsOptions] | [serveUrlOrWebpackUrl: string, config?: V4LegacyGetCompositionsOptions];
41
+ export declare const convertGetCompositionsArgumentsToOptions: (args: V4GetCompositionsArguments, enableV5BreakingChanges: boolean) => GetCompositionsOptions;
36
42
  export declare const internalGetCompositions: (args_0: InternalGetCompositionsOptions) => Promise<VideoConfig[]>;
37
- export declare const getCompositions: (...args: GetCompositionsArguments) => Promise<VideoConfig[]>;
43
+ export declare const getCompositions: (...args: V4GetCompositionsArguments) => Promise<VideoConfig[]>;
38
44
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCompositions = exports.internalGetCompositions = void 0;
3
+ exports.getCompositions = exports.internalGetCompositions = exports.convertGetCompositionsArgumentsToOptions = void 0;
4
4
  const no_react_1 = require("remotion/no-react");
5
5
  const browser_download_progress_bar_1 = require("./browser/browser-download-progress-bar");
6
6
  const TimeoutSettings_1 = require("./browser/TimeoutSettings");
@@ -16,13 +16,16 @@ const seek_to_frame_1 = require("./seek-to-frame");
16
16
  const set_props_and_env_1 = require("./set-props-and-env");
17
17
  const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
18
18
  const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
19
- const convertGetCompositionsArgumentsToOptions = (args) => {
19
+ const convertGetCompositionsArgumentsToOptions = (args, enableV5BreakingChanges) => {
20
20
  var _a;
21
21
  if (args.length === 0) {
22
22
  throw new Error('No serve URL or webpack bundle directory was passed to getCompositions().');
23
23
  }
24
24
  const firstArg = args[0];
25
25
  if (typeof firstArg === 'string') {
26
+ if (enableV5BreakingChanges) {
27
+ throw new TypeError('getCompositions() no longer supports the legacy positional arguments. Pass an options object instead: getCompositions({serveUrl, ...options}).');
28
+ }
26
29
  return {
27
30
  ...((_a = args[1]) !== null && _a !== void 0 ? _a : {}),
28
31
  serveUrl: firstArg,
@@ -30,6 +33,7 @@ const convertGetCompositionsArgumentsToOptions = (args) => {
30
33
  }
31
34
  return firstArg;
32
35
  };
36
+ exports.convertGetCompositionsArgumentsToOptions = convertGetCompositionsArgumentsToOptions;
33
37
  const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCustomSchema, page, proxyPort, serveUrl, timeoutInMilliseconds, indent, logLevel, mediaCacheSizeInBytes, darkMode, }) => {
34
38
  (0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
35
39
  await (0, set_props_and_env_1.setPropsAndEnv)({
@@ -178,7 +182,7 @@ exports.internalGetCompositions = (0, wrap_with_error_handling_1.wrapWithErrorHa
178
182
  * @see [Documentation](https://www.remotion.dev/docs/renderer/get-compositions)
179
183
  */
180
184
  const getCompositions = (...args) => {
181
- const options = convertGetCompositionsArgumentsToOptions(args);
185
+ const options = (0, exports.convertGetCompositionsArgumentsToOptions)(args, no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES);
182
186
  if (typeof (options === null || options === void 0 ? void 0 : options.serveUrl) !== 'string' || !options.serveUrl) {
183
187
  throw new Error('No serve URL or webpack bundle directory was passed to getCompositions().');
184
188
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
4
4
  },
5
5
  "name": "@remotion/renderer",
6
- "version": "4.0.498",
6
+ "version": "4.0.500",
7
7
  "description": "Render Remotion videos using Node.js or Bun",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "execa": "5.1.1",
25
- "remotion": "4.0.498",
26
- "@remotion/streaming": "4.0.498",
25
+ "remotion": "4.0.500",
26
+ "@remotion/streaming": "4.0.500",
27
27
  "source-map": "0.8.0-beta.0",
28
28
  "ws": "8.21.0",
29
- "@remotion/licensing": "4.0.498"
29
+ "@remotion/licensing": "4.0.500"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=16.8.0",
@@ -40,19 +40,19 @@
40
40
  "react-dom": "19.2.3",
41
41
  "@typescript/native-preview": "7.0.0-dev.20260217.1",
42
42
  "@types/ws": "8.5.10",
43
- "@remotion/example-videos": "4.0.498",
44
- "@remotion/eslint-config-internal": "4.0.498",
43
+ "@remotion/example-videos": "4.0.500",
44
+ "@remotion/eslint-config-internal": "4.0.500",
45
45
  "eslint": "9.19.0",
46
46
  "@types/node": "20.12.14"
47
47
  },
48
48
  "optionalDependencies": {
49
- "@remotion/compositor-darwin-arm64": "4.0.498",
50
- "@remotion/compositor-darwin-x64": "4.0.498",
51
- "@remotion/compositor-linux-arm64-gnu": "4.0.498",
52
- "@remotion/compositor-linux-arm64-musl": "4.0.498",
53
- "@remotion/compositor-linux-x64-gnu": "4.0.498",
54
- "@remotion/compositor-linux-x64-musl": "4.0.498",
55
- "@remotion/compositor-win32-x64-msvc": "4.0.498"
49
+ "@remotion/compositor-darwin-arm64": "4.0.500",
50
+ "@remotion/compositor-darwin-x64": "4.0.500",
51
+ "@remotion/compositor-linux-arm64-gnu": "4.0.500",
52
+ "@remotion/compositor-linux-arm64-musl": "4.0.500",
53
+ "@remotion/compositor-linux-x64-gnu": "4.0.500",
54
+ "@remotion/compositor-linux-x64-musl": "4.0.500",
55
+ "@remotion/compositor-win32-x64-msvc": "4.0.500"
56
56
  },
57
57
  "keywords": [
58
58
  "remotion",