Skip to content

Commit 199ffe8

Browse files
author
Daniel Figueiredo
authored
Merge pull request rangle#5 from danielfigueiredo/chore-updating-from-facebook
Chore updating from facebook
2 parents 15a7b22 + b785f95 commit 199ffe8

File tree

85 files changed

+1731
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1731
-93
lines changed

.travis.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
---
22
language: node_js
33
node_js:
4-
- 0.10
54
- 4
65
- 6
76
cache:
87
directories:
98
- node_modules
109
- packages/create-react-app/node_modules
1110
- packages/react-scripts/node_modules
12-
script: tasks/e2e.sh
11+
script:
12+
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
13+
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
14+
- 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi'
1315
env:
14-
- USE_YARN=no
15-
- USE_YARN=yes
16+
global:
17+
- USE_YARN=no
18+
matrix:
19+
- TEST_SUITE=simple
20+
- TEST_SUITE=installs
21+
- TEST_SUITE=kitchensink
22+
matrix:
23+
include:
24+
- node_js: 0.10
25+
env: TEST_SUITE=simple
26+
- node_js: 6
27+
env: USE_YARN=yes TEST_SUITE=simple

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
## 0.8.5 (January 9, 2017)
2+
3+
#### :bug: Bug Fix
4+
* `create-react-app`, `react-scripts`
5+
* [#1365](https://github.com/facebookincubator/create-react-app/pull/1365) Use yarnpkg alias to run Yarn. ([@fson](https://github.com/fson))
6+
7+
Fixes an issue where running `create-react-app` failed on systems with Apache Hadoop installed because it falsely detected Hadoop YARN executable as Yarn package manager.
8+
9+
#### Committers: 1
10+
- Ville Immonen ([fson](https://github.com/fson))
11+
12+
### Migrating from 0.8.4 to 0.8.5
13+
14+
Inside any created project that has not been ejected, run:
15+
16+
```
17+
npm install --save-dev --save-exact [email protected]
18+
```
19+
20+
You may also optionally update the global command-line utility:
21+
22+
```
23+
npm install -g [email protected]
24+
```
25+
126
## 0.8.4 (December 11, 2016)
227

328
#### :bug: Bug Fix

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"build": "node packages/react-scripts/scripts/build.js",
55
"changelog": "lerna-changelog",
66
"create-react-app": "tasks/cra.sh",
7-
"e2e": "tasks/e2e.sh",
7+
"e2e": "tasks/e2e-simple.sh",
88
"postinstall": "lerna bootstrap",
99
"publish": "tasks/release.sh",
1010
"start": "node packages/react-scripts/scripts/start.js",

packages/create-react-app/index.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if (currentNodeVersion.split('.')[0] < 4) {
5252
process.exit(1);
5353
}
5454

55+
var commander = require('commander');
5556
var fs = require('fs-extra');
5657
var path = require('path');
5758
var execSync = require('child_process').execSync;
@@ -60,7 +61,7 @@ var semver = require('semver');
6061

6162
var projectName;
6263

63-
var program = require('commander')
64+
var program = commander
6465
.version(require('./package.json').version)
6566
.arguments('<project-directory>')
6667
.usage(chalk.green('<project-directory>') + ' [options]')
@@ -69,6 +70,7 @@ var program = require('commander')
6970
})
7071
.option('--verbose', 'print additional logs')
7172
.option('--scripts-version <alternative-package>', 'use a non-standard version of react-scripts')
73+
.allowUnknownOption()
7274
.on('--help', function () {
7375
console.log(' Only ' + chalk.green('<project-directory>') + ' is required.');
7476
console.log();
@@ -82,7 +84,7 @@ var program = require('commander')
8284
console.log(' ' + chalk.cyan('https://github.com/facebookincubator/create-react-app/issues/new'));
8385
console.log();
8486
})
85-
.parse(process.argv)
87+
.parse(process.argv);
8688

8789
if (typeof projectName === 'undefined') {
8890
console.error('Please specify the project directory:');
@@ -95,9 +97,14 @@ if (typeof projectName === 'undefined') {
9597
process.exit(1);
9698
}
9799

98-
createApp(projectName, program.verbose, program.scriptsVersion);
100+
var hiddenProgram = new commander.Command()
101+
.option('--internal-testing-template <path-to-template>', '(internal usage only, DO NOT RELY ON THIS) ' +
102+
'use a non-standard application template')
103+
.parse(process.argv)
104+
105+
createApp(projectName, program.verbose, program.scriptsVersion, hiddenProgram.internalTestingTemplate);
99106

100-
function createApp(name, verbose, version) {
107+
function createApp(name, verbose, version, template) {
101108
var root = path.resolve(name);
102109
var appName = path.basename(root);
103110

@@ -130,12 +137,12 @@ function createApp(name, verbose, version) {
130137
console.log('Installing ' + chalk.cyan('react-scripts') + '...');
131138
console.log();
132139

133-
run(root, appName, version, verbose, originalDirectory);
140+
run(root, appName, version, verbose, originalDirectory, template);
134141
}
135142

136143
function shouldUseYarn() {
137144
try {
138-
execSync('yarn --version', {stdio: 'ignore'});
145+
execSync('yarnpkg --version', {stdio: 'ignore'});
139146
return true;
140147
} catch (e) {
141148
return false;
@@ -146,7 +153,7 @@ function install(packageToInstall, verbose, callback) {
146153
var command;
147154
var args;
148155
if (shouldUseYarn()) {
149-
command = 'yarn';
156+
command = 'yarnpkg';
150157
args = [ 'add', '--dev', '--exact', packageToInstall];
151158
} else {
152159
command = 'npm';
@@ -163,7 +170,7 @@ function install(packageToInstall, verbose, callback) {
163170
});
164171
}
165172

166-
function run(root, appName, version, verbose, originalDirectory) {
173+
function run(root, appName, version, verbose, originalDirectory, template) {
167174
var packageToInstall = getInstallPackage(version);
168175
var packageName = getPackageName(packageToInstall);
169176

@@ -183,7 +190,7 @@ function run(root, appName, version, verbose, originalDirectory) {
183190
'init.js'
184191
);
185192
var init = require(scriptsPath);
186-
init(root, appName, verbose, originalDirectory);
193+
init(root, appName, verbose, originalDirectory, template);
187194
});
188195
}
189196

packages/create-react-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-app",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"keywords": [
55
"react"
66
],

packages/react-dev-utils/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ Extracts and prettifies warning and error messages from webpack [stats](https://
117117
```js
118118
var webpack = require('webpack');
119119
var config = require('../config/webpack.config.dev');
120+
var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
120121

121122
var compiler = webpack(config);
122123

@@ -132,12 +133,12 @@ compiler.plugin('done', function(stats) {
132133
}
133134
if (messages.errors.length) {
134135
console.log('Failed to compile.');
135-
messages.errors.forEach(console.log);
136+
messages.errors.forEach(e => console.log(e));
136137
return;
137138
}
138139
if (messages.warnings.length) {
139140
console.log('Compiled with warnings.');
140-
messages.warnings.forEach(console.log);
141+
messages.warnings.forEach(w => console.log(w));
141142
}
142143
});
143144
```
@@ -184,6 +185,7 @@ You can control the behavior on `<Enter>` with `isYesDefault`.
184185

185186
```js
186187
var prompt = require('react-dev-utils/prompt');
188+
187189
prompt(
188190
'Are you sure you want to eat all the candy?',
189191
/* isYesDefault */ false

packages/react-dev-utils/webpackHotDevClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ connection.onmessage = function(e) {
248248
case 'hash':
249249
handleAvailableHash(message.data);
250250
break;
251+
case 'still-ok':
251252
case 'ok':
252253
handleSuccess();
253254
break;

packages/react-scripts/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/fixtures
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["latest"]
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REACT_APP_FILE_ENV_MESSAGE=fromtheenvfile

0 commit comments

Comments
 (0)