Compare commits

...
Author SHA1 Message Date
Héctor Ramos 8b7323c419 [Website] Load React Native Web Player from MaxCDN. 2016-09-23 15:43:32 -07:00
Konstantin Raev 7a1410aca6 [0.32.1] Bump version numbers 2016-09-07 11:31:45 +01:00
Pieter De BaetsandKonstantin Raev 3a3ecc40d5 Make sure layout happens after setFrame:forView:
Reviewed By: majak

Differential Revision: D3682745

fbshipit-source-id: 108ff292aa79765d8e5bb7fc364717eba662c0ea
2016-09-07 11:31:08 +01:00
Konstantin Raev e72181447e Fixes paths to robolectric when they are downloaded from maven into buck-out
Reviewed By: mmmulani

Differential Revision: D3751888

fbshipit-source-id: 2a70e8655f3c6e6dcc2de17e85289d9db18a2699
2016-08-25 13:50:51 +01:00
Mike Grabowski 96877a0e68 [0.32.0] Bump version numbers 2016-08-25 12:55:00 +02:00
Mike Grabowski fa660c6392 Revert "[0.32.0] Bump version numbers"
This reverts commit ff1c6f98b1.
2016-08-25 12:54:38 +02:00
Mike Grabowski 37a05edbd2 Bring back missing android command
Summary:
Fixes #9312

(Sorry for inconvenience, could've been removed by mistake!)

Bonus: projectName can be configured rather than always defaulting to package.json name, not sure if helpful, but just added it since we have a `default` function that makes sense in this case.
Closes https://github.com/facebook/react-native/pull/9525

Differential Revision: D3753610

Pulled By: bestander

fbshipit-source-id: 641872855b9865502f4055910262686edc4b504e
2016-08-25 12:44:46 +02:00
Alexander BlomandMike Grabowski 2a5c9a1d89 Don't clear queue in ProxyExecutor
Reviewed By: mhorowitz

Differential Revision: D3757216

fbshipit-source-id: 5adda2dcdfb438b65fe668c52e0d2e35705eed9f
2016-08-25 12:44:20 +02:00
Mike Grabowski ff1c6f98b1 [0.32.0] Bump version numbers 2016-08-21 11:40:21 +02:00
Pieter De BaetsandMike Grabowski 4f5fe812d2 Have React only as a peer dependency
Reviewed By: davidaurelio

Differential Revision: D3683793

fbshipit-source-id: 6ffb8c24e81cfb33b11b9f99d440220287161fb6
2016-08-21 11:38:05 +02:00
Pieter De BaetsandMike Grabowski 0d5fa74c1c Specify React dependency correctly
fbshipit-source-id: c25ad1b942e75d9a631134fc277306931c7bc859
2016-08-21 11:38:01 +02:00
Pieter De BaetsandMike Grabowski 01c78be640 Unbreak upgrade to React 15.3.0
fbshipit-source-id: 0373b4dd11895f3b1c76a904a0a59b70aaa845f9
2016-08-21 11:37:55 +02:00
James IdeandMike Grabowski be921792cc Use React 15.3.0 instead of 15.3.0-rc.2
Summary:
React 15.3.0 was officially released. We especially should try not depend on RCs in RN releases and npm doesn't handle RC versions well.
Closes https://github.com/facebook/react-native/pull/9279

Differential Revision: D3683587

fbshipit-source-id: fc4f8a030769232b7697434a419e1e07e482e308
2016-08-21 11:37:50 +02:00
Geoffrey GohandMike Grabowski c732ca4a95 Fix params patch
Summary:
`this` is a `ReactNativeHost` post RN 0.29, so the current patch doesn't compile. Simply `getResources()` will work for all versions - Post RN 0.29, it will be the method in the outer `MainApplication`, Pre RN 0.29, it will be the method on the `MainActivity`.

grabbou Kureev
Closes https://github.com/facebook/react-native/pull/9381

Differential Revision: D3744162

fbshipit-source-id: 1fa270bb3268b7b40c6160da948d99ff993c83b1
2016-08-21 11:34:00 +02:00
Geoffrey GohandMike Grabowski a76dbc50f5 Should be R.string, not R.strings
Summary:
Fix regression of https://github.com/rnpm/rnpm-plugin-link/pull/88.
Closes https://github.com/facebook/react-native/pull/9252

Differential Revision: D3680785

fbshipit-source-id: a6ea63295ae8f61b17c0a1b2ca5e6a5f5da7437a
2016-08-21 11:33:41 +02:00
Mike Grabowski b00f70033a [0.32.0-rc.0] Bump version numbers 2016-08-05 12:16:37 +03:00
12 changed files with 103 additions and 19 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[ignore]
# We fork some components by platform.
.*/*.android.js
.*/*[.]android.js
# Ignore templates with `@flow` in header
.*/local-cli/generator.*
+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.32.1"
s.summary = package['description']
s.description = <<-DESC
React Native apps are built using the React JS
+9 -3
View File
@@ -232,7 +232,7 @@ RCT_EXPORT_MODULE()
dispatch_async(RCTGetUIManagerQueue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:RCTUIManagerWillUpdateViewsDueToContentSizeMultiplierChangeNotification
object:self];
[self batchDidComplete];
[self setNeedsLayout];
});
}
@@ -424,8 +424,10 @@ dispatch_queue_t RCTGetUIManagerQueue(void)
RCTShadowView *shadowView = self->_shadowViewRegistry[reactTag];
RCTAssert(shadowView != nil, @"Could not locate shadow view with tag #%@", reactTag);
BOOL needsLayout = NO;
if (!CGRectEqualToRect(frame, shadowView.frame)) {
shadowView.frame = frame;
needsLayout = YES;
}
// Trigger re-layout when size flexibility changes, as the root view might grow or
@@ -434,9 +436,13 @@ dispatch_queue_t RCTGetUIManagerQueue(void)
RCTRootShadowView *rootShadowView = (RCTRootShadowView *)shadowView;
if (rootShadowView.sizeFlexibility != sizeFlexibility) {
rootShadowView.sizeFlexibility = sizeFlexibility;
[self batchDidComplete];
needsLayout = YES;
}
}
if (needsLayout) {
[self setNeedsLayout];
}
});
}
@@ -451,7 +457,7 @@ dispatch_queue_t RCTGetUIManagerQueue(void)
shadowView.intrinsicContentSize = size;
[self batchDidComplete];
[self setNeedsLayout];
});
}
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.32.1
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -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',
)
+32
View File
@@ -0,0 +1,32 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
var generate = require('../generate/generate');
var fs = require('fs');
function android(argv, config, args) {
return generate([
'--platform', 'android',
'--project-path', process.cwd(),
'--project-name', args.projectName,
], config);
}
module.exports = {
name: 'android',
description: 'creates an empty android project',
func: android,
options: [{
command: '--project-name [name]',
default: () => JSON.parse(
fs.readFileSync('package.json', 'utf8')
).name,
}],
};
+1
View File
@@ -31,6 +31,7 @@ export type Command = {
};
const documentedCommands = [
require('./android/android'),
require('./server/server'),
require('./runIOS/runIOS'),
require('./runAndroid/runAndroid'),
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
jest.autoMockOff();
@@ -8,7 +17,7 @@ describe('applyParams', () => {
it('apply params to the string', () => {
expect(
applyParams('${foo}', {foo: 'foo'}, 'react-native')
).toEqual('this.getResources().getString(R.strings.reactNative_foo)');
).toEqual('getResources().getString(R.string.reactNative_foo)');
});
it('use null if no params provided', () => {
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
const toCamelCase = require('lodash').camelCase;
module.exports = function applyParams(str, params, prefix) {
@@ -7,7 +16,7 @@ module.exports = function applyParams(str, params, prefix) {
const name = toCamelCase(prefix) + '_' + param;
return params[param]
? `this.getResources().getString(R.strings.${name})`
? `getResources().getString(R.string.${name})`
: null;
}
);
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.32.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.0-rc.2"
"react": "~15.3.0"
},
"dependencies": {
"absolute-path": "^0.0.0",
@@ -207,7 +207,7 @@
"jest-runtime": "~14.1.0",
"mock-fs": "^3.11.0",
"portfinder": "0.4.0",
"react": "~15.3.0-rc.2",
"react": "~15.3.0",
"shelljs": "0.6.0"
}
}
}
+2 -2
View File
@@ -12,7 +12,7 @@
var React = require('React');
var Prism = require('Prism');
var WEB_PLAYER_VERSION = '1.1.0';
var WEB_PLAYER_VERSION = '1.2.4';
/**
* Use the WebPlayer by including a ```ReactNativeWebPlayer``` block in markdown.
@@ -59,7 +59,7 @@ var WebPlayer = React.createClass({
style={{marginTop: 4}}
width='880'
height={this.parseParams(this.props.params).platform === 'android' ? '425' : '420'}
data-src={`//npmcdn.com/react-native-web-player@${WEB_PLAYER_VERSION}/index.html${hash}`}
data-src={`//cdn.rawgit.com/dabbott/react-native-web-player/gh-v${WEB_PLAYER_VERSION}/index.html${hash}`}
frameBorder='0'
/>
</div>