@expo/cli 0.18.7 → 0.18.9

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.
Files changed (25) hide show
  1. package/build/bin/cli +1 -1
  2. package/build/src/login/index.js +1 -2
  3. package/build/src/login/index.js.map +1 -1
  4. package/build/src/run/android/resolveGradlePropsAsync.js +9 -1
  5. package/build/src/run/android/resolveGradlePropsAsync.js.map +1 -1
  6. package/build/src/start/platforms/android/adb.js +2 -0
  7. package/build/src/start/platforms/android/adb.js.map +1 -1
  8. package/build/src/utils/telemetry/getContext.js +1 -1
  9. package/package.json +3 -3
  10. package/static/canary/react-is/cjs/react-is.development.js +200 -0
  11. package/static/canary/react-is/cjs/react-is.production.js +130 -0
  12. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +22899 -24003
  13. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +5190 -4270
  14. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +5206 -4094
  15. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +23165 -24313
  16. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5298 -4377
  17. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11347 -0
  18. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +711 -0
  19. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +415 -0
  20. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +208 -0
  21. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +145 -0
  22. package/static/canary/scheduler/cjs/scheduler.development.js +625 -0
  23. package/static/canary/scheduler/cjs/scheduler.native.development.js +538 -0
  24. package/static/canary/scheduler/cjs/scheduler.native.production.js +329 -0
  25. package/static/canary/scheduler/cjs/scheduler.production.js +341 -0
@@ -0,0 +1,538 @@
1
+ /**
2
+ * @license React
3
+ * scheduler.native.development.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ if (process.env.NODE_ENV !== "production") {
14
+ (function() {
15
+ 'use strict';
16
+
17
+ var enableSchedulerDebugging = false;
18
+ var enableProfiling = false;
19
+ var frameYieldMs = 5;
20
+ var userBlockingPriorityTimeout = 250;
21
+ var normalPriorityTimeout = 5000;
22
+ var lowPriorityTimeout = 10000;
23
+
24
+ function push(heap, node) {
25
+ var index = heap.length;
26
+ heap.push(node);
27
+ siftUp(heap, node, index);
28
+ }
29
+ function peek(heap) {
30
+ return heap.length === 0 ? null : heap[0];
31
+ }
32
+ function pop(heap) {
33
+ if (heap.length === 0) {
34
+ return null;
35
+ }
36
+
37
+ var first = heap[0];
38
+ var last = heap.pop();
39
+
40
+ if (last !== first) {
41
+ heap[0] = last;
42
+ siftDown(heap, last, 0);
43
+ }
44
+
45
+ return first;
46
+ }
47
+
48
+ function siftUp(heap, node, i) {
49
+ var index = i;
50
+
51
+ while (index > 0) {
52
+ var parentIndex = index - 1 >>> 1;
53
+ var parent = heap[parentIndex];
54
+
55
+ if (compare(parent, node) > 0) {
56
+ // The parent is larger. Swap positions.
57
+ heap[parentIndex] = node;
58
+ heap[index] = parent;
59
+ index = parentIndex;
60
+ } else {
61
+ // The parent is smaller. Exit.
62
+ return;
63
+ }
64
+ }
65
+ }
66
+
67
+ function siftDown(heap, node, i) {
68
+ var index = i;
69
+ var length = heap.length;
70
+ var halfLength = length >>> 1;
71
+
72
+ while (index < halfLength) {
73
+ var leftIndex = (index + 1) * 2 - 1;
74
+ var left = heap[leftIndex];
75
+ var rightIndex = leftIndex + 1;
76
+ var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
77
+
78
+ if (compare(left, node) < 0) {
79
+ if (rightIndex < length && compare(right, left) < 0) {
80
+ heap[index] = right;
81
+ heap[rightIndex] = node;
82
+ index = rightIndex;
83
+ } else {
84
+ heap[index] = left;
85
+ heap[leftIndex] = node;
86
+ index = leftIndex;
87
+ }
88
+ } else if (rightIndex < length && compare(right, node) < 0) {
89
+ heap[index] = right;
90
+ heap[rightIndex] = node;
91
+ index = rightIndex;
92
+ } else {
93
+ // Neither child is smaller. Exit.
94
+ return;
95
+ }
96
+ }
97
+ }
98
+
99
+ function compare(a, b) {
100
+ // Compare sort index first, then task id.
101
+ var diff = a.sortIndex - b.sortIndex;
102
+ return diff !== 0 ? diff : a.id - b.id;
103
+ }
104
+
105
+ // TODO: Use symbols?
106
+ var ImmediatePriority = 1;
107
+ var UserBlockingPriority = 2;
108
+ var NormalPriority = 3;
109
+ var LowPriority = 4;
110
+ var IdlePriority = 5;
111
+
112
+ function markTaskErrored(task, ms) {
113
+ }
114
+
115
+ /* eslint-disable no-var */
116
+ var getCurrentTime;
117
+ var hasPerformanceNow = // $FlowFixMe[method-unbinding]
118
+ typeof performance === 'object' && typeof performance.now === 'function';
119
+
120
+ if (hasPerformanceNow) {
121
+ var localPerformance = performance;
122
+
123
+ getCurrentTime = function () {
124
+ return localPerformance.now();
125
+ };
126
+ } else {
127
+ var localDate = Date;
128
+ var initialTime = localDate.now();
129
+
130
+ getCurrentTime = function () {
131
+ return localDate.now() - initialTime;
132
+ };
133
+ } // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
134
+ // Math.pow(2, 30) - 1
135
+ // 0b111111111111111111111111111111
136
+
137
+
138
+ var maxSigned31BitInt = 1073741823; // Tasks are stored on a min heap
139
+
140
+ var taskQueue = [];
141
+ var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
142
+
143
+ var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
144
+ var currentTask = null;
145
+ var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.
146
+
147
+ var isPerformingWork = false;
148
+ var isHostCallbackScheduled = false;
149
+ var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.
150
+
151
+ var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;
152
+ var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;
153
+ var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom
154
+
155
+ function advanceTimers(currentTime) {
156
+ // Check for tasks that are no longer delayed and add them to the queue.
157
+ var timer = peek(timerQueue);
158
+
159
+ while (timer !== null) {
160
+ if (timer.callback === null) {
161
+ // Timer was cancelled.
162
+ pop(timerQueue);
163
+ } else if (timer.startTime <= currentTime) {
164
+ // Timer fired. Transfer to the task queue.
165
+ pop(timerQueue);
166
+ timer.sortIndex = timer.expirationTime;
167
+ push(taskQueue, timer);
168
+ } else {
169
+ // Remaining timers are pending.
170
+ return;
171
+ }
172
+
173
+ timer = peek(timerQueue);
174
+ }
175
+ }
176
+
177
+ function handleTimeout(currentTime) {
178
+ isHostTimeoutScheduled = false;
179
+ advanceTimers(currentTime);
180
+
181
+ if (!isHostCallbackScheduled) {
182
+ if (peek(taskQueue) !== null) {
183
+ isHostCallbackScheduled = true;
184
+ requestHostCallback();
185
+ } else {
186
+ var firstTimer = peek(timerQueue);
187
+
188
+ if (firstTimer !== null) {
189
+ requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
190
+ }
191
+ }
192
+ }
193
+ }
194
+
195
+ function flushWork(initialTime) {
196
+
197
+
198
+ isHostCallbackScheduled = false;
199
+
200
+ if (isHostTimeoutScheduled) {
201
+ // We scheduled a timeout but it's no longer needed. Cancel it.
202
+ isHostTimeoutScheduled = false;
203
+ cancelHostTimeout();
204
+ }
205
+
206
+ isPerformingWork = true;
207
+ var previousPriorityLevel = currentPriorityLevel;
208
+
209
+ try {
210
+ var currentTime; if (enableProfiling) ; else {
211
+ // No catch in prod code path.
212
+ return workLoop(initialTime);
213
+ }
214
+ } finally {
215
+ currentTask = null;
216
+ currentPriorityLevel = previousPriorityLevel;
217
+ isPerformingWork = false;
218
+ }
219
+ }
220
+
221
+ function workLoop(initialTime) {
222
+ var currentTime = initialTime;
223
+ advanceTimers(currentTime);
224
+ currentTask = peek(taskQueue);
225
+
226
+ while (currentTask !== null && !(enableSchedulerDebugging )) {
227
+ if (currentTask.expirationTime > currentTime && shouldYieldToHost()) {
228
+ // This currentTask hasn't expired, and we've reached the deadline.
229
+ break;
230
+ } // $FlowFixMe[incompatible-use] found when upgrading Flow
231
+
232
+
233
+ var callback = currentTask.callback;
234
+
235
+ if (typeof callback === 'function') {
236
+ // $FlowFixMe[incompatible-use] found when upgrading Flow
237
+ currentTask.callback = null; // $FlowFixMe[incompatible-use] found when upgrading Flow
238
+
239
+ currentPriorityLevel = currentTask.priorityLevel; // $FlowFixMe[incompatible-use] found when upgrading Flow
240
+
241
+ var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
242
+
243
+ var continuationCallback = callback(didUserCallbackTimeout);
244
+ currentTime = getCurrentTime();
245
+
246
+ if (typeof continuationCallback === 'function') {
247
+ // If a continuation is returned, immediately yield to the main thread
248
+ // regardless of how much time is left in the current time slice.
249
+ // $FlowFixMe[incompatible-use] found when upgrading Flow
250
+ currentTask.callback = continuationCallback;
251
+
252
+ advanceTimers(currentTime);
253
+ return true;
254
+ } else {
255
+
256
+ if (currentTask === peek(taskQueue)) {
257
+ pop(taskQueue);
258
+ }
259
+
260
+ advanceTimers(currentTime);
261
+ }
262
+ } else {
263
+ pop(taskQueue);
264
+ }
265
+
266
+ currentTask = peek(taskQueue);
267
+ } // Return whether there's additional work
268
+
269
+
270
+ if (currentTask !== null) {
271
+ return true;
272
+ } else {
273
+ var firstTimer = peek(timerQueue);
274
+
275
+ if (firstTimer !== null) {
276
+ requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
277
+ }
278
+
279
+ return false;
280
+ }
281
+ }
282
+
283
+ function unstable_scheduleCallback$1(priorityLevel, callback, options) {
284
+ var currentTime = getCurrentTime();
285
+ var startTime;
286
+
287
+ if (typeof options === 'object' && options !== null) {
288
+ var delay = options.delay;
289
+
290
+ if (typeof delay === 'number' && delay > 0) {
291
+ startTime = currentTime + delay;
292
+ } else {
293
+ startTime = currentTime;
294
+ }
295
+ } else {
296
+ startTime = currentTime;
297
+ }
298
+
299
+ var timeout;
300
+
301
+ switch (priorityLevel) {
302
+ case ImmediatePriority:
303
+ // Times out immediately
304
+ timeout = -1;
305
+ break;
306
+
307
+ case UserBlockingPriority:
308
+ // Eventually times out
309
+ timeout = userBlockingPriorityTimeout;
310
+ break;
311
+
312
+ case IdlePriority:
313
+ // Never times out
314
+ timeout = maxSigned31BitInt;
315
+ break;
316
+
317
+ case LowPriority:
318
+ // Eventually times out
319
+ timeout = lowPriorityTimeout;
320
+ break;
321
+
322
+ case NormalPriority:
323
+ default:
324
+ // Eventually times out
325
+ timeout = normalPriorityTimeout;
326
+ break;
327
+ }
328
+
329
+ var expirationTime = startTime + timeout;
330
+ var newTask = {
331
+ id: taskIdCounter++,
332
+ callback: callback,
333
+ priorityLevel: priorityLevel,
334
+ startTime: startTime,
335
+ expirationTime: expirationTime,
336
+ sortIndex: -1
337
+ };
338
+
339
+ if (startTime > currentTime) {
340
+ // This is a delayed task.
341
+ newTask.sortIndex = startTime;
342
+ push(timerQueue, newTask);
343
+
344
+ if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
345
+ // All tasks are delayed, and this is the task with the earliest delay.
346
+ if (isHostTimeoutScheduled) {
347
+ // Cancel an existing timeout.
348
+ cancelHostTimeout();
349
+ } else {
350
+ isHostTimeoutScheduled = true;
351
+ } // Schedule a timeout.
352
+
353
+
354
+ requestHostTimeout(handleTimeout, startTime - currentTime);
355
+ }
356
+ } else {
357
+ newTask.sortIndex = expirationTime;
358
+ push(taskQueue, newTask);
359
+ // wait until the next time we yield.
360
+
361
+
362
+ if (!isHostCallbackScheduled && !isPerformingWork) {
363
+ isHostCallbackScheduled = true;
364
+ requestHostCallback();
365
+ }
366
+ }
367
+
368
+ return newTask;
369
+ }
370
+
371
+ function unstable_cancelCallback$1(task) {
372
+ // remove from the queue because you can't remove arbitrary nodes from an
373
+ // array based heap, only the first one.)
374
+
375
+
376
+ task.callback = null;
377
+ }
378
+
379
+ function unstable_getCurrentPriorityLevel$1() {
380
+ return currentPriorityLevel;
381
+ }
382
+
383
+ var isMessageLoopRunning = false;
384
+ var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
385
+ // thread, like user events. By default, it yields multiple times per frame.
386
+ // It does not attempt to align with frame boundaries, since most tasks don't
387
+ // need to be frame aligned; for those that do, use requestAnimationFrame.
388
+
389
+ var frameInterval = frameYieldMs;
390
+ var startTime = -1;
391
+
392
+ function shouldYieldToHost() {
393
+ var timeElapsed = getCurrentTime() - startTime;
394
+
395
+ if (timeElapsed < frameInterval) {
396
+ // The main thread has only been blocked for a really short amount of time;
397
+ // smaller than a single frame. Don't yield yet.
398
+ return false;
399
+ } // Yield now.
400
+
401
+
402
+ return true;
403
+ }
404
+
405
+ function requestPaint() {}
406
+
407
+ var performWorkUntilDeadline = function () {
408
+ if (isMessageLoopRunning) {
409
+ var currentTime = getCurrentTime(); // Keep track of the start time so we can measure how long the main thread
410
+ // has been blocked.
411
+
412
+ startTime = currentTime; // If a scheduler task throws, exit the current browser task so the
413
+ // error can be observed.
414
+ //
415
+ // Intentionally not using a try-catch, since that makes some debugging
416
+ // techniques harder. Instead, if `flushWork` errors, then `hasMoreWork` will
417
+ // remain true, and we'll continue the work loop.
418
+
419
+ var hasMoreWork = true;
420
+
421
+ try {
422
+ hasMoreWork = flushWork(currentTime);
423
+ } finally {
424
+ if (hasMoreWork) {
425
+ // If there's more work, schedule the next message event at the end
426
+ // of the preceding one.
427
+ schedulePerformWorkUntilDeadline();
428
+ } else {
429
+ isMessageLoopRunning = false;
430
+ }
431
+ }
432
+ }
433
+ };
434
+
435
+ var schedulePerformWorkUntilDeadline;
436
+
437
+ if (typeof localSetImmediate === 'function') {
438
+ // Node.js and old IE.
439
+ // There's a few reasons for why we prefer setImmediate.
440
+ //
441
+ // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.
442
+ // (Even though this is a DOM fork of the Scheduler, you could get here
443
+ // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)
444
+ // https://github.com/facebook/react/issues/20756
445
+ //
446
+ // But also, it runs earlier which is the semantic we want.
447
+ // If other browsers ever implement it, it's better to use it.
448
+ // Although both of these would be inferior to native scheduling.
449
+ schedulePerformWorkUntilDeadline = function () {
450
+ localSetImmediate(performWorkUntilDeadline);
451
+ };
452
+ } else if (typeof MessageChannel !== 'undefined') {
453
+ // DOM and Worker environments.
454
+ // We prefer MessageChannel because of the 4ms setTimeout clamping.
455
+ var channel = new MessageChannel();
456
+ var port = channel.port2;
457
+ channel.port1.onmessage = performWorkUntilDeadline;
458
+
459
+ schedulePerformWorkUntilDeadline = function () {
460
+ port.postMessage(null);
461
+ };
462
+ } else {
463
+ // We should only fallback here in non-browser environments.
464
+ schedulePerformWorkUntilDeadline = function () {
465
+ // $FlowFixMe[not-a-function] nullable value
466
+ localSetTimeout(performWorkUntilDeadline, 0);
467
+ };
468
+ }
469
+
470
+ function requestHostCallback() {
471
+ if (!isMessageLoopRunning) {
472
+ isMessageLoopRunning = true;
473
+ schedulePerformWorkUntilDeadline();
474
+ }
475
+ }
476
+
477
+ function requestHostTimeout(callback, ms) {
478
+ // $FlowFixMe[not-a-function] nullable value
479
+ taskTimeoutID = localSetTimeout(function () {
480
+ callback(getCurrentTime());
481
+ }, ms);
482
+ }
483
+
484
+ function cancelHostTimeout() {
485
+ // $FlowFixMe[not-a-function] nullable value
486
+ localClearTimeout(taskTimeoutID);
487
+ taskTimeoutID = -1;
488
+ }
489
+
490
+ // https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp
491
+
492
+ var unstable_UserBlockingPriority = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_UserBlockingPriority : UserBlockingPriority;
493
+ var unstable_NormalPriority = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_NormalPriority : NormalPriority;
494
+ var unstable_IdlePriority = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_IdlePriority : IdlePriority;
495
+ var unstable_LowPriority = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_LowPriority : LowPriority;
496
+ var unstable_ImmediatePriority = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_ImmediatePriority : ImmediatePriority;
497
+ var unstable_scheduleCallback = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_scheduleCallback : unstable_scheduleCallback$1;
498
+ var unstable_cancelCallback = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_cancelCallback : unstable_cancelCallback$1;
499
+ var unstable_getCurrentPriorityLevel = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_getCurrentPriorityLevel : unstable_getCurrentPriorityLevel$1;
500
+ var unstable_shouldYield = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_shouldYield : shouldYieldToHost;
501
+ var unstable_requestPaint = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_requestPaint : requestPaint;
502
+ var unstable_now = typeof nativeRuntimeScheduler !== 'undefined' ? nativeRuntimeScheduler.unstable_now : getCurrentTime; // These were never implemented on the native scheduler because React never calls them.
503
+ // For consistency, let's disable them altogether and make them throw.
504
+
505
+ var unstable_next = throwNotImplemented;
506
+ var unstable_runWithPriority = throwNotImplemented;
507
+ var unstable_wrapCallback = throwNotImplemented;
508
+ var unstable_continueExecution = throwNotImplemented;
509
+ var unstable_pauseExecution = throwNotImplemented;
510
+ var unstable_getFirstCallbackNode = throwNotImplemented;
511
+ var unstable_forceFrameRate = throwNotImplemented;
512
+ var unstable_Profiling = null;
513
+
514
+ function throwNotImplemented() {
515
+ throw Error('Not implemented.');
516
+ } // Flow magic to verify the exports of this file match the original version.
517
+
518
+ exports.unstable_IdlePriority = unstable_IdlePriority;
519
+ exports.unstable_ImmediatePriority = unstable_ImmediatePriority;
520
+ exports.unstable_LowPriority = unstable_LowPriority;
521
+ exports.unstable_NormalPriority = unstable_NormalPriority;
522
+ exports.unstable_Profiling = unstable_Profiling;
523
+ exports.unstable_UserBlockingPriority = unstable_UserBlockingPriority;
524
+ exports.unstable_cancelCallback = unstable_cancelCallback;
525
+ exports.unstable_continueExecution = unstable_continueExecution;
526
+ exports.unstable_forceFrameRate = unstable_forceFrameRate;
527
+ exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
528
+ exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
529
+ exports.unstable_next = unstable_next;
530
+ exports.unstable_now = unstable_now;
531
+ exports.unstable_pauseExecution = unstable_pauseExecution;
532
+ exports.unstable_requestPaint = unstable_requestPaint;
533
+ exports.unstable_runWithPriority = unstable_runWithPriority;
534
+ exports.unstable_scheduleCallback = unstable_scheduleCallback;
535
+ exports.unstable_shouldYield = unstable_shouldYield;
536
+ exports.unstable_wrapCallback = unstable_wrapCallback;
537
+ })();
538
+ }