Skip to content

Commit c452063

Browse files
committed
upgrade to React Native 0.16.0
1 parent 488f824 commit c452063

File tree

7 files changed

+53
-26
lines changed

7 files changed

+53
-26
lines changed

.flowconfig

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,24 @@
77
# Some modules have their own node_modules with overlap
88
.*/node_modules/node-haste/.*
99

10-
# Ignore react-tools where there are overlaps, but don't ignore anything that
11-
# react-native relies on
12-
.*/node_modules/react-tools/src/React.js
13-
.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
14-
.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
15-
.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
16-
10+
# Ugh
11+
.*/node_modules/babel.*
12+
.*/node_modules/babylon.*
13+
.*/node_modules/invariant.*
14+
15+
# Ignore react and fbjs where there are overlaps, but don't ignore
16+
# anything that react-native relies on
17+
.*/node_modules/fbjs-haste/.*/__tests__/.*
18+
.*/node_modules/fbjs-haste/__forks__/Map.js
19+
.*/node_modules/fbjs-haste/__forks__/Promise.js
20+
.*/node_modules/fbjs-haste/__forks__/fetch.js
21+
.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js
22+
.*/node_modules/fbjs-haste/core/isEmpty.js
23+
.*/node_modules/fbjs-haste/crypto/crc32.js
24+
.*/node_modules/fbjs-haste/stubs/ErrorUtils.js
25+
.*/node_modules/react-haste/React.js
26+
.*/node_modules/react-haste/renderers/dom/ReactDOM.js
27+
.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
1728

1829
# Ignore commoner tests
1930
.*/node_modules/commoner/test/.*
@@ -22,7 +33,10 @@
2233
.*/react-tools/node_modules/commoner/lib/reader.js
2334

2435
# Ignore jest
25-
.*/react-native/node_modules/jest-cli/.*
36+
.*/node_modules/jest-cli/.*
37+
38+
# Ignore Website
39+
.*/website/.*
2640

2741
[include]
2842

@@ -34,13 +48,16 @@ module.system=haste
3448

3549
munge_underscores=true
3650

51+
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
52+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub'
53+
3754
suppress_type=$FlowIssue
3855
suppress_type=$FlowFixMe
3956
suppress_type=$FixMe
4057

41-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
42-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
58+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
59+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
4360
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4461

4562
[version]
46-
0.14.0
63+
0.18.1

.gitignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,18 @@ DerivedData
2121
*.ipa
2222
*.xcuserstate
2323
project.xcworkspace
24-
Pods
24+
25+
# Android/IJ
26+
#
27+
.idea
28+
.gradle
29+
local.properties
2530

2631
# node.js
2732
#
2833
node_modules/
2934
npm-debug.log
3035

31-
/testbuild
36+
# Custom
37+
Pods
38+
/testbuild

App/Navigation/NavigationBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var {
88

99
var cssVar = require('../Lib/cssVar');
1010

11-
var NavigatorNavigationBarStyles = require('NavigatorNavigationBarStyles');
11+
var NavigatorNavigationBarStyles = require('../Platform/NavigatorNavigationBarStyles');
1212
var NavigationBarRouteMapper = require('../Navigation/NavigationBarRouteMapper');
1313

1414
var stacksEqual = function(one, two, length) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('NavigatorNavigationBarStylesIOS');

ios/Sample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381
13B07F8C1A680F5B00A75B9A /* Frameworks */,
382382
13B07F8E1A680F5B00A75B9A /* Resources */,
383383
DF35A678DD70FEB3ABFDEA69 /* Copy Pods Resources */,
384-
D32D268A1BD4AFC8007753B2 /* ShellScript */,
384+
D32D268A1BD4AFC8007753B2 /* Bundle React Native code and images */,
385385
B91827D077A8C198AC93F32E /* Embed Pods Frameworks */,
386386
);
387387
buildRules = (
@@ -601,18 +601,19 @@
601601
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
602602
showEnvVarsInLog = 0;
603603
};
604-
D32D268A1BD4AFC8007753B2 /* ShellScript */ = {
604+
D32D268A1BD4AFC8007753B2 /* Bundle React Native code and images */ = {
605605
isa = PBXShellScriptBuildPhase;
606606
buildActionMask = 2147483647;
607607
files = (
608608
);
609609
inputPaths = (
610610
);
611+
name = "Bundle React Native code and images";
611612
outputPaths = (
612613
);
613614
runOnlyForDeploymentPostprocessing = 0;
614615
shellPath = /bin/sh;
615-
shellScript = "if [ \"${PLATFORM_NAME}\" != \"iphonesimulator\" ]; then\n source ~/.nvm/nvm.sh\n cd ${PROJECT_DIR}/.. && react-native bundle --minify\nfi";
616+
shellScript = "if [ \"${CONFIGURATION}\" == \"Debug\" ]\nthen\nBUNDLECONFIG=Debug\nelse\nBUNDLECONFIG=Release\nrm -rf $TMPDIR/react-*\nfi\n\nCONFIGURATION=$BUNDLECONFIG ../node_modules/react-native/packager/react-native-xcode.sh";
616617
};
617618
DF35A678DD70FEB3ABFDEA69 /* Copy Pods Resources */ = {
618619
isa = PBXShellScriptBuildPhase;

ios/Sample/AppDelegate.m

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,23 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4747

4848

4949
#ifdef TEST_ENVIRONMENT
50-
jsCodeLocation = [NSURL URLWithString:@"http://localhost:9091/index.ios.bundle?platform=ios"];
50+
// different port
51+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8082/index.ios.bundle?platform=ios&dev=true"];
5152
#else
52-
#if TARGET_IPHONE_SIMULATOR
53-
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"];
54-
#else
55-
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
56-
#endif
53+
#if TARGET_IPHONE_SIMULATOR
54+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
55+
#else
56+
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
57+
#endif
5758
#endif
5859

5960
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
6061
moduleName:@"Sample"
6162
initialProperties:nil
6263
launchOptions:launchOptions];
63-
64+
6465
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
65-
UIViewController *rootViewController = [[UIViewController alloc] init];
66+
UIViewController *rootViewController = [UIViewController new];
6667
rootViewController.view = rootView;
6768
self.window.rootViewController = rootViewController;
6869
[self.window makeKeyAndVisible];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Sample",
2+
"name": "ReactNativeSampleApp",
33
"version": "0.0.1",
44
"private": true,
55
"scripts": {

0 commit comments

Comments
 (0)