Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Facebook 1.0.11 #135

Merged
merged 38 commits into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ae40264
Publish
gaearon Jun 29, 2017
c8cb004
allowTaggedTemplates to avoid warnings from SC's (#2701)
denkristoffer Jul 1, 2017
028b5c5
Remove Windows note for source-map-explorer (#2719)
hodanny Jul 3, 2017
fc2057c
Reorder vim arguments in launchEditor so --remote works (#2723)
trygveaa Jul 4, 2017
fee4e57
Update link to issue blocking JSX hoisting (#2732)
ForbesLindesay Jul 6, 2017
4b856a7
Support PyCharm in launchEditor (#2740)
danrr Jul 7, 2017
31e3ffe
Add "node" to Jest's moduleFileExtensions (#2738)
mostafah Jul 7, 2017
63e8924
ESLint 4 (#2735)
trungdq88 Jul 7, 2017
e0c2729
Use Rule.oneOf to resolve correct loader (#2747)
Furizaa Jul 9, 2017
772a447
Autodetect JetBrains IDEs (#2754)
danrr Jul 9, 2017
5eb7c73
Don't prompt to install serve if already installed (#2761)
OwenFlood Jul 10, 2017
494d96f
Docs for react-router v4 basename feature (#2668)
viankakrisna Jul 12, 2017
c3f4b7c
Moved npm run build before npm test (#2725)
zeel Jul 13, 2017
777e70a
List conflicting files when initializing app (#2785)
OwenFlood Jul 14, 2017
834515f
Upgrade webpack-dev-server (#2806)
christianbundy Jul 18, 2017
64e5869
Add explicit "Opting Out of Caching" header (#2822)
gaearon Jul 19, 2017
c93e630
Feature/webpack3 (#2574)
themre Jul 25, 2017
27f1256
Bump Webpack 3.4 (#2850)
themre Jul 26, 2017
8dad81d
Allow use of scoped packages with a pinned version (#2853)
wileybenet Aug 2, 2017
3cd4747
Use modern syntax feature (#2873)
monkindey Aug 2, 2017
a6cd6f3
Update webpack version note (#2798)
ForbesLindesay Aug 2, 2017
2c988b9
Fix parsing HTML/JSX tags to real elements (#2796)
ccloli Aug 2, 2017
791df18
Update README.md
Timer Aug 2, 2017
de34cf6
Update README.md
Timer Aug 2, 2017
adb4c6d
Unstage yarn.lock pre-commit (#2700)
jdcrensh Aug 2, 2017
e08b789
Format UglifyJs error (#2650)
viankakrisna Aug 2, 2017
de46152
Re-enable flowtype warning (#2718)
Aug 2, 2017
9b79012
Allow importing package.json (#2468)
iamdoron Aug 2, 2017
eb3f85d
Feature/webpack 3 4 (#2875)
themre Aug 2, 2017
dba32be
Fix the order of arguments in spawned child proc (#2913)
koistya Aug 9, 2017
dcdab42
Adjust the `checkIfOnline` check if in a corporate proxy environment …
bsyk Aug 9, 2017
b2593b6
Make formatWebpackMessages return all messages (#2834)
onigoetz Aug 9, 2017
2ff3a19
Use env variable to disable source maps (#2818)
viankakrisna Aug 9, 2017
2d76563
Update README.md
Timer Aug 9, 2017
8ace6d5
Update dev deps (#2923)
Timer Aug 9, 2017
8561285
Prepare for 1.0.11 release (#2924)
Timer Aug 9, 2017
0bb9537
Publish
Timer Aug 9, 2017
9a6e32d
Delete leftover file (upstream 82687dd)
JohnNilsson Aug 9, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 115 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,114 @@
## 1.0.11 (2017-08-09)

#### :bug: Bug Fix
* `create-react-app`
* [#2884](https://github.com/facebookincubator/create-react-app/pull/2884) Improve offline heuristic for proxied environments. ([@bsyk](https://github.com/bsyk))

When a Yarn proxy is set, we will check its connectivity if we cannot reach Yarn's registry. This is often the case when DNS lookups must be made through the proxy.

* [#2853](https://github.com/facebookincubator/create-react-app/pull/2853) Allow use of scoped packages with a pinned version. ([@wileybenet](https://github.com/wileybenet))
* `react-dev-utils`
* [#2796](https://github.com/facebookincubator/create-react-app/pull/2796) Properly escape HTML tags in error overlay. ([@ccloli](https://github.com/ccloli))

Elements printed in their entirety would sometimes render as HTML. This should no longer happen and should properly render as text.

* `react-dev-utils`, `react-scripts`
* [#2834](https://github.com/facebookincubator/create-react-app/pull/2834) Make `formatWebpackMessages` return all messages ([@onigoetz](https://github.com/onigoetz))
* `react-scripts`
* [#2806](https://github.com/facebookincubator/create-react-app/pull/2806) Fix SockJS version compatibility. ([@christianbundy](https://github.com/christianbundy))
* [#2738](https://github.com/facebookincubator/create-react-app/pull/2738) Fix Jest `node` file resolution. ([@mostafah](https://github.com/mostafah))

#### :nail_care: Enhancement
* `react-scripts`
* [#2818](https://github.com/facebookincubator/create-react-app/pull/2818) Allow sourcemaps to be disabled. ([@viankakrisna](https://github.com/viankakrisna))

As applications grow more complex, it is possible webpack may run out of memory while generating source maps. They may now be disabled by setting `GENERATE_SOURCEMAP=false`.

* [#2913](https://github.com/facebookincubator/create-react-app/pull/2913) Allow flags to be passed to node when running `react-scripts`. ([@koistya](https://github.com/koistya))
* [#2574](https://github.com/facebookincubator/create-react-app/pull/2574) Upgrade to `webpack@3`. ([@themre](https://github.com/themre))
* [#2747](https://github.com/facebookincubator/create-react-app/pull/2747) Simplify webpack configuration using `Rule.oneOf`. ([@Furizaa](https://github.com/Furizaa))
* `react-dev-utils`, `react-scripts`
* [#2468](https://github.com/facebookincubator/create-react-app/pull/2468) Allow importing `package.json`. ([@iamdoron](https://github.com/iamdoron))
* [#2650](https://github.com/facebookincubator/create-react-app/pull/2650) Make UglifyJS error friendlier. ([@viankakrisna](https://github.com/viankakrisna))
* `create-react-app`
* [#2785](https://github.com/facebookincubator/create-react-app/pull/2785) Change error wording and list conflicting files when initializing app. ([@OwenFlood](https://github.com/OwenFlood))
* `react-dev-utils`
* [#2761](https://github.com/facebookincubator/create-react-app/pull/2761) Don't prompt to install serve if already installed. ([@OwenFlood](https://github.com/OwenFlood))
* [#2754](https://github.com/facebookincubator/create-react-app/pull/2754) Auto-detect JetBrains IDEs. ([@danrr](https://github.com/danrr))
* [#2740](https://github.com/facebookincubator/create-react-app/pull/2740) Support PyCharm in `launchEditor`. ([@danrr](https://github.com/danrr))
* [#2723](https://github.com/facebookincubator/create-react-app/pull/2723) Reorder vim arguments in `launchEditor` so `--remote` works. ([@trygveaa](https://github.com/trygveaa))
* `eslint-config-react-app`, `react-scripts`
* [#2735](https://github.com/facebookincubator/create-react-app/pull/2735) Upgrade to `eslint@4`. ([@trungdq88](https://github.com/trungdq88))
* `eslint-config-react-app`
* [#2701](https://github.com/facebookincubator/create-react-app/pull/2701) Set `allowTaggedTemplates` to true (eslint). ([@denkristoffer](https://github.com/denkristoffer))

#### :memo: Documentation
* Other
* [#2728](https://github.com/facebookincubator/create-react-app/pull/2728) Add Electrode to alternatives. ([@animesh10](https://github.com/animesh10))
* [#2788](https://github.com/facebookincubator/create-react-app/pull/2788) Update link for motion. ([@viankakrisna](https://github.com/viankakrisna))
* [#2697](https://github.com/facebookincubator/create-react-app/pull/2697) Fix env list ordering. ([@alexeyraspopov](https://github.com/alexeyraspopov))
* `react-dev-utils`
* [#2798](https://github.com/facebookincubator/create-react-app/pull/2798) Update note about `webpackHotDevClient` support. ([@ForbesLindesay](https://github.com/ForbesLindesay))
* `react-scripts`
* [#2822](https://github.com/facebookincubator/create-react-app/pull/2822) Add explicit "Opting Out of Caching" header. ([@gaearon](https://github.com/gaearon))
* [#2725](https://github.com/facebookincubator/create-react-app/pull/2725) Fixed typo. ([@zeel](https://github.com/zeel))
* [#2668](https://github.com/facebookincubator/create-react-app/pull/2668) Document `basename` feature in `react-router`. ([@viankakrisna](https://github.com/viankakrisna))
* [#2719](https://github.com/facebookincubator/create-react-app/pull/2719) Remove Windows note for `source-map-explorer`. ([@hodanny](https://github.com/hodanny))
* `babel-preset-react-app`
* [#2732](https://github.com/facebookincubator/create-react-app/pull/2732) Update link to issue blocking JSX hoisting. ([@ForbesLindesay](https://github.com/ForbesLindesay))

#### :house: Internal
* `create-react-app`, `eslint-config-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
* [#2923](https://github.com/facebookincubator/create-react-app/pull/2923) Update deps. ([@Timer](https://github.com/Timer))
* `eslint-config-react-app`
* [#2718](https://github.com/facebookincubator/create-react-app/pull/2718) Re-enable flowtype warning. ([@oskarkook](https://github.com/oskarkook))
* Other
* [#2700](https://github.com/facebookincubator/create-react-app/pull/2700) Unstage `yarn.lock` pre-commit. ([@jdcrensh](https://github.com/jdcrensh))
* `react-scripts`
* [#2873](https://github.com/facebookincubator/create-react-app/pull/2873) Use template strings. ([@monkindey](https://github.com/monkindey))

#### Committers: 26
- 864907600cc ([ccloli](https://github.com/ccloli))
- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna))
- Alexey Raspopov ([alexeyraspopov](https://github.com/alexeyraspopov))
- Andreas Hoffmann ([Furizaa](https://github.com/Furizaa))
- Animesh Dutta ([animesh10](https://github.com/animesh10))
- Ben Sykes ([bsyk](https://github.com/bsyk))
- Christian Bundy ([christianbundy](https://github.com/christianbundy))
- Dan Abramov ([gaearon](https://github.com/gaearon))
- Dan Ristea ([danrr](https://github.com/danrr))
- Danny Ho ([hodanny](https://github.com/hodanny))
- Forbes Lindesay ([ForbesLindesay](https://github.com/ForbesLindesay))
- Joe Haddad ([Timer](https://github.com/Timer))
- Jon Crenshaw ([jdcrensh](https://github.com/jdcrensh))
- Kiho · Cham ([monkindey](https://github.com/monkindey))
- Konstantin Tarkus ([koistya](https://github.com/koistya))
- Kristoffer ([denkristoffer](https://github.com/denkristoffer))
- Mostafa Hajizadeh ([mostafah](https://github.com/mostafah))
- Oskar Köök ([oskarkook](https://github.com/oskarkook))
- Owen Flood ([OwenFlood](https://github.com/OwenFlood))
- Stéphane Goetz ([onigoetz](https://github.com/onigoetz))
- Trygve Aaberge ([trygveaa](https://github.com/trygveaa))
- Wiley Bennett ([wileybenet](https://github.com/wileybenet))
- [iamdoron](https://github.com/iamdoron)
- [themre](https://github.com/themre)
- zeel ([zeel](https://github.com/zeel))
- Đinh Quang Trung ([trungdq88](https://github.com/trungdq88))

### Migrating from 1.0.10 to 1.0.11

Inside any created project that has not been ejected, run:

```
npm install --save --save-exact [email protected]
```

or

```
yarn add --exact [email protected]
```

## 1.0.10 (June 29, 2017)

#### :bug: Bug Fix
Expand Down Expand Up @@ -110,7 +221,7 @@ yarn add --exact [email protected]
* [#2600](https://github.com/facebookincubator/create-react-app/pull/2600) Add empty mock for `dgram` Node module. ([@micopiira](https://github.com/micopiira))
* [#2458](https://github.com/facebookincubator/create-react-app/pull/2458) Add names to module factories in development. ([@Zaccc123](https://github.com/Zaccc123))
* [#2551](https://github.com/facebookincubator/create-react-app/pull/2551) In new projects, unregister service worker and force reload if `service-worker.js` is not found. ([@ro-savage](https://github.com/ro-savage))

* `babel-preset-react-app`, `react-dev-utils`, `react-scripts`

* [#2658](https://github.com/facebookincubator/create-react-app/pull/2658) Bump dependencies. ([@gaearon](https://github.com/gaearon))
Expand All @@ -119,7 +230,7 @@ yarn add --exact [email protected]

* [#2657](https://github.com/facebookincubator/create-react-app/pull/2657) Put `react-scripts` in `dependencies`, not `devDependencies`. ([@gaearon](https://github.com/gaearon))
* [#2635](https://github.com/facebookincubator/create-react-app/pull/2635) Silence unhelpful npm warnings. ([@gaearon](https://github.com/gaearon))

* `react-dev-utils`

* [#2637](https://github.com/facebookincubator/create-react-app/pull/2637) Auto-detect Brackets editor from error overlay. ([@petetnt](https://github.com/petetnt))
Expand Down Expand Up @@ -176,7 +287,7 @@ yarn add --exact [email protected]
* [#2397](https://github.com/facebookincubator/create-react-app/pull/2397) Fix command in e2e-kitchensink.sh cleanup. ([@ro-savage](https://github.com/ro-savage))
* [#2388](https://github.com/facebookincubator/create-react-app/pull/2388) Fix wrong path expansion in end-to-end test. ([@gaearon](https://github.com/gaearon))
* [#2387](https://github.com/facebookincubator/create-react-app/pull/2387) Catch "No tests found" during CI. ([@EnoahNetzach](https://github.com/EnoahNetzach))

* `react-scripts`

* [#2408](https://github.com/facebookincubator/create-react-app/pull/2408) E2E testing enhancements. ([@EnoahNetzach](https://github.com/EnoahNetzach))
Expand Down Expand Up @@ -573,7 +684,7 @@ yarn add --dev --exact [email protected]

We’ve been working on this release for the past few months, and there are many big impovements, from migrating to webpack 2 to a brand new runtime error overlay and built-in support for Progressive Web Apps.

So instead of just enumerating them here, we decided to write a blog post about all the new features.
So instead of just enumerating them here, we decided to write a blog post about all the new features.<br>
Check it out: **[What’s New in Create React App](https://facebook.github.io/react/blog/2017/05/18/whats-new-in-create-react-app.html)**.

Have you read it? Now let's see how to update your app to the latest version.
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.0.0-rc.5",
"lerna": "2.0.0",
"version": "independent",
"changelog": {
"repo": "facebookincubator/create-react-app",
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,24 @@
"precommit": "lint-staged"
},
"devDependencies": {
"@types/jest": "^19.2.3",
"@types/jest": "^20.0.4",
"@types/node": "^7.0.21",
"@types/react": "^15.0.34",
"@types/react": "^15.6.1",
"@types/react-dom": "^15.5.0",
"eslint": "3.19.0",
"eslint": "^4.4.1",
"husky": "^0.13.2",
"lerna": "2.0.0-rc.5",
"lerna-changelog": "^0.2.3",
"lerna": "^2.0.0",
"lerna-changelog": "^0.6.0",
"lint-staged": "^3.3.1",
"prettier": "^1.5.2"
},
"lint-staged": {
"*.js": [
"prettier --trailing-comma es5 --single-quote --write",
"git add"
],
"yarn.lock": [
"git rm --cached"
]
}
}
5 changes: 1 addition & 4 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ if (env === 'test') {

if (env === 'production') {
// Optimization: hoist JSX that never changes out of render()
// Disabled because of issues:
// * https://github.com/facebookincubator/create-react-app/issues/525
// * https://phabricator.babeljs.io/search/query/pCNlnC2xzwzx/
// * https://github.com/babel/babel/issues/4516
// Disabled because of issues: https://github.com/facebookincubator/create-react-app/issues/553
// TODO: Enable again when these issues are resolved.
// plugins.push.apply(plugins, [
// require.resolve('babel-plugin-transform-react-constant-elements')
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-react-app",
"version": "3.0.1",
"version": "3.0.2",
"description": "Babel preset used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
Expand Down
46 changes: 36 additions & 10 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const semver = require('semver');
const dns = require('dns');
const tmp = require('tmp');
const unpack = require('tar-pack').unpack;
const url = require('url');
const hyperquest = require('hyperquest');

const packageJson = require('./package.json');
Expand Down Expand Up @@ -143,11 +144,7 @@ function createApp(name, verbose, version, template) {

checkAppName(appName);
fs.ensureDirSync(name);
if (!isSafeToCreateProjectIn(root)) {
console.log(
`The directory ${chalk.green(name)} contains files that could conflict.`
);
console.log('Try using a new directory name.');
if (!isSafeToCreateProjectIn(root, name)) {
process.exit(1);
}

Expand Down Expand Up @@ -444,8 +441,8 @@ function getPackageName(installPackage) {
// Pull package name out of git urls e.g:
// git+https://github.com/mycompany/react-scripts.git
// git+ssh://github.com/mycompany/react-scripts.git#v1.2.3
return Promise.resolve(installPackage.match(/([^\/]+)\.git(#.*)?$/)[1]);
} else if (installPackage.indexOf('@') > 0) {
return Promise.resolve(installPackage.match(/([^/]+)\.git(#.*)?$/)[1]);
} else if (installPackage.match(/.+@/)) {
// Do not match @scope/ when stripping off @version or @tag
return Promise.resolve(
installPackage.charAt(0) + installPackage.substr(1).split('@')[0]
Expand Down Expand Up @@ -571,7 +568,7 @@ function setCaretRangeForRuntimeDeps(packageName) {
// If project only contains files generated by GH, it’s safe.
// We also special case IJ-based products .idea because it integrates with CRA:
// https://github.com/facebookincubator/create-react-app/pull/368#issuecomment-243446094
function isSafeToCreateProjectIn(root) {
function isSafeToCreateProjectIn(root, name) {
const validFiles = [
'.DS_Store',
'Thumbs.db',
Expand All @@ -585,7 +582,28 @@ function isSafeToCreateProjectIn(root) {
'.hgignore',
'.hgcheck',
];
return fs.readdirSync(root).every(file => validFiles.indexOf(file) >= 0);
console.log();

const conflicts = fs
.readdirSync(root)
.filter(file => !validFiles.includes(file));
if (conflicts.length < 1) {
return true;
}

console.log(
`The directory ${chalk.green(name)} contains files that could conflict:`
);
console.log();
for (const file of conflicts) {
console.log(` ${file}`);
}
console.log();
console.log(
'Either try using a new directory name, or remove the files listed above.'
);

return false;
}

function checkIfOnline(useYarn) {
Expand All @@ -597,7 +615,15 @@ function checkIfOnline(useYarn) {

return new Promise(resolve => {
dns.lookup('registry.yarnpkg.com', err => {
resolve(err === null);
if (err != null && process.env.https_proxy) {
// If a proxy is defined, we likely can't resolve external hostnames.
// Try to resolve the proxy name as an indication of a connection.
dns.lookup(url.parse(process.env.https_proxy).hostname, proxyErr => {
resolve(proxyErr == null);
});
} else {
resolve(err == null);
}
});
});
}
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-app",
"version": "1.3.2",
"version": "1.4.0",
"keywords": [
"react"
],
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ module.exports = {
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
},
],
'no-unused-labels': 'warn',
Expand Down Expand Up @@ -290,8 +291,7 @@ module.exports = {

// https://github.com/gajus/eslint-plugin-flowtype
'flowtype/define-flow-type': 'warn',
// TODO: Reenable once https://github.com/gajus/eslint-plugin-flowtype/issues/165 is fixed
//'flowtype/require-valid-file-annotation': 'warn',
'flowtype/require-valid-file-annotation': 'warn',
'flowtype/use-flow-type': 'warn',
},
};
12 changes: 6 additions & 6 deletions packages/eslint-config-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-react-app",
"version": "1.0.5",
"version": "2.0.0",
"description": "ESLint configuration used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
Expand All @@ -12,10 +12,10 @@
],
"peerDependencies": {
"babel-eslint": "^7.2.3",
"eslint": "^3.19.0",
"eslint-plugin-flowtype": "^2.33.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-react": "^7.0.1"
"eslint": "^4.1.1",
"eslint-plugin-flowtype": "^2.34.1",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.1.0"
}
}
18 changes: 10 additions & 8 deletions packages/react-dev-utils/ModuleScopePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ const chalk = require('chalk');
const path = require('path');

class ModuleScopePlugin {
constructor(appSrc) {
constructor(appSrc, allowedFiles = []) {
this.appSrc = appSrc;
this.allowedFiles = new Set(allowedFiles);
}

apply(resolver) {
Expand All @@ -40,15 +41,16 @@ class ModuleScopePlugin {
if (relative.startsWith('../') || relative.startsWith('..\\')) {
return callback();
}
// Find path from src to the requested file
const requestRelative = path.relative(
appSrc,
path.resolve(
path.dirname(request.context.issuer),
request.__innerRequest_request
)
const requestFullPath = path.resolve(
path.dirname(request.context.issuer),
request.__innerRequest_request
);
if (this.allowedFiles.has(requestFullPath)) {
return callback();
}
// Find path from src to the requested file
// Error if in a parent directory of src/
const requestRelative = path.relative(appSrc, requestFullPath);
if (
requestRelative.startsWith('../') ||
requestRelative.startsWith('..\\')
Expand Down
Loading