Skip to content

Commit 1fbf814

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents cf4dffd + 7ac8150 commit 1fbf814

File tree

31 files changed

+169
-66
lines changed

31 files changed

+169
-66
lines changed

CHANGELOG-1.x.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 2.0.3 and Newer Versions
22

3-
**Please refer to [CHANGELOG.md](./CHANGELOG.md) for the newer versions.**
3+
**Please refer to [CHANGELOG-2.x.md](./CHANGELOG-2.x.md) for the 2.x range, and [CHANGELOG.md](CHANGELOG.md) for the newer versions.**
44

55
## 1.1.5 (August 24, 2018)
66

CHANGELOG-2.x.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.0 and Newer Versions
2+
3+
**Please refer to [CHANGELOG.md](./CHANGELOG.md) for the newer versions.**
4+
15
## 2.1.8 (March 7, 2019)
26

37
v2.1.8 is a maintenance release that reapplies the TypeScript speed improvements ([#6406](https://github.com/facebook/create-react-app/pull/6406)) in a new major version of `react-dev-utils`.

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ v3.1.1 is a maintenance release that includes minor bug fixes and documentation
2626

2727
### Migrating from 3.1.0 to 3.1.1
2828

29+
Optionally remove `Disallow: /static/` from `public/robots.txt` if you want to allow your images and other static files to be indexed by search engines [#7508](https://github.com/facebook/create-react-app/pull/7508)
30+
2931
Inside any created project that has not been ejected, run:
3032

3133
```sh

CODE_OF_CONDUCT.md

+74-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
11
# Code of Conduct
22

3-
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.fb.com/codeofconduct/) so that you can understand what actions will and will not be tolerated.
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at <opensource-conduct@fb.com>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

docusaurus/docs/adding-flow.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ To add Flow to a Create React App project, follow these steps:
1414
3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flow.org/en/docs/config/) in the root directory.
1515
4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`).
1616

17-
Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors.
18-
You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience.
19-
In the future we plan to integrate it into Create React App even more closely.
17+
Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors.
18+
You can optionally enable an extension for your IDE, such as [Flow Language Support](https://github.com/flowtype/flow-for-vscode) for Visual Studio Code, or leverage the Language Server Protocol standard (e.g. [vim LSP](https://github.com/prabirshrestha/vim-lsp/wiki/Servers-Flow)) to get hints while you type.
19+
20+
If you'd like to use [absolute imports](/docs/importing-a-component#absolute-imports) with Flow,
21+
make sure to add the following line to your `.flowconfig` to make Flow aware of it:
22+
23+
```diff
24+
[options]
25+
+ module.name_mapper='^\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
26+
```
2027

2128
To learn more about Flow, check out [its documentation](https://flow.org/).

docusaurus/docs/proxying-api-requests-in-development.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ You can now register proxies as you wish! Here's an example using the above `htt
9696
const proxy = require('http-proxy-middleware');
9797

9898
module.exports = function(app) {
99-
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
99+
app.use('/api', proxy({
100+
target: 'http://localhost:5000',
101+
changeOrigin: true,
102+
}));
100103
};
101104
```
102105

docusaurus/docs/running-tests.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ Similar to `enzyme` you can create a `src/setupTests.js` file to avoid boilerpla
191191

192192
```js
193193
// react-testing-library renders your components to document.body,
194-
// this will ensure they're removed after each test.
195-
import '@testing-library/react/cleanup-after-each';
196194
// this adds jest-dom's custom assertions
197195
import '@testing-library/jest-dom/extend-expect';
198196
```
@@ -206,7 +204,7 @@ import App from './App';
206204

207205
it('renders welcome message', () => {
208206
const { getByText } = render(<App />);
209-
expect(getByText('Welcome to React')).toBeInTheDocument();
207+
expect(getByText('Learn React')).toBeInTheDocument();
210208
});
211209
```
212210

docusaurus/docs/setting-up-your-editor.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ Next we add a 'lint-staged' field to the `package.json`, for example:
163163
},
164164
+ "lint-staged": {
165165
+ "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
166-
+ "prettier --single-quote --write",
166+
+ "prettier --write",
167167
+ "git add"
168168
+ ]
169169
+ },
170170
"scripts": {
171171
```
172172

173-
Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}"` to format your entire project for the first time.
173+
Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --write "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}"` to format your entire project for the first time.
174174

175175
Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://prettier.io/docs/en/editors.html) on the Prettier GitHub page.

docusaurus/docs/troubleshooting.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ sidebar_label: Troubleshooting
99
When you save a file while `npm start` is running, the browser should refresh with the updated code.<br>
1010
If this doesn’t happen, try one of the following workarounds:
1111

12+
- Check that your file is imported by you entrypoint. TypeScript will show errors on any of your source files, but webpack only reloads your files if they are directly or indirectly imported by one of your entrypoints.
1213
- If your project is in a Dropbox folder, try moving it out.
1314
- If the watcher doesn’t see a file called `index.js` and you’re referencing it by the folder name, you [need to restart the watcher](https://github.com/facebook/create-react-app/issues/1164) due to a Webpack bug.
1415
- Some editors like Vim and IntelliJ have a “safe write” feature that currently breaks the watcher. You will need to disable it. Follow the instructions in [“Adjusting Your Text Editor”](https://webpack.js.org/guides/development/#adjusting-your-text-editor).

docusaurus/website/core/Footer.js

+7
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ class Footer extends React.Component {
7474
>
7575
Twitter
7676
</a>
77+
<a
78+
href="https://www.contributor-covenant.org/version/1/4/code-of-conduct"
79+
target="_blank"
80+
rel="noreferrer noopener"
81+
>
82+
Contributor Covenant
83+
</a>
7784
</div>
7885
<div>
7986
<h5>More</h5>

docusaurus/website/static/css/custom.css

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
white-space: nowrap;
3434
}
3535

36+
.projectLogo {
37+
display: block;
38+
}
39+
3640
@media only screen and (min-device-width: 360px) and (max-device-width: 736px) {
3741
}
3842

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
"compile:lockfile": "node tasks/compile-lockfile.js"
2020
},
2121
"devDependencies": {
22-
"eslint": "6.1.0",
22+
"eslint": "^6.1.0",
2323
"execa": "1.0.0",
2424
"fs-extra": "^7.0.1",
2525
"get-port": "^4.2.0",
2626
"globby": "^9.1.0",
2727
"husky": "^1.3.1",
28-
"jest": "24.8.0",
28+
"jest": "24.9.0",
2929
"lerna": "3.16.4",
3030
"lerna-changelog": "~0.8.2",
3131
"lint-staged": "^8.0.4",

packages/babel-plugin-named-asset-import/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"devDependencies": {
2222
"babel-plugin-tester": "^6.0.1",
23-
"jest": "24.8.0"
23+
"jest": "24.9.0"
2424
},
2525
"scripts": {
2626
"test": "jest"

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
"test.js"
2222
],
2323
"dependencies": {
24-
"@babel/core": "7.5.5",
24+
"@babel/core": "7.6.0",
2525
"@babel/plugin-proposal-class-properties": "7.5.5",
26-
"@babel/plugin-proposal-decorators": "7.4.4",
26+
"@babel/plugin-proposal-decorators": "7.6.0",
2727
"@babel/plugin-proposal-object-rest-spread": "7.5.5",
2828
"@babel/plugin-syntax-dynamic-import": "7.2.0",
29-
"@babel/plugin-transform-destructuring": "7.5.0",
29+
"@babel/plugin-transform-destructuring": "7.6.0",
3030
"@babel/plugin-transform-flow-strip-types": "7.4.4",
3131
"@babel/plugin-transform-react-display-name": "7.2.0",
32-
"@babel/plugin-transform-runtime": "7.5.5",
33-
"@babel/preset-env": "7.5.5",
32+
"@babel/plugin-transform-runtime": "7.6.0",
33+
"@babel/preset-env": "7.6.0",
3434
"@babel/preset-react": "7.0.0",
35-
"@babel/preset-typescript": "7.3.3",
36-
"@babel/runtime": "7.5.5",
35+
"@babel/preset-typescript": "7.6.0",
36+
"@babel/runtime": "7.6.0",
3737
"babel-plugin-dynamic-import-node": "2.3.0",
3838
"babel-plugin-macros": "2.6.1",
3939
"babel-plugin-transform-react-remove-prop-types": "0.4.24"

packages/confusing-browser-globals/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
"index.js"
2121
],
2222
"devDependencies": {
23-
"jest": "24.8.0"
23+
"jest": "24.9.0"
2424
}
2525
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you want to use this ESLint configuration in a project not built with Create
1919
First, install this package, ESLint and the necessary plugins.
2020

2121
```sh
22-
npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@1.x @typescript-eslint/parser@1.x babel-eslint@10.x eslint@6.x eslint-plugin-flowtype@3.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@1.x
22+
npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@2.x @typescript-eslint/parser@2.x babel-eslint@10.x eslint@6.x eslint-plugin-flowtype@3.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@1.x
2323
```
2424

2525
Then create a file named `.eslintrc.json` with following contents in the root folder of your project:

packages/eslint-config-react-app/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = {
7878
'no-undef': 'off',
7979

8080
// Add TypeScript specific rules (and turn off ESLint equivalents)
81-
'@typescript-eslint/no-angle-bracket-type-assertion': 'warn',
81+
'@typescript-eslint/consistent-type-assertions': 'warn',
8282
'no-array-constructor': 'off',
8383
'@typescript-eslint/no-array-constructor': 'warn',
8484
'@typescript-eslint/no-namespace': 'error',

packages/eslint-config-react-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"index.js"
1616
],
1717
"peerDependencies": {
18-
"@typescript-eslint/eslint-plugin": "1.x",
19-
"@typescript-eslint/parser": "1.x",
18+
"@typescript-eslint/eslint-plugin": "2.x",
19+
"@typescript-eslint/parser": "2.x",
2020
"babel-eslint": "10.x",
2121
"eslint": "6.x",
2222
"eslint-plugin-flowtype": "3.x",

packages/react-app-polyfill/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"stable.js"
2222
],
2323
"dependencies": {
24-
"core-js": "3.1.4",
24+
"core-js": "3.2.1",
2525
"object-assign": "4.1.1",
2626
"promise": "8.0.3",
2727
"raf": "3.4.1",

packages/react-dev-utils/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
],
5252
"dependencies": {
5353
"@babel/code-frame": "7.5.5",
54-
"address": "1.1.0",
55-
"browserslist": "4.6.6",
54+
"address": "1.1.2",
55+
"browserslist": "4.7.0",
5656
"chalk": "2.4.2",
5757
"cross-spawn": "6.0.5",
5858
"detect-port-alt": "1.1.6",
@@ -71,14 +71,14 @@
7171
"pkg-up": "2.0.0",
7272
"react-error-overlay": "^6.0.1",
7373
"recursive-readdir": "2.2.2",
74-
"shell-quote": "1.6.1",
75-
"sockjs-client": "1.3.0",
74+
"shell-quote": "1.7.2",
75+
"sockjs-client": "1.4.0",
7676
"strip-ansi": "5.2.0",
7777
"text-table": "0.2.0"
7878
},
7979
"devDependencies": {
8080
"cross-env": "^5.2.0",
81-
"jest": "24.8.0"
81+
"jest": "24.9.0"
8282
},
8383
"scripts": {
8484
"test": "cross-env FORCE_COLOR=true jest"

packages/react-error-overlay/flow/env.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ declare module 'anser' {
22
declare module.exports: any;
33
}
44

5-
declare module 'babel-code-frame' {
5+
declare module '@babel/code-frame' {
66
declare module.exports: any;
77
}
88

packages/react-error-overlay/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
],
3636
"devDependencies": {
3737
"@babel/code-frame": "7.5.5",
38-
"@babel/core": "7.5.5",
38+
"@babel/core": "7.6.0",
3939
"anser": "1.4.8",
40-
"babel-eslint": "10.0.2",
41-
"babel-jest": "^24.8.0",
40+
"babel-eslint": "10.0.3",
41+
"babel-jest": "^24.9.0",
4242
"babel-loader": "8.0.6",
4343
"babel-preset-react-app": "^9.0.1",
4444
"chalk": "^2.4.2",
4545
"chokidar": "^2.1.2",
46-
"cross-env": "5.2.0",
46+
"cross-env": "5.2.1",
4747
"eslint": "^6.1.0",
4848
"eslint-config-react-app": "^5.0.1",
4949
"eslint-plugin-flowtype": "3.13.0",
@@ -52,7 +52,7 @@
5252
"eslint-plugin-react": "7.14.3",
5353
"flow-bin": "^0.63.1",
5454
"html-entities": "1.2.1",
55-
"jest": "24.8.0",
55+
"jest": "24.9.0",
5656
"jest-fetch-mock": "2.1.2",
5757
"object-assign": "4.1.1",
5858
"promise": "8.0.3",

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

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
/* @flow */
98
import {
109
listenToRuntimeErrors,
1110
crashWithFrames,

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

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
/* @flow */
98
import {
109
register as registerError,
1110
unregister as unregisterError,

packages/react-scripts/config/env.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (!NODE_ENV) {
2323
}
2424

2525
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
26-
var dotenvFiles = [
26+
const dotenvFiles = [
2727
`${paths.dotenv}.${NODE_ENV}.local`,
2828
`${paths.dotenv}.${NODE_ENV}`,
2929
// Don't include `.env.local` for `test` environment

0 commit comments

Comments
 (0)