Created
February 28, 2018 20:01
-
-
Save jamesreggio/aeab3854fa11a64e4e1b8de82ecfe2b1 to your computer and use it in GitHub Desktop.
Patch for [email protected] to support Babel 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patch-package | |
--- a/node_modules/react-native/Libraries/Alert/AlertIOS.js | |
+++ b/node_modules/react-native/Libraries/Alert/AlertIOS.js | |
@@ -122,11 +122,11 @@ class AlertIOS { | |
'keyboardType) and the old syntax will be removed in a future version.'); | |
var callback = type; | |
- var defaultValue = message; | |
+ var _defaultValue = message; | |
RCTAlertManager.alertWithArgs({ | |
title: title || '', | |
type: 'plain-text', | |
- defaultValue, | |
+ _defaultValue, | |
}, (id, value) => { | |
callback(value); | |
}); | |
--- a/node_modules/react-native/Libraries/Core/Timers/JSTimers.js | |
+++ b/node_modules/react-native/Libraries/Core/Timers/JSTimers.js | |
@@ -247,7 +247,7 @@ const JSTimers = { | |
setTimeout: function( | |
func: Function, | |
duration: number, | |
- ...args?: any | |
+ ...args: any | |
): number { | |
if (__DEV__ && IS_ANDROID && duration > MAX_TIMER_DURATION_MS) { | |
console.warn( | |
@@ -273,7 +273,7 @@ const JSTimers = { | |
setInterval: function( | |
func: Function, | |
duration: number, | |
- ...args?: any | |
+ ...args: any | |
): number { | |
if (__DEV__ && IS_ANDROID && duration > MAX_TIMER_DURATION_MS) { | |
console.warn( | |
@@ -296,7 +296,7 @@ const JSTimers = { | |
* @param {function} func Callback to be invoked before the end of the | |
* current JavaScript execution loop. | |
*/ | |
- setImmediate: function(func: Function, ...args?: any) { | |
+ setImmediate: function(func: Function, ...args: any) { | |
const id = _allocateCallback( | |
() => func.apply(undefined, args), | |
'setImmediate', | |
--- a/node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js | |
+++ b/node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js | |
@@ -3729,9 +3729,9 @@ function getComponentName(fiber) { | |
} | |
// Re-export dynamic flags from the fbsource version. | |
-var _require = require("ReactFeatureFlags"); | |
+var featureFlags = require("ReactFeatureFlags"); | |
-var debugRenderPhaseSideEffects = _require.debugRenderPhaseSideEffects; | |
+var debugRenderPhaseSideEffects = featureFlags.debugRenderPhaseSideEffects; | |
var enableAsyncSubtreeAPI = true; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment