@expo/cli 1.0.0-canary-20250404-3c3b5fd → 1.0.0-canary-20250701-6a945c5
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/README.md +33 -24
- package/build/bin/cli +1 -1
- package/build/metro-require/require.js +6 -4
- package/build/src/api/user/actions.js +25 -11
- package/build/src/api/user/actions.js.map +1 -1
- package/build/src/customize/templates.js +15 -1
- package/build/src/customize/templates.js.map +1 -1
- package/build/src/export/exportApp.js +26 -14
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportAsync.js +6 -0
- package/build/src/export/exportAsync.js.map +1 -1
- package/build/src/export/exportHermes.js +2 -2
- package/build/src/export/exportHermes.js.map +1 -1
- package/build/src/export/persistMetroAssets.js.map +1 -1
- package/build/src/install/checkPackages.js +22 -4
- package/build/src/install/checkPackages.js.map +1 -1
- package/build/src/install/index.js +3 -1
- package/build/src/install/index.js.map +1 -1
- package/build/src/install/resolveOptions.js +7 -2
- package/build/src/install/resolveOptions.js.map +1 -1
- package/build/src/install/utils/checkPackagesCompatibility.js +1 -1
- package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
- package/build/src/lint/ESlintPrerequisite.js +32 -48
- package/build/src/lint/ESlintPrerequisite.js.map +1 -1
- package/build/src/lint/index.js +45 -47
- package/build/src/lint/index.js.map +1 -1
- package/build/src/lint/lintAsync.js +150 -4
- package/build/src/lint/lintAsync.js.map +1 -1
- package/build/src/lint/resolveOptions.js +115 -0
- package/build/src/lint/resolveOptions.js.map +1 -0
- package/build/src/prebuild/renameTemplateAppName.js +4 -1
- package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
- package/build/src/prebuild/resolveTemplate.js +4 -4
- package/build/src/prebuild/resolveTemplate.js.map +1 -1
- package/build/src/prebuild/updatePackageJson.js +19 -9
- package/build/src/prebuild/updatePackageJson.js.map +1 -1
- package/build/src/run/android/resolveOptions.js +13 -1
- package/build/src/run/android/resolveOptions.js.map +1 -1
- package/build/src/run/android/runAndroidAsync.js +39 -17
- package/build/src/run/android/runAndroidAsync.js.map +1 -1
- package/build/src/run/ios/XcodeBuild.js +3 -3
- package/build/src/run/ios/XcodeBuild.js.map +1 -1
- package/build/src/run/ios/options/resolveOptions.js +13 -1
- package/build/src/run/ios/options/resolveOptions.js.map +1 -1
- package/build/src/run/ios/runIosAsync.js +38 -7
- package/build/src/run/ios/runIosAsync.js.map +1 -1
- package/build/src/start/doctor/SecurityBinPrerequisite.js +1 -1
- package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcodePrerequisite.js +1 -1
- package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +1 -1
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
- package/build/src/start/doctor/dependencies/resolvePackages.js +1 -1
- package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
- package/build/src/start/index.js +1 -1
- package/build/src/start/index.js.map +1 -1
- package/build/src/start/platforms/PlatformManager.js +1 -1
- package/build/src/start/platforms/PlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/AndroidPlatformManager.js +1 -1
- package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/getDevices.js +1 -1
- package/build/src/start/platforms/android/getDevices.js.map +1 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js +1 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
- package/build/src/start/platforms/ios/xcrun.js +1 -1
- package/build/src/start/platforms/ios/xcrun.js.map +1 -1
- package/build/src/start/project/dotExpo.js +5 -0
- package/build/src/start/project/dotExpo.js.map +1 -1
- package/build/src/start/resolveOptions.js +3 -0
- package/build/src/start/resolveOptions.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +38 -26
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +29 -2
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/createExpoFallbackResolver.js +6 -4
- package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
- package/build/src/start/server/metro/createJResolver.js +2 -2
- package/build/src/start/server/metro/createJResolver.js.map +1 -1
- package/build/src/start/server/metro/createServerComponentsMiddleware.js +16 -5
- package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -19
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
- package/build/src/start/server/metro/externals.js +1 -1
- package/build/src/start/server/metro/externals.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +13 -8
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +21 -2
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js +15 -12
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.js +19 -8
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/metro/runServer-fork.js +1 -1
- package/build/src/start/server/metro/runServer-fork.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +7 -12
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/middleware/CorsMiddleware.js +1 -1
- package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +4 -8
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/inspector/JsInspector.js +2 -25
- package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
- package/build/src/start/server/middleware/metroOptions.js +2 -26
- package/build/src/start/server/middleware/metroOptions.js.map +1 -1
- package/build/src/utils/build-cache-providers/helpers.js +61 -0
- package/build/src/utils/build-cache-providers/helpers.js.map +1 -0
- package/build/src/utils/build-cache-providers/index.js +283 -0
- package/build/src/utils/build-cache-providers/index.js.map +1 -0
- package/build/src/utils/codesigning.js +14 -2
- package/build/src/utils/codesigning.js.map +1 -1
- package/build/src/utils/exit.js +0 -1
- package/build/src/utils/exit.js.map +1 -1
- package/build/src/utils/ip.js +7 -104
- package/build/src/utils/ip.js.map +1 -1
- package/build/src/utils/modifyConfigAsync.js +1 -1
- package/build/src/utils/modifyConfigAsync.js.map +1 -1
- package/build/src/utils/resolveArgs.js +8 -0
- package/build/src/utils/resolveArgs.js.map +1 -1
- package/build/src/utils/scheme.js +1 -1
- package/build/src/utils/scheme.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +2 -2
- package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/build/src/utils/tsconfig/evaluateTsConfig.js +7 -2
- package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
- package/build/src/utils/variadic.js +63 -6
- package/build/src/utils/variadic.js.map +1 -1
- package/package.json +20 -20
- package/static/canary/react-is/cjs/react-is.development.js +118 -185
- package/static/canary/react-is/cjs/react-is.production.js +2 -2
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +16582 -26565
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +3495 -3357
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +3929 -3801
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16869 -27032
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3535 -3428
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4198 -4095
- package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +387 -684
- package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -9
- package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +137 -195
- package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -5
- package/static/canary/scheduler/cjs/scheduler.development.js +339 -600
- package/static/canary/scheduler/cjs/scheduler.native.development.js +324 -512
- package/static/canary/scheduler/cjs/scheduler.native.production.js +6 -5
- package/static/canary/scheduler/cjs/scheduler.production.js +16 -17
- package/static/canary-full/react/cjs/react-compiler-runtime.development.js +13 -68
- package/static/canary-full/react/cjs/react-jsx-dev-runtime.development.js +317 -1251
- package/static/canary-full/react/cjs/react-jsx-dev-runtime.react-server.development.js +353 -1286
- package/static/canary-full/react/cjs/react-jsx-runtime.development.js +326 -1279
- package/static/canary-full/react/cjs/react-jsx-runtime.react-server.development.js +353 -1286
- package/static/canary-full/react/cjs/react.development.js +1204 -2771
- package/static/canary-full/react/cjs/react.production.js +25 -20
- package/static/canary-full/react/cjs/react.react-server.development.js +783 -2162
- package/static/canary-full/react/cjs/react.react-server.production.js +13 -63
- package/static/canary-full/react/package.json +1 -1
- package/static/canary-full/react-dom/cjs/react-dom-client.development.js +24847 -37099
- package/static/canary-full/react-dom/cjs/react-dom-client.production.js +8261 -7475
- package/static/canary-full/react-dom/cjs/react-dom-profiling.development.js +25252 -37571
- package/static/canary-full/react-dom/cjs/react-dom-profiling.profiling.js +9442 -8662
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.development.js +8944 -11568
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.production.js +1378 -944
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.development.js +8944 -11568
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.production.js +1386 -954
- package/static/canary-full/react-dom/cjs/react-dom-server.browser.development.js +9344 -11600
- package/static/canary-full/react-dom/cjs/react-dom-server.browser.production.js +1545 -954
- package/static/canary-full/react-dom/cjs/react-dom-server.bun.development.js +8286 -11064
- package/static/canary-full/react-dom/cjs/react-dom-server.bun.production.js +1437 -976
- package/static/canary-full/react-dom/cjs/react-dom-server.edge.development.js +9356 -11609
- package/static/canary-full/react-dom/cjs/react-dom-server.edge.production.js +1542 -970
- package/static/canary-full/react-dom/cjs/react-dom-server.node.development.js +9227 -11571
- package/static/canary-full/react-dom/cjs/react-dom-server.node.production.js +1787 -1183
- package/static/canary-full/react-dom/cjs/react-dom-test-utils.development.js +13 -59
- package/static/canary-full/react-dom/cjs/react-dom.development.js +402 -604
- package/static/canary-full/react-dom/cjs/react-dom.production.js +4 -3
- package/static/canary-full/react-dom/cjs/react-dom.react-server.development.js +322 -382
- package/static/canary-full/react-dom/cjs/react-dom.react-server.production.js +6 -7
- package/static/canary-full/react-dom/package.json +5 -5
- package/static/canary-full/react-dom/static.browser.js +1 -0
- package/static/canary-full/react-dom/static.edge.js +1 -0
- package/static/canary-full/react-dom/static.node.js +1 -0
- package/static/template/eslint.config.js +10 -0
|
@@ -78,6 +78,7 @@ var taskQueue = [],
|
|
|
78
78
|
isPerformingWork = !1,
|
|
79
79
|
isHostCallbackScheduled = !1,
|
|
80
80
|
isHostTimeoutScheduled = !1,
|
|
81
|
+
needsPaint = !1,
|
|
81
82
|
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
|
|
82
83
|
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
|
|
83
84
|
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
|
|
@@ -168,10 +169,13 @@ var isMessageLoopRunning = !1,
|
|
|
168
169
|
taskTimeoutID = -1,
|
|
169
170
|
startTime = -1;
|
|
170
171
|
function shouldYieldToHost() {
|
|
171
|
-
return 5 > getCurrentTime() - startTime ? !1 : !0;
|
|
172
|
+
return needsPaint ? !0 : 5 > getCurrentTime() - startTime ? !1 : !0;
|
|
173
|
+
}
|
|
174
|
+
function requestPaint() {
|
|
175
|
+
needsPaint = !0;
|
|
172
176
|
}
|
|
173
|
-
function requestPaint() {}
|
|
174
177
|
function performWorkUntilDeadline() {
|
|
178
|
+
needsPaint = !1;
|
|
175
179
|
if (isMessageLoopRunning) {
|
|
176
180
|
var currentTime = getCurrentTime();
|
|
177
181
|
startTime = currentTime;
|
|
@@ -315,13 +319,10 @@ exports.unstable_NormalPriority = unstable_NormalPriority;
|
|
|
315
319
|
exports.unstable_Profiling = null;
|
|
316
320
|
exports.unstable_UserBlockingPriority = unstable_UserBlockingPriority;
|
|
317
321
|
exports.unstable_cancelCallback = unstable_cancelCallback;
|
|
318
|
-
exports.unstable_continueExecution = throwNotImplemented;
|
|
319
322
|
exports.unstable_forceFrameRate = throwNotImplemented;
|
|
320
323
|
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
|
|
321
|
-
exports.unstable_getFirstCallbackNode = throwNotImplemented;
|
|
322
324
|
exports.unstable_next = throwNotImplemented;
|
|
323
325
|
exports.unstable_now = unstable_now;
|
|
324
|
-
exports.unstable_pauseExecution = throwNotImplemented;
|
|
325
326
|
exports.unstable_requestPaint = unstable_requestPaint;
|
|
326
327
|
exports.unstable_runWithPriority = throwNotImplemented;
|
|
327
328
|
exports.unstable_scheduleCallback = unstable_scheduleCallback;
|
|
@@ -78,6 +78,7 @@ var taskQueue = [],
|
|
|
78
78
|
isPerformingWork = !1,
|
|
79
79
|
isHostCallbackScheduled = !1,
|
|
80
80
|
isHostTimeoutScheduled = !1,
|
|
81
|
+
needsPaint = !1,
|
|
81
82
|
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
|
|
82
83
|
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
|
|
83
84
|
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
|
|
@@ -97,7 +98,9 @@ function handleTimeout(currentTime) {
|
|
|
97
98
|
advanceTimers(currentTime);
|
|
98
99
|
if (!isHostCallbackScheduled)
|
|
99
100
|
if (null !== peek(taskQueue))
|
|
100
|
-
(isHostCallbackScheduled = !0),
|
|
101
|
+
(isHostCallbackScheduled = !0),
|
|
102
|
+
isMessageLoopRunning ||
|
|
103
|
+
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
|
|
101
104
|
else {
|
|
102
105
|
var firstTimer = peek(timerQueue);
|
|
103
106
|
null !== firstTimer &&
|
|
@@ -109,9 +112,14 @@ var isMessageLoopRunning = !1,
|
|
|
109
112
|
frameInterval = 5,
|
|
110
113
|
startTime = -1;
|
|
111
114
|
function shouldYieldToHost() {
|
|
112
|
-
return
|
|
115
|
+
return needsPaint
|
|
116
|
+
? !0
|
|
117
|
+
: exports.unstable_now() - startTime < frameInterval
|
|
118
|
+
? !1
|
|
119
|
+
: !0;
|
|
113
120
|
}
|
|
114
121
|
function performWorkUntilDeadline() {
|
|
122
|
+
needsPaint = !1;
|
|
115
123
|
if (isMessageLoopRunning) {
|
|
116
124
|
var currentTime = exports.unstable_now();
|
|
117
125
|
startTime = currentTime;
|
|
@@ -197,10 +205,6 @@ else if ("undefined" !== typeof MessageChannel) {
|
|
|
197
205
|
schedulePerformWorkUntilDeadline = function () {
|
|
198
206
|
localSetTimeout(performWorkUntilDeadline, 0);
|
|
199
207
|
};
|
|
200
|
-
function requestHostCallback() {
|
|
201
|
-
isMessageLoopRunning ||
|
|
202
|
-
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
|
|
203
|
-
}
|
|
204
208
|
function requestHostTimeout(callback, ms) {
|
|
205
209
|
taskTimeoutID = localSetTimeout(function () {
|
|
206
210
|
callback(exports.unstable_now());
|
|
@@ -215,11 +219,6 @@ exports.unstable_UserBlockingPriority = 2;
|
|
|
215
219
|
exports.unstable_cancelCallback = function (task) {
|
|
216
220
|
task.callback = null;
|
|
217
221
|
};
|
|
218
|
-
exports.unstable_continueExecution = function () {
|
|
219
|
-
isHostCallbackScheduled ||
|
|
220
|
-
isPerformingWork ||
|
|
221
|
-
((isHostCallbackScheduled = !0), requestHostCallback());
|
|
222
|
-
};
|
|
223
222
|
exports.unstable_forceFrameRate = function (fps) {
|
|
224
223
|
0 > fps || 125 < fps
|
|
225
224
|
? console.error(
|
|
@@ -230,9 +229,6 @@ exports.unstable_forceFrameRate = function (fps) {
|
|
|
230
229
|
exports.unstable_getCurrentPriorityLevel = function () {
|
|
231
230
|
return currentPriorityLevel;
|
|
232
231
|
};
|
|
233
|
-
exports.unstable_getFirstCallbackNode = function () {
|
|
234
|
-
return peek(taskQueue);
|
|
235
|
-
};
|
|
236
232
|
exports.unstable_next = function (eventHandler) {
|
|
237
233
|
switch (currentPriorityLevel) {
|
|
238
234
|
case 1:
|
|
@@ -251,8 +247,9 @@ exports.unstable_next = function (eventHandler) {
|
|
|
251
247
|
currentPriorityLevel = previousPriorityLevel;
|
|
252
248
|
}
|
|
253
249
|
};
|
|
254
|
-
exports.
|
|
255
|
-
|
|
250
|
+
exports.unstable_requestPaint = function () {
|
|
251
|
+
needsPaint = !0;
|
|
252
|
+
};
|
|
256
253
|
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
|
|
257
254
|
switch (priorityLevel) {
|
|
258
255
|
case 1:
|
|
@@ -323,7 +320,9 @@ exports.unstable_scheduleCallback = function (
|
|
|
323
320
|
push(taskQueue, priorityLevel),
|
|
324
321
|
isHostCallbackScheduled ||
|
|
325
322
|
isPerformingWork ||
|
|
326
|
-
((isHostCallbackScheduled = !0),
|
|
323
|
+
((isHostCallbackScheduled = !0),
|
|
324
|
+
isMessageLoopRunning ||
|
|
325
|
+
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));
|
|
327
326
|
return priorityLevel;
|
|
328
327
|
};
|
|
329
328
|
exports.unstable_shouldYield = shouldYieldToHost;
|
|
@@ -8,72 +8,17 @@
|
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
25
|
-
args[_key2 - 1] = arguments[_key2];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
printWarning('error', format, args);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function printWarning(level, format, args) {
|
|
34
|
-
// When changing this logic, you might want to also
|
|
35
|
-
// update consoleWithStackDev.www.js as well.
|
|
36
|
-
{
|
|
37
|
-
var stack = ReactSharedInternals.getStackAddendum();
|
|
38
|
-
|
|
39
|
-
if (stack !== '') {
|
|
40
|
-
format += '%s';
|
|
41
|
-
args = args.concat([stack]);
|
|
42
|
-
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var argsWithFormat = args.map(function (item) {
|
|
46
|
-
return String(item);
|
|
47
|
-
}); // Careful: RN currently depends on this prefix
|
|
48
|
-
|
|
49
|
-
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
50
|
-
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
51
|
-
// eslint-disable-next-line react-internal/no-production-logging
|
|
52
|
-
|
|
53
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function resolveDispatcher() {
|
|
58
|
-
var dispatcher = ReactSharedInternals.H;
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
if (dispatcher === null) {
|
|
62
|
-
error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');
|
|
63
|
-
}
|
|
64
|
-
} // Will result in a null access error if accessed outside render phase. We
|
|
65
|
-
// intentionally don't throw our own error because this is in a hot path.
|
|
66
|
-
// Also helps ensure this is inlined.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return dispatcher;
|
|
70
|
-
}
|
|
71
|
-
function useMemoCache(size) {
|
|
72
|
-
var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional
|
|
73
|
-
|
|
74
|
-
return dispatcher.useMemoCache(size);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
exports.c = useMemoCache;
|
|
11
|
+
"use strict";
|
|
12
|
+
"production" !== process.env.NODE_ENV &&
|
|
13
|
+
(function () {
|
|
14
|
+
var ReactSharedInternals =
|
|
15
|
+
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
16
|
+
exports.c = function (size) {
|
|
17
|
+
var dispatcher = ReactSharedInternals.H;
|
|
18
|
+
null === dispatcher &&
|
|
19
|
+
console.error(
|
|
20
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
21
|
+
);
|
|
22
|
+
return dispatcher.useMemoCache(size);
|
|
23
|
+
};
|
|
78
24
|
})();
|
|
79
|
-
}
|