@remotion/bundler 4.0.534 → 4.0.535

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.
package/dist/bundle.js CHANGED
@@ -335,6 +335,10 @@ const internalBundle = async (actualArgs) => {
335
335
  experimentalKeepAudioContextAlive: false,
336
336
  sampleRate: (_l = (_b = actualArgs.renderDefaults) === null || _b === void 0 ? void 0 : _b.sampleRate) !== null && _l !== void 0 ? _l : 48000,
337
337
  studioRuntimeConfig: {
338
+ showPremounting: null,
339
+ defaultPremountInSeconds: null,
340
+ experimentalSequenceActivityEnabled: false,
341
+ experimentalSequenceActivityLimit: no_react_1.NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
338
342
  askAIEnabled: actualArgs.askAIEnabled,
339
343
  bufferStateDelayInMilliseconds: actualArgs.bufferStateDelayInMilliseconds,
340
344
  canvasTabsEnabled: true,
@@ -7,9 +7,6 @@ const react_1 = __importDefault(require("react"));
7
7
  const jsx_dev_runtime_1 = __importDefault(require("react/jsx-dev-runtime"));
8
8
  const jsx_runtime_1 = __importDefault(require("react/jsx-runtime"));
9
9
  const remotion_1 = require("remotion");
10
- const componentsToAddStacksTo = remotion_1.Internals.getComponentsToAddStacksTo();
11
- const sequenceComponent = remotion_1.Internals.getSequenceComponent();
12
- const internalStackProp = remotion_1.Internals.REMOTION_INTERNAL_STACK_PROP;
13
10
  const originalCreateElement = react_1.default.createElement;
14
11
  const originalJsx = jsx_runtime_1.default.jsx;
15
12
  const originalJsxs = jsx_runtime_1.default.jsxs;
@@ -34,55 +31,17 @@ const getSourceFileName = (fileName) => {
34
31
  }
35
32
  return `./${normalizedFileName.slice(normalizedRoot.length + 1)}`;
36
33
  };
37
- const enableProxy = (api, isCreateElement, sourceArgumentIndex) => {
38
- return new Proxy(api, {
39
- apply(target, thisArg, argArray) {
40
- const component = argArray[0];
41
- if (componentsToAddStacksTo.includes(component)) {
42
- const [first, props, ...rest] = argArray;
43
- const children = isCreateElement
44
- ? rest.length === 0
45
- ? props === null || props === void 0 ? void 0 : props.children
46
- : rest
47
- : props === null || props === void 0 ? void 0 : props.children;
48
- const source = sourceArgumentIndex === null ? null : argArray[sourceArgumentIndex];
49
- const stack = source &&
50
- typeof source.fileName === 'string' &&
51
- typeof source.lineNumber === 'number' &&
52
- typeof source.columnNumber === 'number'
53
- ? remotion_1.Internals.makeOriginalSourceStack({
54
- fileName: getSourceFileName(source.fileName),
55
- lineNumber: source.lineNumber,
56
- columnNumber: source.columnNumber,
57
- })
58
- : new Error().stack;
59
- const newProps = (props === null || props === void 0 ? void 0 : props[internalStackProp])
60
- ? { ...props }
61
- : {
62
- ...(props !== null && props !== void 0 ? props : {}),
63
- [internalStackProp]: stack,
64
- };
65
- if (first === sequenceComponent) {
66
- newProps._remotionInternalSingleChildComponent =
67
- remotion_1.Internals.getSingleChildComponent(children);
68
- }
69
- return Reflect.apply(target, thisArg, [first, newProps, ...rest]);
70
- }
71
- return Reflect.apply(target, thisArg, argArray);
72
- },
73
- });
74
- };
75
34
  let stackTracesEnabled = false;
76
35
  const enableSequenceStackTraces = () => {
77
36
  if (stackTracesEnabled) {
78
37
  return;
79
38
  }
80
39
  stackTracesEnabled = true;
81
- react_1.default.createElement = enableProxy(originalCreateElement, true, null);
82
- jsx_runtime_1.default.jsx = enableProxy(originalJsx, false, null);
83
- jsx_runtime_1.default.jsxs = enableProxy(originalJsxs, false, null);
40
+ react_1.default.createElement = remotion_1.Internals.createElementSourceProxy(originalCreateElement, null, getSourceFileName);
41
+ jsx_runtime_1.default.jsx = remotion_1.Internals.createElementSourceProxy(originalJsx, null, getSourceFileName);
42
+ jsx_runtime_1.default.jsxs = remotion_1.Internals.createElementSourceProxy(originalJsxs, null, getSourceFileName);
84
43
  if (originalJsxDev) {
85
- jsx_dev_runtime_1.default.jsxDEV = enableProxy(originalJsxDev, false, 4);
44
+ jsx_dev_runtime_1.default.jsxDEV = remotion_1.Internals.createElementSourceProxy(originalJsxDev, 4, getSourceFileName);
86
45
  }
87
46
  };
88
47
  if (typeof window !== 'undefined') {
@@ -12,7 +12,6 @@ export declare const getResolveConfig: () => {
12
12
  'remotion/no-react': string;
13
13
  'remotion/version': string;
14
14
  remotion: string;
15
- '@remotion/media-parser/worker'?: string | undefined;
16
15
  'react-dom/client': string;
17
16
  };
18
17
  };
@@ -34,7 +33,7 @@ export declare const getBaseConfig: (environment: "development" | "production",
34
33
  watchOptions: {
35
34
  poll: number | undefined;
36
35
  aggregateTimeout: number;
37
- ignored: string[];
36
+ ignored: RegExp;
38
37
  };
39
38
  devtool: "cheap-module-source-map" | "source-map";
40
39
  };
@@ -36,11 +36,6 @@ const getResolveConfig = () => ({
36
36
  'remotion/no-react': node_path_1.default.resolve(require.resolve('remotion'), '..', '..', 'esm', 'no-react.mjs'),
37
37
  'remotion/version': node_path_1.default.resolve(require.resolve('remotion'), '..', '..', 'esm', 'version.mjs'),
38
38
  remotion: node_path_1.default.resolve(require.resolve('remotion'), '..', '..', 'esm', 'index.mjs'),
39
- ...(no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
40
- ? {}
41
- : {
42
- '@remotion/media-parser/worker': node_path_1.default.resolve(require.resolve('@remotion/media-parser'), '..', 'esm', 'worker.mjs'),
43
- }),
44
39
  // Studio entry points are also passed to the bundler as resolved CJS paths.
45
40
  // Route both those paths and package imports through the same ESM build.
46
41
  ...Object.fromEntries([
@@ -89,7 +84,7 @@ const getBaseConfig = (environment, poll) => {
89
84
  watchOptions: {
90
85
  poll: poll !== null && poll !== void 0 ? poll : undefined,
91
86
  aggregateTimeout: 0,
92
- ignored: ['**/.git/**', '**/.turbo/**', '**/node_modules/**'],
87
+ ignored: /(?:^|[\\/])(?:\.git|\.turbo|node_modules)[\\/]/,
93
88
  },
94
89
  // Higher source map quality in development to power line numbers for stack traces
95
90
  devtool: environment === 'development'
@@ -2,6 +2,7 @@ import type { Compiler } from 'webpack';
2
2
  type TraceLogFn = (...args: Parameters<typeof console.log>) => void;
3
3
  export declare class WatchIgnoreNextChangePlugin {
4
4
  private filesToIgnore;
5
+ private filesRequiringRebuild;
5
6
  private dirsToIgnore;
6
7
  private snapshotFileTimestamps;
7
8
  private snapshotDirTimestamps;
@@ -10,6 +11,7 @@ export declare class WatchIgnoreNextChangePlugin {
10
11
  private trace;
11
12
  constructor(trace: TraceLogFn);
12
13
  ignoreNextChange(file: string): void;
14
+ requireRebuild(file: string): void;
13
15
  unignoreNextChange(file: string): void;
14
16
  consumeSuppressedFilesHistory(): string[];
15
17
  consumeSuppressedFilesForRebuild(): string[];
@@ -14,6 +14,7 @@ exports.WatchIgnoreNextChangePlugin = void 0;
14
14
  const node_path_1 = __importDefault(require("node:path"));
15
15
  class WatchIgnoreNextChangePlugin {
16
16
  filesToIgnore = new Set();
17
+ filesRequiringRebuild = new Set();
17
18
  dirsToIgnore = new Set();
18
19
  snapshotFileTimestamps = new Map();
19
20
  snapshotDirTimestamps = new Map();
@@ -25,6 +26,9 @@ class WatchIgnoreNextChangePlugin {
25
26
  }
26
27
  ignoreNextChange(file) {
27
28
  var _a;
29
+ if (this.filesRequiringRebuild.has(file)) {
30
+ return;
31
+ }
28
32
  this.filesToIgnore.add(file);
29
33
  const dir = node_path_1.default.dirname(file);
30
34
  this.dirsToIgnore.add(dir);
@@ -52,6 +56,10 @@ class WatchIgnoreNextChangePlugin {
52
56
  }
53
57
  this.trace('[WatchIgnoreNextChange] Registered ignore for', file);
54
58
  }
59
+ requireRebuild(file) {
60
+ this.unignoreNextChange(file);
61
+ this.filesRequiringRebuild.add(file);
62
+ }
55
63
  unignoreNextChange(file) {
56
64
  this.filesToIgnore.delete(file);
57
65
  const dir = node_path_1.default.dirname(file);
@@ -106,6 +114,14 @@ class WatchIgnoreNextChangePlugin {
106
114
  };
107
115
  const wrappedCallback = (err, fileTimestamps, dirTimestamps, changedFiles, removedFiles) => {
108
116
  var _a, _b, _c, _d;
117
+ // A rebuild-required write wins over subsequent suppressed writes in
118
+ // the same watcher batch. Release it only when the watcher sees it.
119
+ for (const file of changedFiles !== null && changedFiles !== void 0 ? changedFiles : []) {
120
+ self.filesRequiringRebuild.delete(file);
121
+ }
122
+ for (const file of removedFiles !== null && removedFiles !== void 0 ? removedFiles : []) {
123
+ self.filesRequiringRebuild.delete(file);
124
+ }
109
125
  const hasIgnoredFiles = self.filesToIgnore.size > 0;
110
126
  const suppressedFiles = [];
111
127
  const suppressedDirs = [];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/bundler"
4
4
  },
5
5
  "name": "@remotion/bundler",
6
- "version": "4.0.534",
6
+ "version": "4.0.535",
7
7
  "description": "Bundle Remotion compositions using Webpack",
8
8
  "main": "dist/index.js",
9
9
  "bugs": {
@@ -24,11 +24,10 @@
24
24
  "css-loader": "7.1.4",
25
25
  "esbuild": "0.28.1",
26
26
  "react-refresh": "0.18.0",
27
- "remotion": "4.0.534",
28
- "@remotion/studio": "4.0.534",
29
- "@remotion/studio-shared": "4.0.534",
30
- "@remotion/timeline-utils": "4.0.534",
31
- "@remotion/media-parser": "4.0.534",
27
+ "remotion": "4.0.535",
28
+ "@remotion/studio": "4.0.535",
29
+ "@remotion/studio-shared": "4.0.535",
30
+ "@remotion/timeline-utils": "4.0.535",
32
31
  "style-loader": "4.0.0",
33
32
  "webpack": "5.105.0"
34
33
  },
@@ -39,7 +38,7 @@
39
38
  "devDependencies": {
40
39
  "react": "19.2.3",
41
40
  "react-dom": "19.2.3",
42
- "@remotion/eslint-config-internal": "4.0.534",
41
+ "@remotion/eslint-config-internal": "4.0.535",
43
42
  "eslint": "9.19.0",
44
43
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
45
44
  },