scheduler 0.16.2 → 0.17.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.
package/build-info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "branch": "pull/17007",
3
- "buildNumber": "50178",
4
- "checksum": "39106c3",
5
- "commit": "4ab6305f6",
2
+ "branch": "master",
3
+ "buildNumber": "54423",
4
+ "checksum": "3b849cc",
5
+ "commit": "5faf377df",
6
6
  "environment": "ci",
7
- "reactVersion": "16.10.1-canary-4ab6305f6"
7
+ "reactVersion": "16.10.2-5faf377df"
8
8
  }
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler-tracing.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -33,9 +33,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
33
33
 
34
34
  // Trace which interactions trigger each commit.
35
35
 
36
- var enableSchedulerTracing = true; // Only used in www builds.
36
+ var enableSchedulerTracing = true; // SSR experiments
37
37
 
38
- // TODO: true? Here it might just be false.
39
38
 
40
39
  // Only used in www builds.
41
40
 
@@ -50,9 +49,6 @@ var enableSchedulerTracing = true; // Only used in www builds.
50
49
  // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
51
50
 
52
51
 
53
- // See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
54
- // This is a flag so we can fix warnings in RN core before turning it on
55
-
56
52
  // Experimental React Flare event system and event components support.
57
53
 
58
54
  // Experimental Host Component support.
@@ -67,10 +63,6 @@ var enableSchedulerTracing = true; // Only used in www builds.
67
63
  // For tests, we flush suspense fallbacks in an act scope;
68
64
  // *except* in some of our own tests, where we test incremental loading states.
69
65
 
70
- // Changes priority of some events like mousemove to user-blocking priority,
71
- // but without making them discrete. The flag exists in case it causes
72
- // starvation problems.
73
-
74
66
  // Add a callback property to suspense to notify which promises are currently
75
67
  // in the update queue. This allows reporting and tracing of what is causing
76
68
  // the user to see a loading state.
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler-tracing.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler-tracing.profiling.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler-unstable_mock.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -374,47 +374,50 @@ function stopLoggingProfilingEvents() {
374
374
  eventLogIndex = 0;
375
375
  return buffer;
376
376
  }
377
- function markTaskStart(task, time) {
377
+ function markTaskStart(task, ms) {
378
378
  if (enableProfiling) {
379
379
  profilingState[QUEUE_SIZE]++;
380
380
 
381
381
  if (eventLog !== null) {
382
- logEvent([TaskStartEvent, time, task.id, task.priorityLevel]);
382
+ // performance.now returns a float, representing milliseconds. When the
383
+ // event is logged, it's coerced to an int. Convert to microseconds to
384
+ // maintain extra degrees of precision.
385
+ logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);
383
386
  }
384
387
  }
385
388
  }
386
- function markTaskCompleted(task, time) {
389
+ function markTaskCompleted(task, ms) {
387
390
  if (enableProfiling) {
388
391
  profilingState[PRIORITY] = NoPriority;
389
392
  profilingState[CURRENT_TASK_ID] = 0;
390
393
  profilingState[QUEUE_SIZE]--;
391
394
 
392
395
  if (eventLog !== null) {
393
- logEvent([TaskCompleteEvent, time, task.id]);
396
+ logEvent([TaskCompleteEvent, ms * 1000, task.id]);
394
397
  }
395
398
  }
396
399
  }
397
- function markTaskCanceled(task, time) {
400
+ function markTaskCanceled(task, ms) {
398
401
  if (enableProfiling) {
399
402
  profilingState[QUEUE_SIZE]--;
400
403
 
401
404
  if (eventLog !== null) {
402
- logEvent([TaskCancelEvent, time, task.id]);
405
+ logEvent([TaskCancelEvent, ms * 1000, task.id]);
403
406
  }
404
407
  }
405
408
  }
406
- function markTaskErrored(task, time) {
409
+ function markTaskErrored(task, ms) {
407
410
  if (enableProfiling) {
408
411
  profilingState[PRIORITY] = NoPriority;
409
412
  profilingState[CURRENT_TASK_ID] = 0;
410
413
  profilingState[QUEUE_SIZE]--;
411
414
 
412
415
  if (eventLog !== null) {
413
- logEvent([TaskErrorEvent, time, task.id]);
416
+ logEvent([TaskErrorEvent, ms * 1000, task.id]);
414
417
  }
415
418
  }
416
419
  }
417
- function markTaskRun(task, time) {
420
+ function markTaskRun(task, ms) {
418
421
  if (enableProfiling) {
419
422
  runIdCounter++;
420
423
  profilingState[PRIORITY] = task.priorityLevel;
@@ -422,34 +425,34 @@ function markTaskRun(task, time) {
422
425
  profilingState[CURRENT_RUN_ID] = runIdCounter;
423
426
 
424
427
  if (eventLog !== null) {
425
- logEvent([TaskRunEvent, time, task.id, runIdCounter]);
428
+ logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);
426
429
  }
427
430
  }
428
431
  }
429
- function markTaskYield(task, time) {
432
+ function markTaskYield(task, ms) {
430
433
  if (enableProfiling) {
431
434
  profilingState[PRIORITY] = NoPriority;
432
435
  profilingState[CURRENT_TASK_ID] = 0;
433
436
  profilingState[CURRENT_RUN_ID] = 0;
434
437
 
435
438
  if (eventLog !== null) {
436
- logEvent([TaskYieldEvent, time, task.id, runIdCounter]);
439
+ logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);
437
440
  }
438
441
  }
439
442
  }
440
- function markSchedulerSuspended(time) {
443
+ function markSchedulerSuspended(ms) {
441
444
  if (enableProfiling) {
442
445
  mainThreadIdCounter++;
443
446
 
444
447
  if (eventLog !== null) {
445
- logEvent([SchedulerSuspendEvent, time, mainThreadIdCounter]);
448
+ logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);
446
449
  }
447
450
  }
448
451
  }
449
- function markSchedulerUnsuspended(time) {
452
+ function markSchedulerUnsuspended(ms) {
450
453
  if (enableProfiling) {
451
454
  if (eventLog !== null) {
452
- logEvent([SchedulerResumeEvent, time, mainThreadIdCounter]);
455
+ logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);
453
456
  }
454
457
  }
455
458
  }
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler-unstable_mock.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -539,47 +539,50 @@ function stopLoggingProfilingEvents() {
539
539
  eventLogIndex = 0;
540
540
  return buffer;
541
541
  }
542
- function markTaskStart(task, time) {
542
+ function markTaskStart(task, ms) {
543
543
  if (enableProfiling) {
544
544
  profilingState[QUEUE_SIZE]++;
545
545
 
546
546
  if (eventLog !== null) {
547
- logEvent([TaskStartEvent, time, task.id, task.priorityLevel]);
547
+ // performance.now returns a float, representing milliseconds. When the
548
+ // event is logged, it's coerced to an int. Convert to microseconds to
549
+ // maintain extra degrees of precision.
550
+ logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);
548
551
  }
549
552
  }
550
553
  }
551
- function markTaskCompleted(task, time) {
554
+ function markTaskCompleted(task, ms) {
552
555
  if (enableProfiling) {
553
556
  profilingState[PRIORITY] = NoPriority;
554
557
  profilingState[CURRENT_TASK_ID] = 0;
555
558
  profilingState[QUEUE_SIZE]--;
556
559
 
557
560
  if (eventLog !== null) {
558
- logEvent([TaskCompleteEvent, time, task.id]);
561
+ logEvent([TaskCompleteEvent, ms * 1000, task.id]);
559
562
  }
560
563
  }
561
564
  }
562
- function markTaskCanceled(task, time) {
565
+ function markTaskCanceled(task, ms) {
563
566
  if (enableProfiling) {
564
567
  profilingState[QUEUE_SIZE]--;
565
568
 
566
569
  if (eventLog !== null) {
567
- logEvent([TaskCancelEvent, time, task.id]);
570
+ logEvent([TaskCancelEvent, ms * 1000, task.id]);
568
571
  }
569
572
  }
570
573
  }
571
- function markTaskErrored(task, time) {
574
+ function markTaskErrored(task, ms) {
572
575
  if (enableProfiling) {
573
576
  profilingState[PRIORITY] = NoPriority;
574
577
  profilingState[CURRENT_TASK_ID] = 0;
575
578
  profilingState[QUEUE_SIZE]--;
576
579
 
577
580
  if (eventLog !== null) {
578
- logEvent([TaskErrorEvent, time, task.id]);
581
+ logEvent([TaskErrorEvent, ms * 1000, task.id]);
579
582
  }
580
583
  }
581
584
  }
582
- function markTaskRun(task, time) {
585
+ function markTaskRun(task, ms) {
583
586
  if (enableProfiling) {
584
587
  runIdCounter++;
585
588
  profilingState[PRIORITY] = task.priorityLevel;
@@ -587,34 +590,34 @@ function markTaskRun(task, time) {
587
590
  profilingState[CURRENT_RUN_ID] = runIdCounter;
588
591
 
589
592
  if (eventLog !== null) {
590
- logEvent([TaskRunEvent, time, task.id, runIdCounter]);
593
+ logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);
591
594
  }
592
595
  }
593
596
  }
594
- function markTaskYield(task, time) {
597
+ function markTaskYield(task, ms) {
595
598
  if (enableProfiling) {
596
599
  profilingState[PRIORITY] = NoPriority;
597
600
  profilingState[CURRENT_TASK_ID] = 0;
598
601
  profilingState[CURRENT_RUN_ID] = 0;
599
602
 
600
603
  if (eventLog !== null) {
601
- logEvent([TaskYieldEvent, time, task.id, runIdCounter]);
604
+ logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);
602
605
  }
603
606
  }
604
607
  }
605
- function markSchedulerSuspended(time) {
608
+ function markSchedulerSuspended(ms) {
606
609
  if (enableProfiling) {
607
610
  mainThreadIdCounter++;
608
611
 
609
612
  if (eventLog !== null) {
610
- logEvent([SchedulerSuspendEvent, time, mainThreadIdCounter]);
613
+ logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);
611
614
  }
612
615
  }
613
616
  }
614
- function markSchedulerUnsuspended(time) {
617
+ function markSchedulerUnsuspended(ms) {
615
618
  if (enableProfiling) {
616
619
  if (eventLog !== null) {
617
- logEvent([SchedulerResumeEvent, time, mainThreadIdCounter]);
620
+ logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);
618
621
  }
619
622
  }
620
623
  }
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scheduler",
3
- "version": "0.16.2",
3
+ "version": "0.17.0",
4
4
  "description": "Cooperative scheduler for the browser environment.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler-unstable_mock.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -372,47 +372,50 @@ function stopLoggingProfilingEvents() {
372
372
  eventLogIndex = 0;
373
373
  return buffer;
374
374
  }
375
- function markTaskStart(task, time) {
375
+ function markTaskStart(task, ms) {
376
376
  if (enableProfiling) {
377
377
  profilingState[QUEUE_SIZE]++;
378
378
 
379
379
  if (eventLog !== null) {
380
- logEvent([TaskStartEvent, time, task.id, task.priorityLevel]);
380
+ // performance.now returns a float, representing milliseconds. When the
381
+ // event is logged, it's coerced to an int. Convert to microseconds to
382
+ // maintain extra degrees of precision.
383
+ logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);
381
384
  }
382
385
  }
383
386
  }
384
- function markTaskCompleted(task, time) {
387
+ function markTaskCompleted(task, ms) {
385
388
  if (enableProfiling) {
386
389
  profilingState[PRIORITY] = NoPriority;
387
390
  profilingState[CURRENT_TASK_ID] = 0;
388
391
  profilingState[QUEUE_SIZE]--;
389
392
 
390
393
  if (eventLog !== null) {
391
- logEvent([TaskCompleteEvent, time, task.id]);
394
+ logEvent([TaskCompleteEvent, ms * 1000, task.id]);
392
395
  }
393
396
  }
394
397
  }
395
- function markTaskCanceled(task, time) {
398
+ function markTaskCanceled(task, ms) {
396
399
  if (enableProfiling) {
397
400
  profilingState[QUEUE_SIZE]--;
398
401
 
399
402
  if (eventLog !== null) {
400
- logEvent([TaskCancelEvent, time, task.id]);
403
+ logEvent([TaskCancelEvent, ms * 1000, task.id]);
401
404
  }
402
405
  }
403
406
  }
404
- function markTaskErrored(task, time) {
407
+ function markTaskErrored(task, ms) {
405
408
  if (enableProfiling) {
406
409
  profilingState[PRIORITY] = NoPriority;
407
410
  profilingState[CURRENT_TASK_ID] = 0;
408
411
  profilingState[QUEUE_SIZE]--;
409
412
 
410
413
  if (eventLog !== null) {
411
- logEvent([TaskErrorEvent, time, task.id]);
414
+ logEvent([TaskErrorEvent, ms * 1000, task.id]);
412
415
  }
413
416
  }
414
417
  }
415
- function markTaskRun(task, time) {
418
+ function markTaskRun(task, ms) {
416
419
  if (enableProfiling) {
417
420
  runIdCounter++;
418
421
  profilingState[PRIORITY] = task.priorityLevel;
@@ -420,34 +423,34 @@ function markTaskRun(task, time) {
420
423
  profilingState[CURRENT_RUN_ID] = runIdCounter;
421
424
 
422
425
  if (eventLog !== null) {
423
- logEvent([TaskRunEvent, time, task.id, runIdCounter]);
426
+ logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);
424
427
  }
425
428
  }
426
429
  }
427
- function markTaskYield(task, time) {
430
+ function markTaskYield(task, ms) {
428
431
  if (enableProfiling) {
429
432
  profilingState[PRIORITY] = NoPriority;
430
433
  profilingState[CURRENT_TASK_ID] = 0;
431
434
  profilingState[CURRENT_RUN_ID] = 0;
432
435
 
433
436
  if (eventLog !== null) {
434
- logEvent([TaskYieldEvent, time, task.id, runIdCounter]);
437
+ logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);
435
438
  }
436
439
  }
437
440
  }
438
- function markSchedulerSuspended(time) {
441
+ function markSchedulerSuspended(ms) {
439
442
  if (enableProfiling) {
440
443
  mainThreadIdCounter++;
441
444
 
442
445
  if (eventLog !== null) {
443
- logEvent([SchedulerSuspendEvent, time, mainThreadIdCounter]);
446
+ logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);
444
447
  }
445
448
  }
446
449
  }
447
- function markSchedulerUnsuspended(time) {
450
+ function markSchedulerUnsuspended(ms) {
448
451
  if (enableProfiling) {
449
452
  if (eventLog !== null) {
450
- logEvent([SchedulerResumeEvent, time, mainThreadIdCounter]);
453
+ logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);
451
454
  }
452
455
  }
453
456
  }
@@ -1,4 +1,4 @@
1
- /** @license React v0.16.2
1
+ /** @license React v0.17.0
2
2
  * scheduler-unstable_mock.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.