Compare commits

...
6 Commits
Author SHA1 Message Date
Mike Grabowski 469638e651 [0.44.0] Bump version numbers 2017-05-01 10:22:51 +02:00
Ben Roth 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 Perry 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 Roth 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 Duplessis 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
6 changed files with 20 additions and 19 deletions
+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.0
GROUP=com.facebook.react
POM_NAME=ReactNative
+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;
}
+2 -5
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.44.0",
"description": "A framework for building native apps using React",
"license": "BSD-3-Clause",
"repository": {
@@ -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"
}
}
}