Socket
Socket
Sign inDemoInstall

scheduler

Package Overview
Dependencies
Maintainers
8
Versions
1874
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scheduler - npm Package Compare versions

Comparing version 0.0.0-679402a66 to 0.0.0-6da04b5d8

8

build-info.json
{
"branch": "master",
"buildNumber": "13829",
"checksum": "c4777c8",
"commit": "679402a66",
"buildNumber": "14730",
"checksum": "45d1701",
"commit": "6da04b5d8",
"environment": "ci",
"reactVersion": "16.8.4-canary-679402a66"
"reactVersion": "16.8.6-canary-6da04b5d8"
}

@@ -1,2 +0,2 @@

/** @license React v0.0.0-679402a66
/** @license React v0.0.0-6da04b5d8
* scheduler-tracing.development.js

@@ -54,2 +54,5 @@ *

// Disables yielding during render in Concurrent Mode. Used for debugging only.
// React Fire: prevent the value and checked attributes from syncing

@@ -68,2 +71,8 @@ // with their related DOM properties

// Experimental React Events support. Only used in www builds for now.
// New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
var DEFAULT_THREAD_ID = 0;

@@ -70,0 +79,0 @@

@@ -1,2 +0,2 @@

/** @license React v0.0.0-679402a66
/** @license React v0.0.0-6da04b5d8
* scheduler-tracing.production.min.js

@@ -3,0 +3,0 @@ *

@@ -1,2 +0,2 @@

/** @license React v0.0.0-679402a66
/** @license React v0.0.0-6da04b5d8
* scheduler-tracing.profiling.min.js

@@ -3,0 +3,0 @@ *

@@ -1,2 +0,2 @@

/** @license React v0.0.0-679402a66
/** @license React v0.0.0-6da04b5d8
* scheduler-unstable_mock.development.js

@@ -53,4 +53,8 @@ *

function forceFrameRate() {
// No-op
}
// Should only be used via an assertion helper that inspects the yielded values.

@@ -173,3 +177,3 @@ function unstable_flushNumberOfYields(count) {

var currentDidTimeout = false;
var currentHostCallbackDidTimeout = false;
// Pausing the scheduler is useful for debugging.

@@ -182,25 +186,27 @@ var isSchedulerPaused = false;

// This is set when a callback is being executed, to prevent re-entrancy.
var isExecutingCallback = false;
// This is set while performing work, to prevent re-entrancy.
var isPerformingWork = false;
var isHostCallbackScheduled = false;
function ensureHostCallbackIsScheduled() {
if (isExecutingCallback) {
function scheduleHostCallbackIfNeeded() {
if (isPerformingWork) {
// Don't schedule work yet; wait until the next time we yield.
return;
}
// Schedule the host callback using the earliest expiration in the list.
var expirationTime = firstCallbackNode.expirationTime;
if (!isHostCallbackScheduled) {
isHostCallbackScheduled = true;
} else {
// Cancel the existing host callback.
cancelHostCallback();
if (firstCallbackNode !== null) {
// Schedule the host callback using the earliest expiration in the list.
var expirationTime = firstCallbackNode.expirationTime;
if (isHostCallbackScheduled) {
// Cancel the existing host callback.
cancelHostCallback();
} else {
isHostCallbackScheduled = true;
}
requestHostCallback(flushWork, expirationTime);
}
requestHostCallback(flushWork, expirationTime);
}
function flushFirstCallback() {
var flushedNode = firstCallbackNode;
var currentlyFlushingCallback = firstCallbackNode;

@@ -220,8 +226,8 @@ // Remove the node from the list before calling the callback. That way the

flushedNode.next = flushedNode.previous = null;
currentlyFlushingCallback.next = currentlyFlushingCallback.previous = null;
// Now it's safe to call the callback.
var callback = flushedNode.callback;
var expirationTime = flushedNode.expirationTime;
var priorityLevel = flushedNode.priorityLevel;
var callback = currentlyFlushingCallback.callback;
var expirationTime = currentlyFlushingCallback.expirationTime;
var priorityLevel = currentlyFlushingCallback.priorityLevel;
var previousPriorityLevel = currentPriorityLevel;

@@ -233,3 +239,8 @@ var previousExpirationTime = currentExpirationTime;

try {
continuationCallback = callback(currentDidTimeout);
var didUserCallbackTimeout = currentHostCallbackDidTimeout ||
// Immediate priority callbacks are always called as if they timed out
priorityLevel === ImmediatePriority;
continuationCallback = callback(didUserCallbackTimeout);
} catch (error) {
throw error;
} finally {

@@ -278,3 +289,3 @@ currentPriorityLevel = previousPriorityLevel;

firstCallbackNode = continuationNode;
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
}

@@ -290,28 +301,4 @@

function flushImmediateWork() {
if (
// Confirm we've exited the outer most event handler
currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) {
isExecutingCallback = true;
try {
do {
flushFirstCallback();
} while (
// Keep flushing until there are no more immediate callbacks
firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority);
} finally {
isExecutingCallback = false;
if (firstCallbackNode !== null) {
// There's still work remaining. Request another callback.
ensureHostCallbackIsScheduled();
} else {
isHostCallbackScheduled = false;
}
}
}
}
function flushWork(didTimeout) {
function flushWork(didUserCallbackTimeout) {
// Exit right away if we're currently paused
if (enableSchedulerDebugging && isSchedulerPaused) {

@@ -321,7 +308,10 @@ return;

isExecutingCallback = true;
var previousDidTimeout = currentDidTimeout;
currentDidTimeout = didTimeout;
// We'll need a new host callback the next time work is scheduled.
isHostCallbackScheduled = false;
isPerformingWork = true;
var previousDidTimeout = currentHostCallbackDidTimeout;
currentHostCallbackDidTimeout = didUserCallbackTimeout;
try {
if (didTimeout) {
if (didUserCallbackTimeout) {
// Flush all the expired callbacks without yielding.

@@ -354,12 +344,6 @@ while (firstCallbackNode !== null && !(enableSchedulerDebugging && isSchedulerPaused)) {

} finally {
isExecutingCallback = false;
currentDidTimeout = previousDidTimeout;
if (firstCallbackNode !== null) {
// There's still work remaining. Request another callback.
ensureHostCallbackIsScheduled();
} else {
isHostCallbackScheduled = false;
}
// Before exiting, flush all the immediate work that was scheduled.
flushImmediateWork();
isPerformingWork = false;
currentHostCallbackDidTimeout = previousDidTimeout;
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
}

@@ -387,8 +371,9 @@ }

return eventHandler();
} catch (error) {
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
throw error;
} finally {
currentPriorityLevel = previousPriorityLevel;
currentEventStartTime = previousEventStartTime;
// Before exiting, flush all the immediate work that was scheduled.
flushImmediateWork();
}

@@ -419,8 +404,9 @@ }

return eventHandler();
} catch (error) {
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
throw error;
} finally {
currentPriorityLevel = previousPriorityLevel;
currentEventStartTime = previousEventStartTime;
// Before exiting, flush all the immediate work that was scheduled.
flushImmediateWork();
}

@@ -440,6 +426,9 @@ }

return callback.apply(this, arguments);
} catch (error) {
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
throw error;
} finally {
currentPriorityLevel = previousPriorityLevel;
currentEventStartTime = previousEventStartTime;
flushImmediateWork();
}

@@ -449,3 +438,3 @@ };

function unstable_scheduleCallback(callback, deprecated_options) {
function unstable_scheduleCallback(priorityLevel, callback, deprecated_options) {
var startTime = currentEventStartTime !== -1 ? currentEventStartTime : getCurrentTime();

@@ -458,3 +447,3 @@

} else {
switch (currentPriorityLevel) {
switch (priorityLevel) {
case ImmediatePriority:

@@ -480,3 +469,3 @@ expirationTime = startTime + IMMEDIATE_PRIORITY_TIMEOUT;

callback: callback,
priorityLevel: currentPriorityLevel,
priorityLevel: priorityLevel,
expirationTime: expirationTime,

@@ -488,8 +477,8 @@ next: null,

// Insert the new callback into the list, ordered first by expiration, then
// by insertion. So the new callback is inserted any other callback with
// equal expiration.
// by insertion. So the new callback is inserted after any other callback
// with equal expiration.
if (firstCallbackNode === null) {
// This is the first callback in the list.
firstCallbackNode = newNode.next = newNode.previous = newNode;
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
} else {

@@ -514,3 +503,3 @@ var next = null;

firstCallbackNode = newNode;
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
}

@@ -534,3 +523,3 @@

if (firstCallbackNode !== null) {
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
}

@@ -571,3 +560,3 @@ }

function unstable_shouldYield() {
return !currentDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
return !currentHostCallbackDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
}

@@ -598,3 +587,4 @@

exports.unstable_now = getCurrentTime;
exports.unstable_forceFrameRate = forceFrameRate;
})();
}

@@ -1,2 +0,2 @@

/** @license React v0.0.0-679402a66
/** @license React v0.0.0-6da04b5d8
* scheduler-unstable_mock.production.min.js

@@ -10,11 +10,11 @@ *

'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var c=0,e=null,g=-1,h=null,k=-1,l=!1,m=!1;function n(){return-1!==k&&null!==h&&h.length>=k||-1!==g&&g<=c?l=!0:!1}function q(){if(m)throw Error("Already flushing work.");if(null!==e){var a=e;e=null;m=!0;try{a(!0)}finally{m=!1}}}function r(){if(m)throw Error("Already flushing work.");m=!0;try{for(;null!==e;){var a=e;e=null;a(-1!==g&&g<=c)}}finally{k=-1,m=l=!1}}var t=null,u=!1,v=3,w=-1,x=-1,y=!1,z=!1;
function A(){if(!y){var a=t.expirationTime;z?(e=null,g=-1):z=!0;e=B;g=a}}
function C(){var a=t,b=t.next;if(t===b)t=null;else{var d=t.previous;t=d.next=b;b.previous=d}a.next=a.previous=null;d=a.callback;b=a.expirationTime;a=a.priorityLevel;var f=v,E=x;v=a;x=b;try{var p=d(u)}finally{v=f,x=E}if("function"===typeof p)if(p={callback:p,priorityLevel:a,expirationTime:b,next:null,previous:null},null===t)t=p.next=p.previous=p;else{d=null;a=t;do{if(a.expirationTime>=b){d=a;break}a=a.next}while(a!==t);null===d?d=t:d===t&&(t=p,A());b=d.previous;b.next=d.previous=p;p.next=d;p.previous=
b}}function D(){if(-1===w&&null!==t&&1===t.priorityLevel){y=!0;try{do C();while(null!==t&&1===t.priorityLevel)}finally{y=!1,null!==t?A():z=!1}}}function B(a){y=!0;var b=u;u=a;try{if(a)for(;null!==t;)if(a=c,t.expirationTime<=a){do C();while(null!==t&&t.expirationTime<=a)}else break;else if(null!==t){do C();while(null!==t&&!n())}}finally{y=!1,u=b,null!==t?A():z=!1,D()}}exports.unstable_flushWithoutYielding=r;
exports.unstable_flushNumberOfYields=function(a){if(m)throw Error("Already flushing work.");k=a;m=!0;try{for(;null!==e&&!l;)a=e,e=null,a(-1!==g&&g<=c)}finally{k=-1,m=l=!1}};exports.unstable_flushExpired=q;exports.unstable_clearYields=function(){if(null===h)return[];var a=h;h=null;return a};
exports.flushAll=function(){if(null!==h)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");r();if(null!==h)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");};exports.yieldValue=function(a){null===h?h=[a]:h.push(a)};exports.advanceTime=function(a){c+=a;!m&&-1!==g&&g<=c&&q()};exports.unstable_ImmediatePriority=1;
exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var d=v,f=w;v=a;w=c;try{return b()}finally{v=d,w=f,D()}};exports.unstable_next=function(a){switch(v){case 1:case 2:case 3:var b=3;break;default:b=v}var d=v,f=w;v=b;w=c;try{return a()}finally{v=d,w=f,D()}};
exports.unstable_scheduleCallback=function(a,b){var d=-1!==w?w:c;if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=d+b.timeout;else switch(v){case 1:b=d+-1;break;case 2:b=d+250;break;case 5:b=d+1073741823;break;case 4:b=d+1E4;break;default:b=d+5E3}a={callback:a,priorityLevel:v,expirationTime:b,next:null,previous:null};if(null===t)t=a.next=a.previous=a,A();else{d=null;var f=t;do{if(f.expirationTime>b){d=f;break}f=f.next}while(f!==t);null===d?d=t:d===t&&(t=a,A());b=d.previous;b.next=d.previous=
a;a.next=d;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)t=null;else{a===t&&(t=b);var d=a.previous;d.next=b;b.previous=d}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=v;return function(){var d=v,f=w;v=b;w=c;try{return a.apply(this,arguments)}finally{v=d,w=f,D()}}};exports.unstable_getCurrentPriorityLevel=function(){return v};exports.unstable_shouldYield=function(){return!u&&(null!==t&&t.expirationTime<x||n())};
exports.unstable_continueExecution=function(){null!==t&&A()};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return t};exports.unstable_now=function(){return c};
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var c=0,f=null,g=-1,h=null,k=-1,l=!1,m=!1;function n(){return-1!==k&&null!==h&&h.length>=k||-1!==g&&g<=c?l=!0:!1}function q(){if(m)throw Error("Already flushing work.");if(null!==f){var a=f;f=null;m=!0;try{a(!0)}finally{m=!1}}}function t(){if(m)throw Error("Already flushing work.");m=!0;try{for(;null!==f;){var a=f;f=null;a(-1!==g&&g<=c)}}finally{k=-1,m=l=!1}}var u=null,v=!1,w=3,x=-1,y=-1,z=!1,A=!1;
function B(){if(!z&&null!==u){var a=u.expirationTime;A?(f=null,g=-1):A=!0;f=C;g=a}}
function D(){var a=u,d=u.next;if(u===d)u=null;else{var b=u.previous;u=b.next=d;d.previous=b}a.next=a.previous=null;b=a.callback;d=a.expirationTime;a=a.priorityLevel;var e=w,r=y;w=a;y=d;try{var p=b(v||1===a)}catch(E){throw E;}finally{w=e,y=r}if("function"===typeof p)if(p={callback:p,priorityLevel:a,expirationTime:d,next:null,previous:null},null===u)u=p.next=p.previous=p;else{b=null;a=u;do{if(a.expirationTime>=d){b=a;break}a=a.next}while(a!==u);null===b?b=u:b===u&&(u=p,B());d=b.previous;d.next=b.previous=
p;p.next=b;p.previous=d}}function C(a){A=!1;z=!0;var d=v;v=a;try{if(a)for(;null!==u;)if(a=c,u.expirationTime<=a){do D();while(null!==u&&u.expirationTime<=a)}else break;else if(null!==u){do D();while(null!==u&&!n())}}finally{z=!1,v=d,B()}}exports.unstable_flushWithoutYielding=t;exports.unstable_flushNumberOfYields=function(a){if(m)throw Error("Already flushing work.");k=a;m=!0;try{for(;null!==f&&!l;)a=f,f=null,a(-1!==g&&g<=c)}finally{k=-1,m=l=!1}};exports.unstable_flushExpired=q;
exports.unstable_clearYields=function(){if(null===h)return[];var a=h;h=null;return a};exports.flushAll=function(){if(null!==h)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");t();if(null!==h)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");};exports.yieldValue=function(a){null===h?h=[a]:h.push(a)};
exports.advanceTime=function(a){c+=a;!m&&-1!==g&&g<=c&&q()};exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,d){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var b=w,e=x;w=a;x=c;try{return d()}catch(r){throw B(),r;}finally{w=b,x=e}};
exports.unstable_next=function(a){switch(w){case 1:case 2:case 3:var d=3;break;default:d=w}var b=w,e=x;w=d;x=c;try{return a()}catch(r){throw B(),r;}finally{w=b,x=e}};
exports.unstable_scheduleCallback=function(a,d,b){var e=-1!==x?x:c;if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=e+b.timeout;else switch(a){case 1:b=e+-1;break;case 2:b=e+250;break;case 5:b=e+1073741823;break;case 4:b=e+1E4;break;default:b=e+5E3}a={callback:d,priorityLevel:a,expirationTime:b,next:null,previous:null};if(null===u)u=a.next=a.previous=a,B();else{d=null;e=u;do{if(e.expirationTime>b){d=e;break}e=e.next}while(e!==u);null===d?d=u:d===u&&(u=a,B());b=d.previous;b.next=d.previous=
a;a.next=d;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var d=a.next;if(null!==d){if(d===a)u=null;else{a===u&&(u=d);var b=a.previous;b.next=d;d.previous=b}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var d=w;return function(){var b=w,e=x;w=d;x=c;try{return a.apply(this,arguments)}catch(r){throw B(),r;}finally{w=b,x=e}}};exports.unstable_getCurrentPriorityLevel=function(){return w};
exports.unstable_shouldYield=function(){return!v&&(null!==u&&u.expirationTime<y||n())};exports.unstable_continueExecution=function(){null!==u&&B()};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return u};exports.unstable_now=function(){return c};exports.unstable_forceFrameRate=function(){};

@@ -1,2 +0,2 @@

/** @license React v0.0.0-679402a66
/** @license React v0.0.0-6da04b5d8
* scheduler.development.js

@@ -34,2 +34,3 @@ *

exports.unstable_now = void 0;
exports.unstable_forceFrameRate = void 0;

@@ -121,2 +122,3 @@ var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';

};
exports.unstable_forceFrameRate = function () {};
} else {

@@ -147,2 +149,3 @@ if (typeof console !== 'undefined') {

var activeFrameTime = 33;
var fpsLocked = false;

@@ -153,2 +156,17 @@ shouldYieldToHost = function () {

exports.unstable_forceFrameRate = function (fps) {
if (fps < 0 || fps > 125) {
console.error('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');
return;
}
if (fps > 0) {
activeFrameTime = Math.floor(1000 / fps);
fpsLocked = true;
} else {
// reset the framerate
activeFrameTime = 33;
fpsLocked = false;
}
};
// We use the postMessage trick to defer idle work until after the repaint.

@@ -217,3 +235,3 @@ var channel = new MessageChannel();

var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime && !fpsLocked) {
if (nextFrameTime < 8) {

@@ -291,3 +309,3 @@ // Defensive coding. We don't support higher frame rates than 120hz.

var currentDidTimeout = false;
var currentHostCallbackDidTimeout = false;
// Pausing the scheduler is useful for debugging.

@@ -300,25 +318,27 @@ var isSchedulerPaused = false;

// This is set when a callback is being executed, to prevent re-entrancy.
var isExecutingCallback = false;
// This is set while performing work, to prevent re-entrancy.
var isPerformingWork = false;
var isHostCallbackScheduled = false;
function ensureHostCallbackIsScheduled() {
if (isExecutingCallback) {
function scheduleHostCallbackIfNeeded() {
if (isPerformingWork) {
// Don't schedule work yet; wait until the next time we yield.
return;
}
// Schedule the host callback using the earliest expiration in the list.
var expirationTime = firstCallbackNode.expirationTime;
if (!isHostCallbackScheduled) {
isHostCallbackScheduled = true;
} else {
// Cancel the existing host callback.
cancelHostCallback();
if (firstCallbackNode !== null) {
// Schedule the host callback using the earliest expiration in the list.
var expirationTime = firstCallbackNode.expirationTime;
if (isHostCallbackScheduled) {
// Cancel the existing host callback.
cancelHostCallback();
} else {
isHostCallbackScheduled = true;
}
requestHostCallback(flushWork, expirationTime);
}
requestHostCallback(flushWork, expirationTime);
}
function flushFirstCallback() {
var flushedNode = firstCallbackNode;
var currentlyFlushingCallback = firstCallbackNode;

@@ -338,8 +358,8 @@ // Remove the node from the list before calling the callback. That way the

flushedNode.next = flushedNode.previous = null;
currentlyFlushingCallback.next = currentlyFlushingCallback.previous = null;
// Now it's safe to call the callback.
var callback = flushedNode.callback;
var expirationTime = flushedNode.expirationTime;
var priorityLevel = flushedNode.priorityLevel;
var callback = currentlyFlushingCallback.callback;
var expirationTime = currentlyFlushingCallback.expirationTime;
var priorityLevel = currentlyFlushingCallback.priorityLevel;
var previousPriorityLevel = currentPriorityLevel;

@@ -351,3 +371,8 @@ var previousExpirationTime = currentExpirationTime;

try {
continuationCallback = callback(currentDidTimeout);
var didUserCallbackTimeout = currentHostCallbackDidTimeout ||
// Immediate priority callbacks are always called as if they timed out
priorityLevel === ImmediatePriority;
continuationCallback = callback(didUserCallbackTimeout);
} catch (error) {
throw error;
} finally {

@@ -396,3 +421,3 @@ currentPriorityLevel = previousPriorityLevel;

firstCallbackNode = continuationNode;
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
}

@@ -408,28 +433,4 @@

function flushImmediateWork() {
if (
// Confirm we've exited the outer most event handler
currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) {
isExecutingCallback = true;
try {
do {
flushFirstCallback();
} while (
// Keep flushing until there are no more immediate callbacks
firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority);
} finally {
isExecutingCallback = false;
if (firstCallbackNode !== null) {
// There's still work remaining. Request another callback.
ensureHostCallbackIsScheduled();
} else {
isHostCallbackScheduled = false;
}
}
}
}
function flushWork(didTimeout) {
function flushWork(didUserCallbackTimeout) {
// Exit right away if we're currently paused
if (enableSchedulerDebugging && isSchedulerPaused) {

@@ -439,7 +440,10 @@ return;

isExecutingCallback = true;
var previousDidTimeout = currentDidTimeout;
currentDidTimeout = didTimeout;
// We'll need a new host callback the next time work is scheduled.
isHostCallbackScheduled = false;
isPerformingWork = true;
var previousDidTimeout = currentHostCallbackDidTimeout;
currentHostCallbackDidTimeout = didUserCallbackTimeout;
try {
if (didTimeout) {
if (didUserCallbackTimeout) {
// Flush all the expired callbacks without yielding.

@@ -472,12 +476,6 @@ while (firstCallbackNode !== null && !(enableSchedulerDebugging && isSchedulerPaused)) {

} finally {
isExecutingCallback = false;
currentDidTimeout = previousDidTimeout;
if (firstCallbackNode !== null) {
// There's still work remaining. Request another callback.
ensureHostCallbackIsScheduled();
} else {
isHostCallbackScheduled = false;
}
// Before exiting, flush all the immediate work that was scheduled.
flushImmediateWork();
isPerformingWork = false;
currentHostCallbackDidTimeout = previousDidTimeout;
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
}

@@ -505,8 +503,9 @@ }

return eventHandler();
} catch (error) {
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
throw error;
} finally {
currentPriorityLevel = previousPriorityLevel;
currentEventStartTime = previousEventStartTime;
// Before exiting, flush all the immediate work that was scheduled.
flushImmediateWork();
}

@@ -537,8 +536,9 @@ }

return eventHandler();
} catch (error) {
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
throw error;
} finally {
currentPriorityLevel = previousPriorityLevel;
currentEventStartTime = previousEventStartTime;
// Before exiting, flush all the immediate work that was scheduled.
flushImmediateWork();
}

@@ -558,6 +558,9 @@ }

return callback.apply(this, arguments);
} catch (error) {
// There's still work remaining. Request another callback.
scheduleHostCallbackIfNeeded();
throw error;
} finally {
currentPriorityLevel = previousPriorityLevel;
currentEventStartTime = previousEventStartTime;
flushImmediateWork();
}

@@ -567,3 +570,3 @@ };

function unstable_scheduleCallback(callback, deprecated_options) {
function unstable_scheduleCallback(priorityLevel, callback, deprecated_options) {
var startTime = currentEventStartTime !== -1 ? currentEventStartTime : exports.unstable_now();

@@ -576,3 +579,3 @@

} else {
switch (currentPriorityLevel) {
switch (priorityLevel) {
case ImmediatePriority:

@@ -598,3 +601,3 @@ expirationTime = startTime + IMMEDIATE_PRIORITY_TIMEOUT;

callback: callback,
priorityLevel: currentPriorityLevel,
priorityLevel: priorityLevel,
expirationTime: expirationTime,

@@ -606,8 +609,8 @@ next: null,

// Insert the new callback into the list, ordered first by expiration, then
// by insertion. So the new callback is inserted any other callback with
// equal expiration.
// by insertion. So the new callback is inserted after any other callback
// with equal expiration.
if (firstCallbackNode === null) {
// This is the first callback in the list.
firstCallbackNode = newNode.next = newNode.previous = newNode;
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
} else {

@@ -632,3 +635,3 @@ var next = null;

firstCallbackNode = newNode;
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
}

@@ -652,3 +655,3 @@

if (firstCallbackNode !== null) {
ensureHostCallbackIsScheduled();
scheduleHostCallbackIfNeeded();
}

@@ -689,3 +692,3 @@ }

function unstable_shouldYield() {
return !currentDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
return !currentHostCallbackDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
}

@@ -692,0 +695,0 @@

@@ -1,2 +0,2 @@

/** @license React v0.0.0-679402a66
/** @license React v0.0.0-6da04b5d8
* scheduler.production.min.js

@@ -10,12 +10,13 @@ *

'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var d=void 0,e=void 0,g=void 0;exports.unstable_now=void 0;var k=Date,l="function"===typeof setTimeout?setTimeout:void 0,m="function"===typeof clearTimeout?clearTimeout:void 0,n="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,p="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,q=void 0,r=void 0;function t(a){q=n(function(b){m(r);a(b)});r=l(function(){p(q);a(exports.unstable_now())},100)}
if("object"===typeof performance&&"function"===typeof performance.now){var u=performance;exports.unstable_now=function(){return u.now()}}else exports.unstable_now=function(){return k.now()};
if("undefined"===typeof window||"function"!==typeof MessageChannel){var v=null,w=function(a){if(null!==v)try{v(a)}finally{v=null}};d=function(a){null!==v?setTimeout(d,0,a):(v=a,setTimeout(w,0,!1))};e=function(){v=null};g=function(){return!1}}else{"undefined"!==typeof console&&("function"!==typeof n&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));
var x=null,y=!1,z=-1,A=!1,B=!1,C=0,D=33,E=33;g=function(){return C<=exports.unstable_now()};var F=new MessageChannel,G=F.port2;F.port1.onmessage=function(){y=!1;var a=x,b=z;x=null;z=-1;var c=exports.unstable_now(),f=!1;if(0>=C-c)if(-1!==b&&b<=c)f=!0;else{A||(A=!0,t(H));x=a;z=b;return}if(null!==a){B=!0;try{a(f)}finally{B=!1}}};var H=function(a){if(null!==x){t(H);var b=a-C+E;b<E&&D<E?(8>b&&(b=8),E=b<D?D:b):D=b;C=a+E;y||(y=!0,G.postMessage(void 0))}else A=!1};d=function(a,b){x=a;z=b;B||0>b?G.postMessage(void 0):
A||(A=!0,t(H))};e=function(){x=null;y=!1;z=-1}}var I=null,J=!1,K=3,L=-1,M=-1,N=!1,O=!1;function P(){if(!N){var a=I.expirationTime;O?e():O=!0;d(Q,a)}}
function R(){var a=I,b=I.next;if(I===b)I=null;else{var c=I.previous;I=c.next=b;b.previous=c}a.next=a.previous=null;c=a.callback;b=a.expirationTime;a=a.priorityLevel;var f=K,T=M;K=a;M=b;try{var h=c(J)}finally{K=f,M=T}if("function"===typeof h)if(h={callback:h,priorityLevel:a,expirationTime:b,next:null,previous:null},null===I)I=h.next=h.previous=h;else{c=null;a=I;do{if(a.expirationTime>=b){c=a;break}a=a.next}while(a!==I);null===c?c=I:c===I&&(I=h,P());b=c.previous;b.next=c.previous=h;h.next=c;h.previous=
b}}function S(){if(-1===L&&null!==I&&1===I.priorityLevel){N=!0;try{do R();while(null!==I&&1===I.priorityLevel)}finally{N=!1,null!==I?P():O=!1}}}function Q(a){N=!0;var b=J;J=a;try{if(a)for(;null!==I;){var c=exports.unstable_now();if(I.expirationTime<=c){do R();while(null!==I&&I.expirationTime<=c)}else break}else if(null!==I){do R();while(null!==I&&!g())}}finally{N=!1,J=b,null!==I?P():O=!1,S()}}exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;
exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=K,f=L;K=a;L=exports.unstable_now();try{return b()}finally{K=c,L=f,S()}};exports.unstable_next=function(a){switch(K){case 1:case 2:case 3:var b=3;break;default:b=K}var c=K,f=L;K=b;L=exports.unstable_now();try{return a()}finally{K=c,L=f,S()}};
exports.unstable_scheduleCallback=function(a,b){var c=-1!==L?L:exports.unstable_now();if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=c+b.timeout;else switch(K){case 1:b=c+-1;break;case 2:b=c+250;break;case 5:b=c+1073741823;break;case 4:b=c+1E4;break;default:b=c+5E3}a={callback:a,priorityLevel:K,expirationTime:b,next:null,previous:null};if(null===I)I=a.next=a.previous=a,P();else{c=null;var f=I;do{if(f.expirationTime>b){c=f;break}f=f.next}while(f!==I);null===c?c=I:c===I&&(I=a,P());
b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)I=null;else{a===I&&(I=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=K;return function(){var c=K,f=L;K=b;L=exports.unstable_now();try{return a.apply(this,arguments)}finally{K=c,L=f,S()}}};exports.unstable_getCurrentPriorityLevel=function(){return K};
exports.unstable_shouldYield=function(){return!J&&(null!==I&&I.expirationTime<M||g())};exports.unstable_continueExecution=function(){null!==I&&P()};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return I};
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var d=void 0,f=void 0,g=void 0;exports.unstable_now=void 0;exports.unstable_forceFrameRate=void 0;var k=Date,l="function"===typeof setTimeout?setTimeout:void 0,n="function"===typeof clearTimeout?clearTimeout:void 0,p="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,q="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,r=void 0,t=void 0;
function u(a){r=p(function(b){n(t);a(b)});t=l(function(){q(r);a(exports.unstable_now())},100)}if("object"===typeof performance&&"function"===typeof performance.now){var v=performance;exports.unstable_now=function(){return v.now()}}else exports.unstable_now=function(){return k.now()};
if("undefined"===typeof window||"function"!==typeof MessageChannel){var w=null,x=function(a){if(null!==w)try{w(a)}finally{w=null}};d=function(a){null!==w?setTimeout(d,0,a):(w=a,setTimeout(x,0,!1))};f=function(){w=null};g=function(){return!1};exports.unstable_forceFrameRate=function(){}}else{"undefined"!==typeof console&&("function"!==typeof p&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==
typeof q&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var y=null,z=!1,A=-1,B=!1,C=!1,D=0,E=33,F=33,G=!1;g=function(){return D<=exports.unstable_now()};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):0<a?(F=Math.floor(1E3/a),G=!0):(F=33,G=!1)};var H=new MessageChannel,
I=H.port2;H.port1.onmessage=function(){z=!1;var a=y,b=A;y=null;A=-1;var c=exports.unstable_now(),e=!1;if(0>=D-c)if(-1!==b&&b<=c)e=!0;else{B||(B=!0,u(J));y=a;A=b;return}if(null!==a){C=!0;try{a(e)}finally{C=!1}}};var J=function(a){if(null!==y){u(J);var b=a-D+F;b<F&&E<F&&!G?(8>b&&(b=8),F=b<E?E:b):E=b;D=a+F;z||(z=!0,I.postMessage(void 0))}else B=!1};d=function(a,b){y=a;A=b;C||0>b?I.postMessage(void 0):B||(B=!0,u(J))};f=function(){y=null;z=!1;A=-1}}var K=null,L=!1,M=3,N=-1,O=-1,P=!1,Q=!1;
function R(){if(!P&&null!==K){var a=K.expirationTime;Q?f():Q=!0;d(S,a)}}
function T(){var a=K,b=K.next;if(K===b)K=null;else{var c=K.previous;K=c.next=b;b.previous=c}a.next=a.previous=null;c=a.callback;b=a.expirationTime;a=a.priorityLevel;var e=M,m=O;M=a;O=b;try{var h=c(L||1===a)}catch(U){throw U;}finally{M=e,O=m}if("function"===typeof h)if(h={callback:h,priorityLevel:a,expirationTime:b,next:null,previous:null},null===K)K=h.next=h.previous=h;else{c=null;a=K;do{if(a.expirationTime>=b){c=a;break}a=a.next}while(a!==K);null===c?c=K:c===K&&(K=h,R());b=c.previous;b.next=c.previous=
h;h.next=c;h.previous=b}}function S(a){Q=!1;P=!0;var b=L;L=a;try{if(a)for(;null!==K;){var c=exports.unstable_now();if(K.expirationTime<=c){do T();while(null!==K&&K.expirationTime<=c)}else break}else if(null!==K){do T();while(null!==K&&!g())}}finally{P=!1,L=b,R()}}exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;
exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=M,e=N;M=a;N=exports.unstable_now();try{return b()}catch(m){throw R(),m;}finally{M=c,N=e}};exports.unstable_next=function(a){switch(M){case 1:case 2:case 3:var b=3;break;default:b=M}var c=M,e=N;M=b;N=exports.unstable_now();try{return a()}catch(m){throw R(),m;}finally{M=c,N=e}};
exports.unstable_scheduleCallback=function(a,b,c){var e=-1!==N?N:exports.unstable_now();if("object"===typeof c&&null!==c&&"number"===typeof c.timeout)c=e+c.timeout;else switch(a){case 1:c=e+-1;break;case 2:c=e+250;break;case 5:c=e+1073741823;break;case 4:c=e+1E4;break;default:c=e+5E3}a={callback:b,priorityLevel:a,expirationTime:c,next:null,previous:null};if(null===K)K=a.next=a.previous=a,R();else{b=null;e=K;do{if(e.expirationTime>c){b=e;break}e=e.next}while(e!==K);null===b?b=K:b===K&&(K=a,R());c=
b.previous;c.next=b.previous=a;a.next=b;a.previous=c}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)K=null;else{a===K&&(K=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=M;return function(){var c=M,e=N;M=b;N=exports.unstable_now();try{return a.apply(this,arguments)}catch(m){throw R(),m;}finally{M=c,N=e}}};exports.unstable_getCurrentPriorityLevel=function(){return M};
exports.unstable_shouldYield=function(){return!L&&(null!==K&&K.expirationTime<O||g())};exports.unstable_continueExecution=function(){null!==K&&R()};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return K};
{
"name": "scheduler",
"version": "0.0.0-679402a66",
"version": "0.0.0-6da04b5d8",
"description": "Cooperative scheduler for the browser environment.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -99,2 +99,9 @@ /**

function unstable_forceFrameRate() {
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
this,
arguments
);
}
return Object.freeze({

@@ -112,2 +119,3 @@ unstable_now: unstable_now,

unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
unstable_forceFrameRate: unstable_forceFrameRate,
get unstable_IdlePriority() {

@@ -114,0 +122,0 @@ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

@@ -93,2 +93,9 @@ /**

function unstable_forceFrameRate() {
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
this,
arguments
);
}
return Object.freeze({

@@ -106,2 +113,3 @@ unstable_now: unstable_now,

unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
unstable_forceFrameRate: unstable_forceFrameRate,
get unstable_IdlePriority() {

@@ -108,0 +116,0 @@ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

@@ -93,2 +93,9 @@ /**

function unstable_forceFrameRate() {
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
this,
arguments
);
}
return Object.freeze({

@@ -106,2 +113,3 @@ unstable_now: unstable_now,

unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
unstable_forceFrameRate: unstable_forceFrameRate,
get unstable_IdlePriority() {

@@ -108,0 +116,0 @@ return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc