Compare commits

...
16 Commits
Author SHA1 Message Date
Hector Ramos 93d33a3d25 Add missing PerfUtil image.
Summary:
Fixes #14202.
Closes https://github.com/facebook/react-native/pull/14211

Differential Revision: D5141377

Pulled By: hramos

fbshipit-source-id: 9a1b76e94e8b775e84988f1b4bb018e01db8fdb2
2017-07-10 15:24:49 -07:00
Mike Grabowski ac83e5fa05 [0.44.3] Bump version numbers 2017-06-06 11:19:07 +02:00
Janic DuplessisandMike Grabowski 6cee1eecbf Packager - Fix symbolicate on windows
Summary:
There was an error with packager symbolization on Windows because it looks like `allowHalfOpen: true` doesn't work properly when using named sockets. This uses a random port on localhost for the connection instead on Windows as a workaround.

**Test plan**
Tested that symbolization works on both mac and windows by triggering a warning in UIExplorer.
Closes https://github.com/facebook/react-native/pull/13828

Differential Revision: D5019537

Pulled By: davidaurelio

fbshipit-source-id: 62c5b5f270e553a7d413bb4d1bab2406380f1d4f
2017-06-06 11:18:45 +02:00
Héctor RamosandHector Ramos 648b7c9db1 Clarify pros/cons on different navigation libraries
Summary: Closes https://github.com/facebook/react-native/pull/14292

Differential Revision: D5165551

Pulled By: hramos

fbshipit-source-id: a50c1c1eb8d4e7de619b73e1baf621dc11e00abc
2017-06-02 10:20:41 -07:00
Mike Grabowski 4a32ec5b4f [0.44.2] Bump version numbers 2017-05-26 14:35:16 +02:00
Jean Lauliac 743dbb20e6 Revert "0.44.2"
This reverts commit f55d06128a. I didn't
follow the correct procedure for doing a release, so I revert this for
now.
2017-05-26 10:51:58 +01:00
Jean Lauliac f55d06128a 0.44.2 2017-05-26 10:30:24 +01:00
Jean Lauliac 319f6d10d0 packager: upgrade jest-haste-map version
Summary: This allows us to get the new fix for recovery on duplicate modules.

Reviewed By: cpojer

Differential Revision: D5128975

fbshipit-source-id: 5a2b60430bbca1806a97798c482af8522366e071
2017-05-26 10:26:06 +01:00
Mike Grabowski 5e809ba56b [0.44.1] Bump version numbers 2017-05-26 09:57:23 +02:00
Daniel ZlotinandMike Grabowski a6dfc9c406 XMLHttpRequest withCredentials defaults to "true"
Summary:
see https://github.com/facebook/react-native/issues/14063
Closes https://github.com/facebook/react-native/pull/14064

Differential Revision: D5117654

Pulled By: ericvicenti

fbshipit-source-id: 7c3d376f5251e3b28c34383c5b58658e17d6c032
2017-05-26 09:56:44 +02:00
Mike Grabowski 469638e651 [0.44.0] Bump version numbers 2017-05-01 10:22:51 +02:00
Ben RothandJames Ide 106ad8592c Protect against fatal YellowBox error when stack frame has no file
Summary:
Motivation: When viewing a stack trace in YellowBox where one or more of the stack frames has no `file`, JS will encounter the fatal error `null is not an object (evaluating 'file.split')`. This can happen, for example, when running a bundle for which no source maps were generated.
Closes https://github.com/facebook/react-native/pull/13512

Differential Revision: D4896480

Pulled By: javache

fbshipit-source-id: 202c793a47abb83a4700a5778a92b0b5828b01a3
2017-04-18 17:00:39 -07:00
Adam PerryandJames Ide 7c90b06b75 Stop yarn error message appearing for Windows users of local-cli
Summary:
On windows, recent versions of local-cli will display a yarn error to stderr when starting the packager (see https://github.com/expo/xde/issues/91, https://github.com/react-community/create-react-native-app/issues/101, https://github.com/react-community/create-react-native-app/issues/113#issuecomment-289185491 for examples of users hitting this in the wild), even though no package management action is being taken.

From what I can tell this is what happens:

* [`local-cli/util/yarn.js` does not ignore stderr on Windows](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/yarn.js#L25)
* [`local-cli/util/PackageManager.js` calls the above function when it's require'd](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/PackageManager.js#L20)

For Windows users who don't have yarn installed, this means that the 'yarn is not recognized as an internal or external command..." error displays wh
Closes https://github.com/facebook/react-native/pull/13355

Differential Revision: D4848084

Pulled By: hramos

fbshipit-source-id: f32176354e0bd7ff6d7009ea30dca64ff23ae3d5
2017-04-07 12:03:24 -07:00
Ben RothandJames Ide 1a23902c60 Fix crash in RCTRedBox::formatFrameSource:
Summary:
Motivation: Similar to https://github.com/facebook/react-native/pull/13242 - the application will crash with `[NSNull lastPathComponent]: unrecognized selector sent to instance` if a stack frame with no filename makes it to RCTRedBox.
Closes https://github.com/facebook/react-native/pull/13360

Differential Revision: D4848980

Pulled By: javache

fbshipit-source-id: dc506f2ba39c2d4d68982b56a6e765a19dc048b0
2017-04-07 12:03:18 -07:00
Janic DuplessisandJames Ide 8c99cc43de Remove unused react-addons dependencies 2017-04-04 20:33:38 -07:00
Mike Grabowski ae47e356f6 [0.44.0-rc.0] Bump version numbers 2017-04-03 17:11:21 +02:00
14 changed files with 76 additions and 38 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) {
status: number = 0;
timeout: number = 0;
responseURL: ?string;
withCredentials: boolean = false
withCredentials: boolean = true
upload: XMLHttpRequestEventTarget = new XMLHttpRequestEventTarget();
+7 -2
View File
@@ -191,8 +191,13 @@ const StackRow = ({frame}: StackRowProps) => {
const Text = require('Text');
const TouchableHighlight = require('TouchableHighlight');
const {file, lineNumber} = frame;
const fileParts = file.split('/');
const fileName = fileParts[fileParts.length - 1];
let fileName;
if (file) {
const fileParts = file.split('/');
fileName = fileParts[fileParts.length - 1];
} else {
fileName = '<unknown file>';
}
return (
<TouchableHighlight
+2 -1
View File
@@ -185,8 +185,9 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
- (NSString *)formatFrameSource:(RCTJSStackFrame *)stackFrame
{
NSString *fileName = RCTNilIfNull(stackFrame.file) ? [stackFrame.file lastPathComponent] : @"<unknown file>";
NSString *lineInfo = [NSString stringWithFormat:@"%@:%zd",
[stackFrame.file lastPathComponent],
fileName,
stackFrame.lineNumber];
if (stackFrame.column != 0) {
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.44.3
GROUP=com.facebook.react
POM_NAME=ReactNative
+4 -2
View File
@@ -8,9 +8,11 @@ next: images
previous: animations
---
This guide covers the various navigation components available in React Native. If you are just getting started with navigation, you will probably want to use React Navigation.
This guide covers the various navigation components available in React Native. If you are just getting started with navigation, you will probably want to use [React Navigation](docs/navigation.html#react-navigation). React Navigation provides an easy to use navigation solution, with the ability to present common stack navigation and tabbed navigation patterns on both iOS and Android. As this is a JavaScript implementation, it provides the greatest amount of configurability as well as flexibility when integrating with state management libraries such as [redux](https://reactnavigation.org/docs/guides/redux).
If you are only targeting iOS and would like to stick to the native look and feel, check out `NavigatorIOS`. The `Navigator` component is older but has been thoroughly tested in production.
If you're only targeting iOS, you may want to also check out [NavigatorIOS](docs/navigation.html#navigatorios) as a way of providing a native look and feel with minimal configuration, as it provides a wrapper around the native `UINavigationController` class. This component will not work on Android, however.
If you'd like to achieve a native look and feel on both iOS and Android, or you're integrating React Native into an app that already manages navigation natively, the following libraries provide native navigation on both platforms: [native-navigation](http://airbnb.io/native-navigation/), [react-native-navigation](https://github.com/wix/react-native-navigation).
## React Navigation
+5 -5
View File
@@ -15,11 +15,6 @@ const spawnOpts = {
stdin: 'inherit',
};
const projectDir = process.cwd();
const isYarnAvailable =
yarn.getYarnVersionIfAvailable() &&
yarn.isGlobalCliUsingYarn(projectDir);
/**
* Execute npm or yarn command
*
@@ -30,6 +25,11 @@ const isYarnAvailable =
function callYarnOrNpm(yarnCommand, npmCommand) {
let command;
const projectDir = process.cwd();
const isYarnAvailable =
yarn.getYarnVersionIfAvailable() &&
yarn.isGlobalCliUsingYarn(projectDir);
if (isYarnAvailable) {
command = yarnCommand;
} else {
+3 -5
View File
@@ -21,11 +21,9 @@ function getYarnVersionIfAvailable() {
let yarnVersion;
try {
// execSync returns a Buffer -> convert to string
if (process.platform.startsWith('win')) {
yarnVersion = (execSync('yarn --version').toString() || '').trim();
} else {
yarnVersion = (execSync('yarn --version 2>/dev/null').toString() || '').trim();
}
yarnVersion = (execSync('yarn --version', {
stdio: [ 0, 'pipe', 'ignore', ]
}).toString() || '').trim();
} catch (error) {
return null;
}
+3 -6
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.44.3",
"description": "A framework for building native apps using React",
"license": "BSD-3-Clause",
"repository": {
@@ -170,7 +170,7 @@
"immutable": "~3.7.6",
"imurmurhash": "^0.1.4",
"inquirer": "^0.12.0",
"jest-haste-map": "19.0.0",
"jest-haste-map": "^20.0.4",
"joi": "^6.6.1",
"json-stable-stringify": "^1.0.1",
"json5": "^0.4.0",
@@ -187,9 +187,6 @@
"plist": "^1.2.0",
"pretty-format": "^4.2.1",
"promise": "^7.1.1",
"react-addons-create-fragment": "15.5.0-alpha.0",
"react-addons-pure-render-mixin": "15.5.0-alpha.0",
"react-addons-shallow-compare": "15.5.0-alpha.0",
"react-clone-referenced-element": "^1.0.1",
"react-devtools-core": "^2.0.8",
"react-timer-mixin": "^0.13.2",
@@ -233,4 +230,4 @@
"shelljs": "0.6.0",
"sinon": "^2.0.0-pre.2"
}
}
}
+1 -1
View File
@@ -25,7 +25,7 @@
"graceful-fs": "^4.1.3",
"image-size": "^0.3.5",
"imurmurhash": "^0.1.4",
"jest-haste-map": "18.0.0",
"jest-haste-map": "^20.0.4",
"joi": "^6.6.1",
"json-stable-stringify": "^1.0.1",
"json5": "^0.4.0",
@@ -30,7 +30,11 @@ const affixes = {prefix: 'metro-bundler-symbolicate', suffix: '.sock'};
const childPath = require.resolve('./worker');
exports.createWorker = (): Symbolicate => {
const socket = xpipe.eq(temp.path(affixes));
// There are issues with named sockets on windows that cause the connection to
// close too early so run the symbolicate server on a random localhost port.
const socket = process.platform === 'win32'
? 34712
: xpipe.eq(temp.path(affixes));
const child = new LockingPromise(new LazyPromise(() => startupChild(socket)));
return (stack, sourceMaps) =>
@@ -53,6 +57,7 @@ function startupChild(socket) {
child.removeAllListeners();
resolve(child);
});
// $FlowFixMe ChildProcess.send should accept any type.
child.send(socket);
});
}
@@ -5182,7 +5182,7 @@ describe('DependencyGraph', function() {
});
});
it('should recover from multiple modules with the same name (but this is broken right now)', async () => {
it('should recover from multiple modules with the same name', async () => {
const root = '/root';
console.warn = jest.fn();
const filesystem = setMockFileSystem({
@@ -5231,17 +5231,11 @@ describe('DependencyGraph', function() {
await triggerAndProcessWatchEvent(dgraph, 'change', root + '/b.js');
}
// This verifies that it is broken right now. Instead of throwing it should
// return correct results. Once this is fixed in `jest-haste`, remove
// the whole try catch and verify results are matching a snapshot.
try {
await getOrderedDependenciesAsJSON(dgraph, root + '/index.js');
throw new Error('expected `getOrderedDependenciesAsJSON` to fail');
} catch (error) {
if (error.type !== 'UnableToResolveError') {
throw error;
}
}
const deps = await getOrderedDependenciesAsJSON(
dgraph,
root + '/index.js',
);
expect(deps).toMatchSnapshot();
});
});
@@ -0,0 +1,36 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`DependencyGraph file watch updating should recover from multiple modules with the same name 1`] = `
Array [
Object {
"dependencies": Array [
"a",
"b",
],
"id": "index",
"isAsset": false,
"isJSON": false,
"isPolyfill": false,
"path": "/root/index.js",
"resolution": undefined,
},
Object {
"dependencies": Array [],
"id": "a",
"isAsset": false,
"isJSON": false,
"isPolyfill": false,
"path": "/root/a.js",
"resolution": undefined,
},
Object {
"dependencies": Array [],
"id": "b",
"isAsset": false,
"isJSON": false,
"isPolyfill": false,
"path": "/root/b.js",
"resolution": undefined,
},
]
`;
+1 -1
View File
@@ -103,7 +103,7 @@ class DependencyGraph extends EventEmitter {
return new JestHasteMap({
extensions: opts.extensions.concat(opts.assetExts),
forceNodeFilesystemAPI: opts.forceNodeFilesystemAPI,
ignorePattern: {test: opts.ignoreFilePath},
ignorePattern: opts.ignoreFilePath,
maxWorkers: opts.maxWorkerCount,
mocksPattern: '',
name: 'react-native-packager-' + JEST_HASTE_MAP_CACHE_BREAKER,
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB