Skip to content

Commit 49ed54f

Browse files
committed
Merge commit '84be4dd0bdf6155c075f9e9bee9f075d8982d0cd' into merge-facebook-master
2 parents 6b615c2 + 84be4dd commit 49ed54f

File tree

101 files changed

+2340
-224
lines changed

Some content is hidden

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

101 files changed

+2340
-224
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ build
55
my-app*
66
template/src/__tests__/__snapshots__/
77
lerna-debug.log
8-
npm-debug.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
911
/.changelog
1012
yarn.lock

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
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: 6
25+
env: USE_YARN=yes TEST_SUITE=simple

CHANGELOG.md

Lines changed: 154 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,156 @@
1+
## 0.9.0 (2017-02-11)
2+
3+
#### :rocket: New Feature
4+
* `react-scripts`
5+
* [#1489](https://github.com/facebookincubator/create-react-app/pull/1489) Support setting "homepage" to "." to generate relative asset paths. ([@tibdex](https://github.com/tibdex))
6+
7+
This addition allows any application not using the HTML5 pushState API to be built to be served from any relative URL.
8+
* [#937](https://github.com/facebookincubator/create-react-app/pull/1504) Add `PUBLIC_URL` env variable for advanced use. ([@EnoahNetzach](https://github.com/EnoahNetzach))
9+
* [#1440](https://github.com/facebookincubator/create-react-app/pull/1440) Make all react env vars accessible in index.html. ([@jihchi](https://github.com/jihchi))
10+
* `react-dev-utils`
11+
* [#1148](https://github.com/facebookincubator/create-react-app/pull/1148) Configure which browser to open in npm start (#873). ([@GAumala](https://github.com/GAumala))
12+
13+
You can now disable the automatic browser launching by setting the `BROWSER` environment variable to `none`.
14+
15+
#### :boom: Breaking Change
16+
* `react-scripts`
17+
* [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer))
18+
* [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon))
19+
20+
Jest has been updated to v18 and has introduced some [breaking changes](https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html).
21+
22+
* `react-scripts`, `react-dev-utils`
23+
* [#1148](https://github.com/facebookincubator/create-react-app/pull/1148) Configure which browser to open in npm start (#873). ([@GAumala](https://github.com/GAumala))
24+
25+
Non-interactive terminals no longer automatically disable launching of the browser.
26+
27+
#### :bug: Bug Fix
28+
* `react-scripts`
29+
* [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer))
30+
* [#1458](https://github.com/facebookincubator/create-react-app/pull/1458) eject: Additionally remove `react-scripts` from dependencies. ([@creynders](https://github.com/creynders))
31+
* [#1441](https://github.com/facebookincubator/create-react-app/pull/1441) Added babel-runtime dependency to deduplicate dependencies when using yarn. ([@jkimbo](https://github.com/jkimbo))
32+
* [#1309](https://github.com/facebookincubator/create-react-app/pull/1309) Bump babel-loader version (#1009). ([@frontsideair](https://github.com/frontsideair))
33+
* [#1267](https://github.com/facebookincubator/create-react-app/pull/1267) Only gitignore dirs in root, not deep. ([@jayphelps](https://github.com/jayphelps))
34+
* `react-dev-utils`
35+
* [#1377](https://github.com/facebookincubator/create-react-app/pull/1377) webpack-dev-server patch for 'still-ok' success status. ([@TheBlackBolt](https://github.com/TheBlackBolt))
36+
* [#1274](https://github.com/facebookincubator/create-react-app/pull/1274) Downgrading to compatible version of SockJS-Client. ([@holloway](https://github.com/holloway))
37+
* [#1247](https://github.com/facebookincubator/create-react-app/pull/1247) Only open Chrome tab if BROWSER is missing or is Chrome. ([@gaearon](https://github.com/gaearon))
38+
39+
#### :nail_care: Enhancement
40+
* `react-scripts`
41+
* [#1507](https://github.com/facebookincubator/create-react-app/pull/1507) fix: add yarn gitignores. ([@adjohnson916](https://github.com/adjohnson916))
42+
* [#1496](https://github.com/facebookincubator/create-react-app/pull/1496) Make build exit with error code when interrupted. ([@brandones](https://github.com/brandones))
43+
* [#1510](https://github.com/facebookincubator/create-react-app/pull/1510) Add missing '\n' to the end of `package.json` file. ([@pd4d10](https://github.com/pd4d10))
44+
* [#1352](https://github.com/facebookincubator/create-react-app/pull/1352) More descriptive error message for env.CI = true warnings causing failures. ([@jayphelps](https://github.com/jayphelps))
45+
* [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon))
46+
* [#1324](https://github.com/facebookincubator/create-react-app/pull/1324) Use npm script hooks to avoid && in deploy script. ([@zpao](https://github.com/zpao))
47+
* [#1311](https://github.com/facebookincubator/create-react-app/pull/1311) Updated react-scripts babel-jest && jest packages to 18.0.0. ([@lopezator](https://github.com/lopezator))
48+
* [#1264](https://github.com/facebookincubator/create-react-app/pull/1264) Remove interactive shell check when opening browser on start. ([@CaryLandholt](https://github.com/CaryLandholt))
49+
* `create-react-app`
50+
* [#1270](https://github.com/facebookincubator/create-react-app/pull/1270) gh-1269: Enabling nested folder paths for project name. ([@dinukadesilva](https://github.com/dinukadesilva))
51+
52+
#### :memo: Documentation
53+
* `react-scripts`
54+
* [#1515](https://github.com/facebookincubator/create-react-app/pull/1515) readme: Advanced Configuration. ([@Timer](https://github.com/Timer))
55+
* [#1513](https://github.com/facebookincubator/create-react-app/pull/1513) clarifying the use of custom environment variables. ([@calweb](https://github.com/calweb))
56+
* [#1511](https://github.com/facebookincubator/create-react-app/pull/1511) Change "OS X" references to "macOS". ([@RodrigoHahn](https://github.com/RodrigoHahn))
57+
* [#1482](https://github.com/facebookincubator/create-react-app/pull/1482) Edit User Guide: Add ESLint config for VS Code users. ([@vulong23](https://github.com/vulong23))
58+
* [#1483](https://github.com/facebookincubator/create-react-app/pull/1483) Reflect websocket proxy support on README (#1013). ([@frontsideair](https://github.com/frontsideair))
59+
* [#1453](https://github.com/facebookincubator/create-react-app/pull/1453) Readme: Removes experimental from Jest snapshot. ([@frehner](https://github.com/frehner))
60+
* [#1437](https://github.com/facebookincubator/create-react-app/pull/1437) Added links to tutorials for integrating cra with an api backend. ([@alexdriaguine](https://github.com/alexdriaguine))
61+
* [#1422](https://github.com/facebookincubator/create-react-app/pull/1422) Add causes of dev server not detecting changes. ([@jetpackpony](https://github.com/jetpackpony))
62+
* [#1260](https://github.com/facebookincubator/create-react-app/pull/1260) Heroku Deployment: Adds a note on how to resolve "File/Module Not Found Errors" . ([@MsUzoAgu](https://github.com/MsUzoAgu))
63+
* [#1256](https://github.com/facebookincubator/create-react-app/pull/1256) Add "Changing the Page Title" to User Guide. ([@gaearon](https://github.com/gaearon))
64+
* [#1245](https://github.com/facebookincubator/create-react-app/pull/1245) Replace the Flow documentation section. ([@gaearon](https://github.com/gaearon))
65+
* Other
66+
* [#1514](https://github.com/facebookincubator/create-react-app/pull/1514) corrected minor typo. ([@crowchirp](https://github.com/crowchirp))
67+
* [#1393](https://github.com/facebookincubator/create-react-app/pull/1393) replace two space syntax with <br> tag. ([@carlsagan21](https://github.com/carlsagan21))
68+
* [#1384](https://github.com/facebookincubator/create-react-app/pull/1384) Document Flow support. ([@dschep](https://github.com/dschep))
69+
* `react-dev-utils`
70+
* [#1375](https://github.com/facebookincubator/create-react-app/pull/1375) Change console.log for errors and warnings. ([@jimmyhmiller](https://github.com/jimmyhmiller))
71+
* [#1369](https://github.com/facebookincubator/create-react-app/pull/1369) Add missing import in react-dev-utils README.md. ([@pedronauck](https://github.com/pedronauck))
72+
73+
#### :house: Internal
74+
* Other
75+
* [#1519](https://github.com/facebookincubator/create-react-app/pull/1519) Add test cases for PUBLIC_URL and relative path. ([@Timer](https://github.com/Timer))
76+
* `react-scripts`
77+
* [#1484](https://github.com/facebookincubator/create-react-app/pull/1484) Improve e2e-kitchensink and Jest coverage. ([@Timer](https://github.com/Timer))
78+
* [#1463](https://github.com/facebookincubator/create-react-app/pull/1463) Minor code style and wrong expect. ([@tuchk4](https://github.com/tuchk4))
79+
* [#1470](https://github.com/facebookincubator/create-react-app/pull/1470) E2e jsdom fix. ([@EnoahNetzach](https://github.com/EnoahNetzach))
80+
* [#1289](https://github.com/facebookincubator/create-react-app/pull/1289) Remove path-exists from dependencies and replace it with fs.existsSync. ([@halfzebra](https://github.com/halfzebra))
81+
* `create-react-app`, `react-scripts`
82+
* [#1187](https://github.com/facebookincubator/create-react-app/pull/1187) Use a more sophisticated template for end-to-end testing.. ([@EnoahNetzach](https://github.com/EnoahNetzach))
83+
84+
#### Committers: 35
85+
- Alex Driaguine ([alexdriaguine](https://github.com/alexdriaguine))
86+
- Anders D. Johnson ([adjohnson916](https://github.com/adjohnson916))
87+
- Anthony F. ([frehner](https://github.com/frehner))
88+
- Brandon Istenes ([brandones](https://github.com/brandones))
89+
- Calvin Webster ([calweb](https://github.com/calweb))
90+
- Cary Landholt ([CaryLandholt](https://github.com/CaryLandholt))
91+
- Chandan Rai ([crowchirp](https://github.com/crowchirp))
92+
- Christian Raidl ([Chris-R3](https://github.com/Chris-R3))
93+
- Dan Abramov ([gaearon](https://github.com/gaearon))
94+
- Daniel Schep ([dschep](https://github.com/dschep))
95+
- David ([lopezator](https://github.com/lopezator))
96+
- Dinuka De Silva ([dinukadesilva](https://github.com/dinukadesilva))
97+
- Eduard Kyvenko ([halfzebra](https://github.com/halfzebra))
98+
- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach))
99+
- Fatih ([frontsideair](https://github.com/frontsideair))
100+
- Gabriel Aumala ([GAumala](https://github.com/GAumala))
101+
- Jay Phelps ([jayphelps](https://github.com/jayphelps))
102+
- Jih-Chi Lee ([jihchi](https://github.com/jihchi))
103+
- Jimmy Miller ([jimmyhmiller](https://github.com/jimmyhmiller))
104+
- Joe Haddad ([Timer](https://github.com/Timer))
105+
- Johnny Magrippis ([jmagrippis](https://github.com/jmagrippis))
106+
- Jonathan Kim ([jkimbo](https://github.com/jkimbo))
107+
- MUA ([MsUzoAgu](https://github.com/MsUzoAgu))
108+
- Matthew Holloway ([holloway](https://github.com/holloway))
109+
- Nguyen Le Vu Long ([vulong23](https://github.com/vulong23))
110+
- Paul O’Shannessy ([zpao](https://github.com/zpao))
111+
- Pedro Nauck ([pedronauck](https://github.com/pedronauck))
112+
- Robbie H ([TheBlackBolt](https://github.com/TheBlackBolt))
113+
- Thibault Derousseaux ([tibdex](https://github.com/tibdex))
114+
- Valerii ([tuchk4](https://github.com/tuchk4))
115+
- Vasiliy Taranov ([jetpackpony](https://github.com/jetpackpony))
116+
- [RodrigoHahn](https://github.com/RodrigoHahn)
117+
- creynders ([creynders](https://github.com/creynders))
118+
- pd4d10 ([pd4d10](https://github.com/pd4d10))
119+
- soo ([carlsagan21](https://github.com/carlsagan21))
120+
121+
### Migrating from 0.8.5 to 0.9.0
122+
123+
Inside any created project that has not been ejected, run:
124+
125+
```
126+
npm install --save-dev --save-exact [email protected]
127+
```
128+
129+
## 0.8.5 (January 9, 2017)
130+
131+
#### :bug: Bug Fix
132+
* `create-react-app`, `react-scripts`
133+
* [#1365](https://github.com/facebookincubator/create-react-app/pull/1365) Use yarnpkg alias to run Yarn. ([@fson](https://github.com/fson))
134+
135+
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.
136+
137+
#### Committers: 1
138+
- Ville Immonen ([fson](https://github.com/fson))
139+
140+
### Migrating from 0.8.4 to 0.8.5
141+
142+
Inside any created project that has not been ejected, run:
143+
144+
```
145+
npm install --save-dev --save-exact [email protected]
146+
```
147+
148+
You may also optionally update the global command-line utility:
149+
150+
```
151+
npm install -g [email protected]
152+
```
153+
1154
## 0.8.4 (December 11, 2016)
2155

3156
#### :bug: Bug Fix
@@ -414,7 +567,7 @@ npm install --save-dev --save-exact [email protected]
414567
415568
### Babel Preset (`babel-preset-react-app`)
416569
417-
* The preset now detects the Node.js version in test environment and disables unnecessary ES2015 transforms using using `babel-preset-env`. ([@shubheksha](https://github.com/shubheksha) in [#878](https://github.com/facebookincubator/create-react-app/pull/878), [@JeffreyATW](https://github.com/JeffreyATW) in [#927
570+
* The preset now detects the Node.js version in test environment and disables unnecessary ES2015 transforms using `babel-preset-env`. ([@shubheksha](https://github.com/shubheksha) in [#878](https://github.com/facebookincubator/create-react-app/pull/878), [@JeffreyATW](https://github.com/JeffreyATW) in [#927
418571
](https://github.com/facebookincubator/create-react-app/pull/927))
419572
* Fixes a duplicate dependency on `babel-plugin-transform-regenerator`. ([@akofman](https://github.com/akofman) in [#864](https://github.com/facebookincubator/create-react-app/pull/864))
420573

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ and then run `npm start` or `npm run build`.
6868
* You'll need an [access token for the GitHub API](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). Save it to this environment variable: `export GITHUB_AUTH="..."`
6969
* Run `npm run changelog`. The command will find all the labeled pull requests merged since the last release and group them by the label and affected packages, and create a change log entry with all the changes and links to PRs and their authors. Copy and paste it to `CHANGELOG.md`.
7070
* Add a four-space indented paragraph after each non-trivial list item, explaining what changed and why. For each breaking change also write who it affects and instructions for migrating existing code.
71+
* Maybe add some newlines here and there. Preview the result on GitHub to get a feel for it. Changelog generator output is a bit too terse for my taste, so try to make it visually pleasing and well grouped.
7172
6. Make sure to include “Migrating from ...” instructions for the previous release. Often you can copy and paste them.
7273
7. After merging the changelog update, create a GitHub Release with the same text. See previous Releases for inspiration.
7374
8. **Do not run `npm publish`. Instead, run `npm run publish`.**

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"lerna": "2.0.0-beta.30",
2+
"lerna": "2.0.0-beta.37",
33
"version": "independent",
44
"changelog": {
55
"repo": "facebookincubator/create-react-app",

package.json

Lines changed: 2 additions & 2 deletions
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",
@@ -18,7 +18,7 @@
1818
"eslint-plugin-import": "1.12.0",
1919
"eslint-plugin-jsx-a11y": "2.2.2",
2020
"eslint-plugin-react": "6.3.0",
21-
"lerna": "2.0.0-beta.30",
21+
"lerna": "^2.0.0-beta.37",
2222
"lerna-changelog": "^0.2.3"
2323
}
2424
}

packages/babel-preset-react-app/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
"index.js"
1212
],
1313
"dependencies": {
14-
"babel-plugin-transform-class-properties": "6.16.0",
15-
"babel-plugin-transform-es2015-parameters": "6.18.0",
16-
"babel-plugin-transform-object-rest-spread": "6.19.0",
17-
"babel-plugin-transform-react-constant-elements": "6.9.1",
18-
"babel-plugin-transform-react-jsx": "6.8.0",
19-
"babel-plugin-transform-react-jsx-self": "6.11.0",
20-
"babel-plugin-transform-react-jsx-source": "6.9.0",
21-
"babel-plugin-transform-regenerator": "6.16.1",
22-
"babel-plugin-transform-runtime": "6.15.0",
23-
"babel-preset-env": "0.0.8",
24-
"babel-preset-latest": "6.16.0",
25-
"babel-preset-react": "6.16.0",
26-
"babel-runtime": "6.11.6"
14+
"babel-plugin-transform-class-properties": "6.22.0",
15+
"babel-plugin-transform-es2015-parameters": "6.22.0",
16+
"babel-plugin-transform-object-rest-spread": "6.22.0",
17+
"babel-plugin-transform-react-constant-elements": "6.22.0",
18+
"babel-plugin-transform-react-jsx": "6.22.0",
19+
"babel-plugin-transform-react-jsx-self": "6.22.0",
20+
"babel-plugin-transform-react-jsx-source": "6.22.0",
21+
"babel-plugin-transform-regenerator": "6.22.0",
22+
"babel-plugin-transform-runtime": "6.22.0",
23+
"babel-preset-env": "1.1.8",
24+
"babel-preset-latest": "6.22.0",
25+
"babel-preset-react": "6.22.0",
26+
"babel-runtime": "6.22.0"
2727
}
2828
}

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

0 commit comments

Comments
 (0)