Skip to content

Commit d3909dc

Browse files
merged master
2 parents f349cc0 + 9af0422 commit d3909dc

File tree

22 files changed

+267
-49
lines changed

22 files changed

+267
-49
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
## 1.0.17 (November 3, 2017)
2+
3+
#### :nail_care: Enhancement
4+
5+
* `react-scripts`
6+
7+
* [#3401](https://github.com/facebookincubator/create-react-app/pull/3401) Stop using a deprecated option. ([@gaearon](https://github.com/gaearon))
8+
9+
#### :memo: Documentation
10+
11+
* `react-scripts`
12+
13+
* [#3399](https://github.com/facebookincubator/create-react-app/pull/3399) Add link to VS Code troubleshooting guide. ([@auchenberg](https://github.com/auchenberg))
14+
* [#3400](https://github.com/facebookincubator/create-react-app/pull/3400) Update VS Code debug configuration. ([@auchenberg](https://github.com/auchenberg))
15+
16+
#### Committers: 3
17+
18+
- Dan Abramov ([gaearon](https://github.com/gaearon))
19+
- Kenneth Auchenberg ([auchenberg](https://github.com/auchenberg))
20+
- Loren Sands-Ramshaw ([lorensr](https://github.com/lorensr))
21+
22+
### Migrating from 1.0.16 to 1.0.17
23+
24+
Inside any created project that has not been ejected, run:
25+
26+
```
27+
npm install --save --save-exact [email protected]
28+
```
29+
30+
or
31+
32+
```
33+
yarn add --exact [email protected]
34+
```
35+
136
## 1.0.16 (October 31, 2017) 🎃
237

338
#### :bug: Bug Fix

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Install it once globally:
4040
npm install -g create-react-app
4141
```
4242

43-
**You’ll need to have Node >= 6 on your machine**. You can use [nvm](https://github.com/creationix/nvm#installation) to easily switch Node versions between different projects.
43+
**You’ll need to have Node >= 6 on your machine**. You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to easily switch Node versions between different projects.
4444

4545
**This tool doesn’t assume a Node backend**. The Node installation is only required for Create React App itself.
4646

appveyor.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ platform:
2828
- x64
2929

3030
install:
31-
# TODO: Remove after https://github.com/appveyor/ci/issues/1426 is fixed
32-
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
3331
- ps: Install-Product node $env:nodejs_version $env:platform
3432

3533
build: off
@@ -41,4 +39,4 @@ skip_commits:
4139
test_script:
4240
- node --version
4341
- npm --version
44-
- sh tasks/e2e-%test_suite%.sh
42+
- bash tasks/e2e-%test_suite%.sh

packages/create-react-app/createReactApp.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const program = new commander.Command(packageJson.name)
6464
'--scripts-version <alternative-package>',
6565
'use a non-standard version of react-scripts'
6666
)
67+
.option('--use-npm')
6768
.allowUnknownOption()
6869
.on('--help', () => {
6970
console.log(` Only ${chalk.green('<project-directory>')} is required.`);
@@ -133,10 +134,11 @@ createApp(
133134
projectName,
134135
program.verbose,
135136
program.scriptsVersion,
137+
program.useNpm,
136138
hiddenProgram.internalTestingTemplate
137139
);
138140

139-
function createApp(name, verbose, version, template) {
141+
function createApp(name, verbose, version, useNpm, template) {
140142
const root = path.resolve(name);
141143
const appName = path.basename(root);
142144

@@ -159,7 +161,7 @@ function createApp(name, verbose, version, template) {
159161
JSON.stringify(packageJson, null, 2)
160162
);
161163

162-
const useYarn = shouldUseYarn();
164+
const useYarn = useNpm ? false : shouldUseYarn();
163165
const originalDirectory = process.cwd();
164166
process.chdir(root);
165167
if (!useYarn && !checkThatNpmCanReadCwd()) {

packages/eslint-config-react-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The following rules from the [eslint-plugin-jsx-a11y](https://github.com/evcohen
4545
- [aria-role](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md)
4646
- [aria-unsupported-elements](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md)
4747
- [heading-has-content](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md)
48-
- [href-no-hash](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/href-no-hash.md)
48+
- [href-no-hash](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/v5.1.1/docs/rules/href-no-hash.md)
4949
- [iframe-has-title](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md)
5050
- [img-redundant-alt](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md)
5151
- [no-access-key](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"env": {
3+
"jest": true
4+
}
5+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
'use strict';
9+
10+
const ignoredFiles = require('../ignoredFiles');
11+
12+
describe('ignore watch files regex', () => {
13+
it('normal file', () => {
14+
const appSrc = '/root/src/';
15+
const isIgnored = ignoredFiles(appSrc).test('/foo');
16+
const isIgnoredInSrc = ignoredFiles(appSrc).test('/root/src/foo');
17+
18+
expect(isIgnored).toBe(false);
19+
expect(isIgnoredInSrc).toBe(false);
20+
});
21+
22+
it('node modules', () => {
23+
const appSrc = '/root/src/';
24+
const isIgnored = ignoredFiles(appSrc).test('/root/node_modules/foo');
25+
26+
expect(isIgnored).toBe(true);
27+
});
28+
29+
it('node modules inside source directory', () => {
30+
const appSrc = '/root/src/';
31+
const isIgnored = ignoredFiles(appSrc).test('/root/src/node_modules/foo');
32+
const isIgnoredMoreThanOneLevel = ignoredFiles(appSrc).test(
33+
'/root/src/bar/node_modules/foo'
34+
);
35+
36+
expect(isIgnored).toBe(false);
37+
expect(isIgnoredMoreThanOneLevel).toBe(false);
38+
});
39+
40+
it('path contains source directory', () => {
41+
const appSrc = '/root/src/';
42+
const isIgnored = ignoredFiles(appSrc).test(
43+
'/bar/root/src/node_modules/foo'
44+
);
45+
46+
expect(isIgnored).toBe(true);
47+
});
48+
49+
it('path starts with source directory', () => {
50+
const appSrc = '/root/src/';
51+
const isIgnored = ignoredFiles(appSrc).test('/root/src2/node_modules/foo');
52+
53+
expect(isIgnored).toBe(true);
54+
});
55+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
'use strict';
9+
10+
const path = require('path');
11+
12+
module.exports = function ignoredFiles(appSrc) {
13+
return new RegExp(
14+
`^(?!${path
15+
.normalize(appSrc + '/')
16+
.replace(/[\\]+/g, '/')}).+/node_modules/`,
17+
'g'
18+
);
19+
};

packages/react-dev-utils/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"printBuildError.js",
2222
"formatWebpackMessages.js",
2323
"getProcessForPort.js",
24+
"ignoredFiles.js",
2425
"inquirer.js",
2526
"InterpolateHtmlPlugin.js",
2627
"launchEditor.js",
@@ -53,5 +54,11 @@
5354
"sockjs-client": "1.1.4",
5455
"strip-ansi": "3.0.1",
5556
"text-table": "0.2.0"
57+
},
58+
"devDependencies": {
59+
"jest": "20.0.4"
60+
},
61+
"scripts": {
62+
"test": "jest"
5663
}
5764
}

packages/react-error-overlay/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function startReportingRuntimeErrors(options: RuntimeReportingOptions) {
6464
);
6565
}
6666
currentRuntimeErrorOptions = options;
67-
listenToRuntimeErrors(errorRecord => {
67+
stopListeningToRuntimeErrors = listenToRuntimeErrors(errorRecord => {
6868
try {
6969
if (typeof options.onError === 'function') {
7070
options.onError.call(null);
@@ -87,7 +87,7 @@ function handleRuntimeError(errorRecord) {
8787
update();
8888
}
8989

90-
function dismissRuntimeErrors() {
90+
export function dismissRuntimeErrors() {
9191
currentRuntimeErrorRecords = [];
9292
update();
9393
}

0 commit comments

Comments
 (0)