Skip to content

Commit dbe29e4

Browse files
author
Einar Löve
authored
Merge branch 'master' into upgrade-chalk
2 parents 42832fb + 991b092 commit dbe29e4

File tree

195 files changed

+2741
-2413
lines changed

Some content is hidden

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

195 files changed

+2741
-2413
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
---
2+
# Use Ubuntu Precise instead of new default Trusty which cause build fail
3+
# with pre installed yarn v0.17.8
4+
# https://github.com/facebookincubator/create-react-app/issues/3054
5+
# TODO: remove after Trusty environment is updated with a lastet version of yarn
6+
dist: precise
27
language: node_js
38
node_js:
49
- 6

CHANGELOG.md

Lines changed: 315 additions & 4 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
1-
BSD License
1+
MIT License
22

3-
For create-react-app software
3+
Copyright (c) 2013-present, Facebook, Inc.
44

5-
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
611

7-
Redistribution and use in source and binary forms, with or without modification,
8-
are permitted provided that the following conditions are met:
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
914

10-
* Redistributions of source code must retain the above copyright notice, this
11-
list of conditions and the following disclaimer.
12-
13-
* Redistributions in binary form must reproduce the above copyright notice,
14-
this list of conditions and the following disclaimer in the documentation
15-
and/or other materials provided with the distribution.
16-
17-
* Neither the name Facebook nor the names of its contributors may be used to
18-
endorse or promote products derived from this software without specific
19-
prior written permission.
20-
21-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

PATENTS

Lines changed: 0 additions & 33 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Create React apps with no build configuration.
66
* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
77

88
Create React App works on macOS, Windows, and Linux.<br>
9-
If something doesn’t work please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new).
9+
If something doesn’t work, please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new).
1010

1111
## Quick Overview
1212

@@ -84,7 +84,7 @@ Once the installation is done, you can run some commands inside the project fold
8484
Runs the app in development mode.<br>
8585
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
8686

87-
The page will reload if you make edits.<br>
87+
The page will automatically reload if you make changes to the code.<br>
8888
You will see the build errors and lint warnings in the console.
8989

9090
<img src='https://camo.githubusercontent.com/41678b3254cf583d3186c365528553c7ada53c6e/687474703a2f2f692e696d6775722e636f6d2f466e4c566677362e706e67' width='600' alt='Build errors'>
@@ -191,7 +191,7 @@ Some features are currently **not supported**:
191191

192192
* Server rendering.
193193
* Some experimental syntax extensions (e.g. decorators).
194-
* CSS Modules.
194+
* CSS Modules (see [#2285](https://github.com/facebookincubator/create-react-app/pull/2285)).
195195
* Importing LESS or Sass directly ([but you still can use them](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)).
196196
* Hot reloading of components.
197197

@@ -239,6 +239,7 @@ Some of the more popular and actively maintained ones are:
239239
* [NYTimes/kyt](https://github.com/NYTimes/kyt)
240240
* [zeit/next.js](https://github.com/zeit/next.js)
241241
* [gatsbyjs/gatsby](https://github.com/gatsbyjs/gatsby)
242+
* [electrode-io/electrode](https://github.com/electrode-io/electrode)
242243

243244
Notable alternatives also include:
244245

@@ -254,4 +255,4 @@ Notable alternatives also include:
254255
* [gluestick](https://github.com/TrueCar/gluestick)
255256

256257
You can also use module bundlers like [webpack](http://webpack.js.org) and [Browserify](http://browserify.org/) directly.<br>
257-
React documentation includes [a walkthrough](https://facebook.github.io/react/docs/package-management.html) on this topic.
258+
React documentation includes [a walkthrough](https://reactjs.org/docs/installation.html#development-and-production-versions) on this topic.

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-rc.5",
2+
"lerna": "2.0.0",
33
"version": "independent",
44
"changelog": {
55
"repo": "facebookincubator/create-react-app",

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@
1414
"precommit": "lint-staged"
1515
},
1616
"devDependencies": {
17-
"eslint": "3.19.0",
17+
"eslint": "^4.4.1",
1818
"husky": "^0.13.2",
19-
"lerna": "2.0.0-rc.5",
20-
"lerna-changelog": "^0.2.3",
19+
"lerna": "^2.0.0",
20+
"lerna-changelog": "^0.6.0",
2121
"lint-staged": "^3.3.1",
22-
"prettier": "^1.5.2"
22+
"prettier": "1.6.1"
2323
},
2424
"lint-staged": {
2525
"*.js": [
2626
"prettier --trailing-comma es5 --single-quote --write",
2727
"git add"
28+
],
29+
"yarn.lock": [
30+
"git rm --cached"
2831
]
2932
}
3033
}

packages/babel-preset-react-app/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
22
* Copyright (c) 2015-present, Facebook, Inc.
3-
* All rights reserved.
43
*
5-
* This source code is licensed under the BSD-style license found in the
6-
* LICENSE file in the root directory of this source tree. An additional grant
7-
* of patent rights can be found in the PATENTS file in the same directory.
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
86
*/
97
'use strict';
108

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "babel-preset-react-app",
3-
"version": "3.0.1",
3+
"version": "3.0.3",
44
"description": "Babel preset used by Create React App",
55
"repository": "facebookincubator/create-react-app",
6-
"license": "BSD-3-Clause",
6+
"license": "MIT",
77
"bugs": {
88
"url": "https://github.com/facebookincubator/create-react-app/issues"
99
},

packages/create-react-app/createReactApp.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
22
* Copyright (c) 2015-present, Facebook, Inc.
3-
* All rights reserved.
43
*
5-
* This source code is licensed under the BSD-style license found in the
6-
* LICENSE file in the root directory of this source tree. An additional grant
7-
* of patent rights can be found in the PATENTS file in the same directory.
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
86
*/
97

108
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -47,6 +45,7 @@ const semver = require('semver');
4745
const dns = require('dns');
4846
const tmp = require('tmp');
4947
const unpack = require('tar-pack').unpack;
48+
const url = require('url');
5049
const hyperquest = require('hyperquest');
5150

5251
const packageJson = require('./package.json');
@@ -440,8 +439,8 @@ function getPackageName(installPackage) {
440439
// Pull package name out of git urls e.g:
441440
// git+https://github.com/mycompany/react-scripts.git
442441
// git+ssh://github.com/mycompany/react-scripts.git#v1.2.3
443-
return Promise.resolve(installPackage.match(/([^\/]+)\.git(#.*)?$/)[1]);
444-
} else if (installPackage.indexOf('@') > 0) {
442+
return Promise.resolve(installPackage.match(/([^/]+)\.git(#.*)?$/)[1]);
443+
} else if (installPackage.match(/.+@/)) {
445444
// Do not match @scope/ when stripping off @version or @tag
446445
return Promise.resolve(
447446
installPackage.charAt(0) + installPackage.substr(1).split('@')[0]
@@ -454,7 +453,9 @@ function checkNpmVersion() {
454453
let hasMinNpm = false;
455454
let npmVersion = null;
456455
try {
457-
npmVersion = execSync('npm --version').toString().trim();
456+
npmVersion = execSync('npm --version')
457+
.toString()
458+
.trim();
458459
hasMinNpm = semver.gte(npmVersion, '3.0.0');
459460
} catch (err) {
460461
// ignore
@@ -614,7 +615,15 @@ function checkIfOnline(useYarn) {
614615

615616
return new Promise(resolve => {
616617
dns.lookup('registry.yarnpkg.com', err => {
617-
resolve(err === null);
618+
if (err != null && process.env.https_proxy) {
619+
// If a proxy is defined, we likely can't resolve external hostnames.
620+
// Try to resolve the proxy name as an indication of a connection.
621+
dns.lookup(url.parse(process.env.https_proxy).hostname, proxyErr => {
622+
resolve(proxyErr == null);
623+
});
624+
} else {
625+
resolve(err == null);
626+
}
618627
});
619628
});
620629
}

0 commit comments

Comments
 (0)