@remotion/bundler 3.3.59 → 3.3.60-alpha.0

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.
@@ -127,10 +127,10 @@ function scheduleUpdate() {
127
127
  }
128
128
  };
129
129
  // Only trigger refresh if the webpack HMR state is idle
130
- if (((_a = module.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
130
+ if (((_a = __webpack_module__.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
131
131
  return;
132
132
  }
133
- (_b = module.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
133
+ (_b = __webpack_module__.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
134
134
  if (status === 'idle') {
135
135
  execute();
136
136
  }
@@ -31,5 +31,99 @@
31
31
  * SOFTWARE.
32
32
  */
33
33
  import type { LoaderDefinition } from 'webpack';
34
+ declare global {
35
+ const __webpack_hash__: unknown;
36
+ interface HotNotifierInfo {
37
+ type: 'self-declined' | 'declined' | 'unaccepted' | 'accepted' | 'disposed' | 'accept-errored' | 'self-accept-errored' | 'self-accept-error-handler-errored';
38
+ /**
39
+ * The module in question.
40
+ */
41
+ moduleId: number;
42
+ /**
43
+ * For errors: the module id owning the accept handler.
44
+ */
45
+ dependencyId?: number | undefined;
46
+ /**
47
+ * For declined/accepted/unaccepted: the chain from where the update was propagated.
48
+ */
49
+ chain?: number[] | undefined;
50
+ /**
51
+ * For declined: the module id of the declining parent
52
+ */
53
+ parentId?: number | undefined;
54
+ /**
55
+ * For accepted: the modules that are outdated and will be disposed
56
+ */
57
+ outdatedModules?: number[] | undefined;
58
+ /**
59
+ * For accepted: The location of accept handlers that will handle the update
60
+ */
61
+ outdatedDependencies?: {
62
+ [dependencyId: number]: number[];
63
+ } | undefined;
64
+ /**
65
+ * For errors: the thrown error
66
+ */
67
+ error?: Error | undefined;
68
+ /**
69
+ * For self-accept-error-handler-errored: the error thrown by the module
70
+ * before the error handler tried to handle it.
71
+ */
72
+ originalError?: Error | undefined;
73
+ }
74
+ interface AcceptOptions {
75
+ /**
76
+ * If true the update process continues even if some modules are not accepted (and would bubble to the entry point).
77
+ */
78
+ ignoreUnaccepted?: boolean | undefined;
79
+ /**
80
+ * Ignore changes made to declined modules.
81
+ */
82
+ ignoreDeclined?: boolean | undefined;
83
+ /**
84
+ * Ignore errors throw in accept handlers, error handlers and while reevaluating module.
85
+ */
86
+ ignoreErrored?: boolean | undefined;
87
+ /**
88
+ * Notifier for declined modules.
89
+ */
90
+ onDeclined?: ((info: HotNotifierInfo) => void) | undefined;
91
+ /**
92
+ * Notifier for unaccepted modules.
93
+ */
94
+ onUnaccepted?: ((info: HotNotifierInfo) => void) | undefined;
95
+ /**
96
+ * Notifier for accepted modules.
97
+ */
98
+ onAccepted?: ((info: HotNotifierInfo) => void) | undefined;
99
+ /**
100
+ * Notifier for disposed modules.
101
+ */
102
+ onDisposed?: ((info: HotNotifierInfo) => void) | undefined;
103
+ /**
104
+ * Notifier for errors.
105
+ */
106
+ onErrored?: ((info: HotNotifierInfo) => void) | undefined;
107
+ /**
108
+ * Indicates that apply() is automatically called by check function
109
+ */
110
+ autoApply?: boolean | undefined;
111
+ }
112
+ const __webpack_module__: {
113
+ id: string;
114
+ exports: unknown;
115
+ hot: {
116
+ accept: () => void;
117
+ dispose: (onDispose: (data: Record<string, unknown>) => void) => void;
118
+ invalidate: () => void;
119
+ data?: Record<string, unknown>;
120
+ addStatusHandler(callback: (status: string) => void): void;
121
+ status(): string;
122
+ apply(options?: AcceptOptions): Promise<ModuleId[]>;
123
+ check(autoApply?: boolean): Promise<null | ModuleId[]>;
124
+ };
125
+ };
126
+ type ModuleId = string | number;
127
+ }
34
128
  declare const ReactRefreshLoader: LoaderDefinition;
35
129
  export default ReactRefreshLoader;
@@ -12,34 +12,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  // This function gets unwrapped into global scope, which is why we don't invert
13
13
  // if-blocks. Also, you cannot use `return`.
14
14
  function RefreshModuleRuntime() {
15
+ var _a, _b;
15
16
  // Legacy CSS implementations will `eval` browser code in a Node.js context
16
17
  // to extract CSS. For backwards compatibility, we need to check we're in a
17
18
  // browser context before continuing.
18
19
  if (typeof self !== 'undefined' &&
19
20
  // AMP / No-JS mode does not inject these helpers:
20
21
  '$RefreshHelpers$' in self) {
21
- // @ts-expect-error
22
- // eslint-disable-next-line no-proto
23
- const currentExports = module.__proto__.exports;
24
- let prevExports = null;
25
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
26
- if (module.hot && module.hot.data && module.hot.data.prevExports) {
27
- prevExports = module.hot.data.prevExports;
28
- }
22
+ const currentExports = __webpack_module__.exports;
23
+ const prevExports = (_b = (_a = __webpack_module__.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;
29
24
  // This cannot happen in MainTemplate because the exports mismatch between
30
25
  // templating and execution.
31
- self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);
26
+ self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, __webpack_module__.id);
32
27
  // A module can be accepted automatically based on its exports, e.g. when
33
28
  // it is a Refresh Boundary.
34
29
  if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {
35
30
  // Save the previous exports on update so we can compare the boundary
36
31
  // signatures.
37
- module.hot.dispose((data) => {
32
+ __webpack_module__.hot.dispose((data) => {
38
33
  data.prevExports = currentExports;
39
34
  });
40
35
  // Unconditionally accept an update to this module, we'll check if it's
41
36
  // still a Refresh Boundary later.
42
- module.hot.accept();
37
+ __webpack_module__.hot.accept();
43
38
  // This field is set when the previous version of this module was a
44
39
  // Refresh Boundary, letting us know we need to check for invalidation or
45
40
  // enqueue an update.
@@ -52,8 +47,7 @@ function RefreshModuleRuntime() {
52
47
  // re-render. Similarly, if you convert a class component to a
53
48
  // function, we want to invalidate the boundary.
54
49
  if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {
55
- // @ts-expect-error
56
- module.hot.invalidate();
50
+ __webpack_module__.hot.invalidate();
57
51
  }
58
52
  else {
59
53
  self.$RefreshHelpers$.scheduleUpdate();
@@ -67,8 +61,7 @@ function RefreshModuleRuntime() {
67
61
  // because we already accepted this update (accidental side effect).
68
62
  const isNoLongerABoundary = prevExports !== null;
69
63
  if (isNoLongerABoundary) {
70
- // @ts-expect-error
71
- module.hot.invalidate();
64
+ __webpack_module__.hot.invalidate();
72
65
  }
73
66
  }
74
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/bundler",
3
- "version": "3.3.59",
3
+ "version": "3.3.60-alpha.0",
4
4
  "description": "Bundler for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -26,7 +26,7 @@
26
26
  "css-loader": "5.2.7",
27
27
  "esbuild": "0.16.12",
28
28
  "react-refresh": "0.9.0",
29
- "remotion": "3.3.59",
29
+ "remotion": "3.3.60-alpha.0",
30
30
  "style-loader": "2.0.0",
31
31
  "webpack": "5.74.0"
32
32
  },
@@ -39,7 +39,6 @@
39
39
  "@types/node": "^16.7.5",
40
40
  "@types/react": "18.0.26",
41
41
  "@types/react-dom": "18.0.10",
42
- "@types/webpack-env": "^1.16.0",
43
42
  "@typescript-eslint/eslint-plugin": "5.18.0",
44
43
  "@typescript-eslint/parser": "5.18.0",
45
44
  "eslint": "8.25.0",
@@ -64,5 +63,5 @@
64
63
  "publishConfig": {
65
64
  "access": "public"
66
65
  },
67
- "gitHead": "4ee88b056704d7224838a8fbc32d2d3522c5afbe"
66
+ "gitHead": "49d98d229e525dad4dd2921b3ee4eae49297816b"
68
67
  }