Compare commits

...
12 Commits
Author SHA1 Message Date
Konstantin Raev 620ecbde6e [0.33.1] Bump version numbers 2016-09-23 12:08:50 +01:00
David AurelioandKonstantin Raev 42e73d893f throwing for unresolved modules: flip logic
Summary:
The current test checks whether the target platform is `'ios'`. When building with windows, errors will also be swallowed silently.

This adds a check whether the target platform is `'android'`, where we have to avoid throwing for FB-internal reasons.

Reviewed By: martinbigio

Differential Revision: D3907025

fbshipit-source-id: 5abeb06b9121265fe1aa3932ad1785f148f04ddf
2016-09-23 12:07:54 +01:00
Mike Grabowski c18d1dfd7d [0.33.0] Bump version numbers 2016-09-09 14:58:29 +02:00
James Ide d7241975c4 [React] Change React version to 15.3.1 (no more RC)
React 15.3.1 has been published; stop using the RC.
2016-09-06 22:42:30 -07:00
James Ide 4be85575c0 [0.33.0-rc.1] Bump version numbers 2016-09-06 12:36:04 -07:00
Andrei ComanandJames Ide 4f070e8b64 Fix TextInput contentSize
Summary:
This fixes some inaccuracies in our reporting of textinput's contentsize.
First, we were not using the correct padding info. Then, we are converting the
contentSize width and height to ints right before sending
them over to JS. This adds some inaccuracy with the textinput behaviour,
especially in the case of auto expending text inputs, since those same sizes are
then sent right back.

Reviewed By: astreet

Differential Revision: D3806008

fbshipit-source-id: 7e32f91fde50099fd8a122833fd0042683e68df1
2016-09-06 10:58:56 -07:00
makeeandJames Ide dafe9fc24e remove incorrect __unused modifier
Summary:
the `update` argument was used below
Closes https://github.com/facebook/react-native/pull/9753

Differential Revision: D3820510

fbshipit-source-id: 8cad707a9cd4887c7ee07fe960b1f918761e64c5
2016-09-06 10:58:42 -07:00
Konstantin Raev 5e8b95c815 Fixes paths to robolectric when they are downloaded from maven into buck-out
Reviewed By: mmmulani

Differential Revision: D3751888

fbshipit-source-id: 2a70e8655f3c6e6dcc2de17e85289d9db18a2699
2016-09-06 12:25:16 +01:00
Jake MurzyandJames Ide be8c9b8d23 fix NativeAnimated event listener bug
Summary:
This bugfix cleans up reference to value listener upon unsubscribing to native events ultimately preventing RCTEventEmitter from throwing a [listener count error](https://github.com/facebook/react-native/blob/v0.33.0-rc.0/React/Modules/RCTEventEmitter.m#L90):

`Attempted to remove more RCTNativeAnimatedModule listeners than added`

/cc janicduplessis sahrens

🍺
Closes https://github.com/facebook/react-native/pull/9729

Differential Revision: D3818241

Pulled By: sahrens

fbshipit-source-id: e235e3f97534ef2a50df29877ce36d3b6095237e
2016-09-05 23:42:08 -07:00
Pieter De BaetsandJames Ide 7de770abda Fix crash in RCTJSStackFrame
Reviewed By: mmmulani

Differential Revision: D3776330

fbshipit-source-id: 0e9126825e86dd7c124bc22341ab3b39b1bd3e0b
2016-09-05 23:40:16 -07:00
Alexander BlomandJames Ide 5501869e3a Don't clear queue in ProxyExecutor
Reviewed By: mhorowitz

Differential Revision: D3757216

fbshipit-source-id: 5adda2dcdfb438b65fe668c52e0d2e35705eed9f
2016-09-05 23:40:06 -07:00
Mike Grabowski fadd5dc98b [0.33.0-rc.0] Bump version numbers 2016-08-21 11:27:16 +02:00
12 changed files with 60 additions and 32 deletions
@@ -788,6 +788,7 @@ class AnimatedValue extends AnimatedWithChildren {
}
this.__nativeAnimatedValueListener.remove();
this.__nativeAnimatedValueListener = null;
NativeAnimatedAPI.stopListeningToAnimatedNodeValue(this.__getNativeTag());
}
+1 -1
View File
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = "React"
s.version = package['version']
s.version = "0.33.1"
s.summary = package['description']
s.description = <<-DESC
React Native apps are built using the React JS
+6 -6
View File
@@ -9,7 +9,7 @@
#import "RCTJSStackFrame.h"
#import "RCTLog.h"
#import "RCTUtils.h"
static NSRegularExpression *RCTJSStackFrameRegex()
{
@@ -41,11 +41,11 @@ static NSRegularExpression *RCTJSStackFrameRegex()
- (NSDictionary *)toDictionary
{
return @{
@"methodName": self.methodName,
@"file": self.file,
@"lineNumber": @(self.lineNumber),
@"column": @(self.column)
};
@"methodName": RCTNullIfNil(self.methodName),
@"file": RCTNullIfNil(self.file),
@"lineNumber": @(self.lineNumber),
@"column": @(self.column)
};
}
+ (instancetype)stackFrameWithLine:(NSString *)line
+1 -1
View File
@@ -175,7 +175,7 @@ RCT_EXPORT_MODULE()
return _sendIdleEvents || _timers.count > 0;
}
- (void)didUpdateFrame:(__unused RCTFrameUpdate *)update
- (void)didUpdateFrame:(RCTFrameUpdate *)update
{
NSDate *nextScheduledTarget = [NSDate distantFuture];
NSMutableArray<NSNumber *> *timersToCall = [NSMutableArray new];
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.33.1
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -21,13 +21,13 @@ public class ReactContentSizeChangedEvent extends Event<ReactTextChangedEvent> {
public static final String EVENT_NAME = "topContentSizeChange";
private int mContentWidth;
private int mContentHeight;
private float mContentWidth;
private float mContentHeight;
public ReactContentSizeChangedEvent(
int viewId,
int contentSizeWidth,
int contentSizeHeight) {
float contentSizeWidth,
float contentSizeHeight) {
super(viewId);
mContentWidth = contentSizeWidth;
mContentHeight = contentSizeHeight;
@@ -23,15 +23,15 @@ public class ReactTextChangedEvent extends Event<ReactTextChangedEvent> {
public static final String EVENT_NAME = "topChange";
private String mText;
private int mContentWidth;
private int mContentHeight;
private float mContentWidth;
private float mContentHeight;
private int mEventCount;
public ReactTextChangedEvent(
int viewId,
String text,
int contentSizeWidth,
int contentSizeHeight,
float contentSizeWidth,
float contentSizeHeight,
int eventCount) {
super(viewId);
mText = text;
@@ -578,8 +578,8 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
new ReactTextChangedEvent(
mEditText.getId(),
s.toString(),
(int) PixelUtil.toDIPFromPixel(contentWidth),
(int) PixelUtil.toDIPFromPixel(contentHeight),
PixelUtil.toDIPFromPixel(contentWidth),
PixelUtil.toDIPFromPixel(contentHeight),
mEditText.incrementAndGetEventCounter()));
mEventDispatcher.dispatchEvent(
@@ -671,7 +671,7 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
contentWidth = mEditText.getCompoundPaddingLeft() + mEditText.getLayout().getWidth() +
mEditText.getCompoundPaddingRight();
contentHeight = mEditText.getCompoundPaddingTop() + mEditText.getLayout().getHeight() +
mEditText.getCompoundPaddingTop();
mEditText.getCompoundPaddingBottom();
}
if (contentWidth != mPreviousContentWidth || contentHeight != mPreviousContentHeight) {
@@ -681,8 +681,8 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
mEventDispatcher.dispatchEvent(
new ReactContentSizeChangedEvent(
mEditText.getId(),
(int) PixelUtil.toDIPFromPixel(contentWidth),
(int) PixelUtil.toDIPFromPixel(contentHeight)));
PixelUtil.toDIPFromPixel(contentWidth),
PixelUtil.toDIPFromPixel(contentHeight)));
}
}
}
@@ -78,7 +78,8 @@ void ProxyExecutor::loadApplicationScript(
loadApplicationScript(
m_executor.get(),
jni::make_jstring(sourceURL).get());
executeJSCallWithProxy(m_executor.get(), "flushedQueue", std::vector<folly::dynamic>());
// We can get pending calls here to native but the queue will be drained when
// we launch the application.
}
void ProxyExecutor::setJSModulesUnbundle(std::unique_ptr<JSModulesUnbundle>) {
@@ -110,8 +110,16 @@ prebuilt_jar(
visibility = ['//ReactAndroid/...',],
)
remote_file(
# This new rule will make the .jar file appear in the "right" location,
# though that may change in the future
export_file(
name = 'robolectric-android-all-binary-jar',
src = ':robolectric-android-all-binary-remote-jar',
out = 'android-all-4.1.2_r1-robolectric-0.jar', # name defines filename used by robolectric in runtime
)
remote_file(
name = 'robolectric-android-all-binary-remote-jar',
url = 'mvn:org.robolectric:android-all:jar:4.1.2_r1-robolectric-0',
sha1 = 'aecc8ce5119a25fcea1cdf8285469c9d1261a352',
)
@@ -122,8 +130,14 @@ prebuilt_jar(
visibility = ['//ReactAndroid/...',],
)
remote_file(
export_file(
name = 'json-jar',
src = ':json-remote-jar',
out = 'json-20080701.jar', # name defines filename used by robolectric in runtime
)
remote_file(
name = 'json-remote-jar',
url = 'mvn:org.json:json:jar:20080701',
sha1 = 'd652f102185530c93b66158b1859f35d45687258',
)
@@ -134,8 +148,14 @@ prebuilt_jar(
visibility = ['//ReactAndroid/...',],
)
remote_file(
export_file(
name = 'tagsoup-jar',
src = ':tagsoup-remote-jar',
out = 'tagsoup-1.2.jar', # name defines filename used by robolectric in runtime
)
remote_file(
name = 'tagsoup-remote-jar',
url = 'mvn:org.ccil.cowan.tagsoup:tagsoup:jar:1.2',
sha1 = '639fd364750d7363c85797dc944b4a80f78fa684',
)
@@ -146,8 +166,14 @@ prebuilt_jar(
visibility = ['//ReactAndroid/...',],
)
remote_file(
export_file(
name = 'robolectric-shadows-binary-jar',
src = ':robolectric-shadows-binary-remote-jar',
out = 'shadows-core-3.0-16.jar', # name defines filename used by robolectric in runtime
)
remote_file(
name = 'robolectric-shadows-binary-remote-jar',
url = 'https://repo1.maven.org/maven2/org/robolectric/shadows-core/3.0/shadows-core-3.0-16.jar',
sha1 = '39d7a856bf91640b1a6d044333336a2b3f3c198f',
)
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.33.1",
"description": "A framework for building native apps using React",
"license": "BSD-3-Clause",
"repository": {
@@ -124,7 +124,7 @@
"react-native": "local-cli/wrong-react-native.js"
},
"peerDependencies": {
"react": "15.3.1-rc.2"
"react": "~15.3.1"
},
"dependencies": {
"absolute-path": "^0.0.0",
@@ -208,7 +208,7 @@
"jest-runtime": "~14.1.0",
"mock-fs": "^3.11.0",
"portfinder": "0.4.0",
"react": "15.3.1-rc.2",
"react": "~15.3.1",
"shelljs": "0.6.0"
}
}
}
+1 -1
View File
@@ -105,7 +105,7 @@ class Resolver {
preferNativePlatform: true,
fileWatcher: opts.fileWatcher,
cache: opts.cache,
shouldThrowOnUnresolvedErrors: (_, platform) => platform === 'ios',
shouldThrowOnUnresolvedErrors: (_, platform) => platform !== 'android',
transformCode: opts.transformCode,
extraNodeModules: opts.extraNodeModules,
assetDependencies: ['react-native/Libraries/Image/AssetRegistry'],