GeezerVison is showing github.com — Fix UMD bundles by removing usage of global (#20743) · react/react@eeb1325
File treeExpand file treeCollapse file tree Open diff view settings react-native-renderer/src
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-art/src/ReactARTHostConfig.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -330,7 +330,7 @@ export function getChildHostContext() { | 330 | 330 | export const scheduleTimeout = setTimeout; | 331 | 331 | export const cancelTimeout = clearTimeout; | 332 | 332 | export const noTimeout = -1; | 333 | | -export function queueMicrotask(callback: Function) { | | 333 | +export function scheduleMicrotask(callback: Function) { | 334 | 334 | invariant(false, 'Not implemented.'); | 335 | 335 | } | 336 | 336 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/react-dom/src/client/ReactDOMHostConfig.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -384,9 +384,9 @@ export const scheduleTimeout: any = | 384 | 384 | export const cancelTimeout: any = | 385 | 385 | typeof clearTimeout === 'function' ? clearTimeout : (undefined: any); | 386 | 386 | export const noTimeout = -1; | 387 | | -export const queueMicrotask: any = | 388 | | - typeof global.queueMicrotask === 'function' | 389 | | - ? global.queueMicrotask | | 387 | +export const scheduleMicrotask: any = | | 388 | + typeof queueMicrotask === 'function' | | 389 | + ? queueMicrotask | 390 | 390 | : typeof Promise !== 'undefined' | 391 | 391 | ? callback => | 392 | 392 | Promise.resolve(null) | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactFabricHostConfig.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -348,7 +348,7 @@ export const warnsIfNotActing = false; | 348 | 348 | export const scheduleTimeout = setTimeout; | 349 | 349 | export const cancelTimeout = clearTimeout; | 350 | 350 | export const noTimeout = -1; | 351 | | -export function queueMicrotask(callback: Function) { | | 351 | +export function scheduleMicrotask(callback: Function) { | 352 | 352 | invariant(false, 'Not implemented.'); | 353 | 353 | } | 354 | 354 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactNativeHostConfig.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -247,7 +247,7 @@ export const warnsIfNotActing = true; | 247 | 247 | export const scheduleTimeout = setTimeout; | 248 | 248 | export const cancelTimeout = clearTimeout; | 249 | 249 | export const noTimeout = -1; | 250 | | -export function queueMicrotask(callback: Function) { | | 250 | +export function scheduleMicrotask(callback: Function) { | 251 | 251 | invariant(false, 'Not implemented.'); | 252 | 252 | } | 253 | 253 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/react-noop-renderer/src/createReactNoop.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -371,7 +371,7 @@ function createReactNoop(reconciler: Function, useMutation: boolean) { | 371 | 371 | scheduleTimeout: setTimeout, | 372 | 372 | cancelTimeout: clearTimeout, | 373 | 373 | noTimeout: -1, | 374 | | - queueMicrotask: | | 374 | + scheduleMicrotask: | 375 | 375 | typeof queueMicrotask === 'function' | 376 | 376 | ? queueMicrotask | 377 | 377 | : typeof Promise !== 'undefined' | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/README.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -203,7 +203,7 @@ You can proxy this to `clearTimeout` or its equivalent in your environment. | 203 | 203 |
| 204 | 204 | This is a property (not a function) that should be set to something that can never be a valid timeout ID. For example, you can set it to `-1`. | 205 | 205 |
| 206 | | -#### `queueMicrotask(fn)` | | 206 | +#### `scheduleMicrotask(fn)` | 207 | 207 |
| 208 | 208 | You can proxy this to `queueMicrotask` or its equivalent in your environment. | 209 | 209 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.new.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -92,7 +92,7 @@ import { | 92 | 92 | warnsIfNotActing, | 93 | 93 | afterActiveInstanceBlur, | 94 | 94 | clearContainer, | 95 | | - queueMicrotask, | | 95 | + scheduleMicrotask, | 96 | 96 | } from './ReactFiberHostConfig'; | 97 | 97 |
| 98 | 98 | import { | @@ -766,7 +766,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) { | 766 | 766 | enableDiscreteEventMicroTasks && | 767 | 767 | newCallbackPriority === InputDiscreteLanePriority | 768 | 768 | ) { | 769 | | - queueMicrotask(performSyncWorkOnRoot.bind(null, root)); | | 769 | + scheduleMicrotask(performSyncWorkOnRoot.bind(null, root)); | 770 | 770 | newCallbackNode = null; | 771 | 771 | } else { | 772 | 772 | const schedulerPriorityLevel = lanePriorityToSchedulerPriority( | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.old.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -92,7 +92,7 @@ import { | 92 | 92 | warnsIfNotActing, | 93 | 93 | afterActiveInstanceBlur, | 94 | 94 | clearContainer, | 95 | | - queueMicrotask, | | 95 | + scheduleMicrotask, | 96 | 96 | } from './ReactFiberHostConfig'; | 97 | 97 |
| 98 | 98 | import { | @@ -766,7 +766,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) { | 766 | 766 | enableDiscreteEventMicroTasks && | 767 | 767 | newCallbackPriority === InputDiscreteLanePriority | 768 | 768 | ) { | 769 | | - queueMicrotask(performSyncWorkOnRoot.bind(null, root)); | | 769 | + scheduleMicrotask(performSyncWorkOnRoot.bind(null, root)); | 770 | 770 | newCallbackNode = null; | 771 | 771 | } else { | 772 | 772 | const schedulerPriorityLevel = lanePriorityToSchedulerPriority( | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,7 +54,7 @@ export const shouldSetTextContent = $$$hostConfig.shouldSetTextContent; | 54 | 54 | export const createTextInstance = $$$hostConfig.createTextInstance; | 55 | 55 | export const scheduleTimeout = $$$hostConfig.scheduleTimeout; | 56 | 56 | export const cancelTimeout = $$$hostConfig.cancelTimeout; | 57 | | -export const queueMicrotask = $$$hostConfig.queueMicrotask; | | 57 | +export const scheduleMicrotask = $$$hostConfig.scheduleMicrotask; | 58 | 58 | export const noTimeout = $$$hostConfig.noTimeout; | 59 | 59 | export const now = $$$hostConfig.now; | 60 | 60 | export const isPrimaryRenderer = $$$hostConfig.isPrimaryRenderer; | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-test-renderer/src/ReactTestHostConfig.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -220,9 +220,9 @@ export const warnsIfNotActing = true; | 220 | 220 |
| 221 | 221 | export const scheduleTimeout = setTimeout; | 222 | 222 | export const cancelTimeout = clearTimeout; | 223 | | -export const queueMicrotask = | 224 | | - typeof global.queueMicrotask === 'function' | 225 | | - ? global.queueMicrotask | | 223 | +export const scheduleMicrotask = | | 224 | + typeof queueMicrotask === 'function' | | 225 | + ? queueMicrotask | 226 | 226 | : typeof Promise !== 'undefined' | 227 | 227 | ? (callback: Function) => | 228 | 228 | Promise.resolve(null) | |
|