Skip to content

Commit b40620e

Browse files
authored
Merge branch 'master' into master
2 parents 307f3fa + 687c4eb commit b40620e

Some content is hidden

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

51 files changed

+1977
-1361
lines changed

CHANGELOG.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,125 @@
1+
## 3.3.1 (2020-01-31)
2+
3+
v3.3.1 is a maintenance release that includes minor bug fixes and documentation updates.
4+
5+
#### :bug: Bug Fix
6+
7+
- `cra-template`
8+
- [#8255](https://github.com/facebook/create-react-app/pull/8255) Add "Disallow:" to robots.txt ([@tomoyaf](https://github.com/tomoyaf))
9+
- `react-scripts`
10+
- [#8281](https://github.com/facebook/create-react-app/pull/8281) Fix sass importLoaders ([@mariusc23](https://github.com/mariusc23))
11+
- [#8099](https://github.com/facebook/create-react-app/pull/8099) Add titleProp to SVGR ReactComponent type definition ([@rhnorskov](https://github.com/rhnorskov))
12+
- [#8028](https://github.com/facebook/create-react-app/pull/8028) fix(react-scripts): proactively append to .gitignore during generation ([@bmuenzenmeyer](https://github.com/bmuenzenmeyer))
13+
- [#8106](https://github.com/facebook/create-react-app/pull/8106) Fix CSS font-face minification ([@sidonaldson](https://github.com/sidonaldson))
14+
- `babel-preset-react-app`
15+
- [#8120](https://github.com/facebook/create-react-app/pull/8120) Sync dependencies babel config ([@ianschmitz](https://github.com/ianschmitz))
16+
- `react-dev-utils`
17+
- [#8116](https://github.com/facebook/create-react-app/pull/8116) Add slashes to WebSocket protocol URL ([@Baael](https://github.com/Baael))
18+
- [#8079](https://github.com/facebook/create-react-app/pull/8079) webpackHotDevClient now uses wss when https is used ([@mikecaulley](https://github.com/mikecaulley))
19+
20+
#### :nail_care: Enhancement
21+
22+
- `react-error-overlay`
23+
- [#6548](https://github.com/facebook/create-react-app/pull/6548) Add helpful message to the footer ([@pyrogenic](https://github.com/pyrogenic))
24+
- `cra-template-typescript`
25+
- [#8177](https://github.com/facebook/create-react-app/pull/8177) Remove React.FC from Typescript template ([@Retsam](https://github.com/Retsam))
26+
- `cra-template-typescript`, `cra-template`, `react-scripts`
27+
- [#8219](https://github.com/facebook/create-react-app/pull/8219) Add template support for any package.json keys (#8082) ([@tomvalorsa](https://github.com/tomvalorsa))
28+
- `create-react-app`
29+
- [#8298](https://github.com/facebook/create-react-app/pull/8298) Support shorthand scoped templates ([@kevin940726](https://github.com/kevin940726))
30+
- [#8168](https://github.com/facebook/create-react-app/pull/8168) Add current version and bin location to --info output ([@heyimalex](https://github.com/heyimalex))
31+
- `cra-template-typescript`, `cra-template`
32+
- [#8194](https://github.com/facebook/create-react-app/pull/8194) Replace favicon in templates ([@heyimalex](https://github.com/heyimalex))
33+
- `eslint-config-react-app`
34+
- [#7803](https://github.com/facebook/create-react-app/pull/7803) Remove error for @typescript-eslint/no-namespace ([@szhu](https://github.com/szhu))
35+
36+
#### :memo: Documentation
37+
38+
- Other
39+
- [#8380](https://github.com/facebook/create-react-app/pull/8380) docs: Add troubleshooting documentation on ENOSPC ([@huchenme](https://github.com/huchenme))
40+
- [#8394](https://github.com/facebook/create-react-app/pull/8394) Update docs according to lint-staged v10 ([@lukyth](https://github.com/lukyth))
41+
- [#8307](https://github.com/facebook/create-react-app/pull/8307) Remove outdated docs regarding vscode eslint extension and typescript autofix ([@alex-vukovity-cko](https://github.com/alex-vukovity-cko))
42+
- [#8247](https://github.com/facebook/create-react-app/pull/8247) Update setting-up-your-editor.md ([@dev-xu](https://github.com/dev-xu))
43+
- [#8092](https://github.com/facebook/create-react-app/pull/8092) Update custom template docs with instructions for testing custom template locally ([@kevinold](https://github.com/kevinold))
44+
- [#8293](https://github.com/facebook/create-react-app/pull/8293) Minor grammatical edit ([@egrim](https://github.com/egrim))
45+
- [#8212](https://github.com/facebook/create-react-app/pull/8212) Little typo ([@sonyarianto](https://github.com/sonyarianto))
46+
- [#8147](https://github.com/facebook/create-react-app/pull/8147) update PWA docs links to point to template package ([@peet](https://github.com/peet))
47+
- [#8132](https://github.com/facebook/create-react-app/pull/8132) Add package-runner note to readme ([@JeromeDeLeon](https://github.com/JeromeDeLeon))
48+
- [#8111](https://github.com/facebook/create-react-app/pull/8111) chore: update docusaurus & tweak site ([@endiliey](https://github.com/endiliey))
49+
- [#8080](https://github.com/facebook/create-react-app/pull/8080) Fix typo in CHANGELOG.md ([@Trontor](https://github.com/Trontor))
50+
- [#8077](https://github.com/facebook/create-react-app/pull/8077) Add custom-templates to docs sidebar ([@ianschmitz](https://github.com/ianschmitz))
51+
- `babel-preset-react-app`
52+
- [#8124](https://github.com/facebook/create-react-app/pull/8124) Fix typo in comment: `?.` is right, `.?` is not ([@vadzim](https://github.com/vadzim))
53+
54+
#### :house: Internal
55+
56+
- `create-react-app`
57+
- [#8178](https://github.com/facebook/create-react-app/pull/8178) Minor refactors in create-react-app ([@heyimalex](https://github.com/heyimalex))
58+
59+
#### :hammer: Underlying Tools
60+
61+
- `babel-preset-react-app`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
62+
- [#8353](https://github.com/facebook/create-react-app/pull/8353) Remove outdated babel plugins ([@ianschmitz](https://github.com/ianschmitz))
63+
- [#8324](https://github.com/facebook/create-react-app/pull/8324) Update Dependencies ([@RDIL](https://github.com/RDIL))
64+
- [#8122](https://github.com/facebook/create-react-app/pull/8122) Fix CI build ([@ianschmitz](https://github.com/ianschmitz))
65+
- `react-dev-utils`
66+
- [#8364](https://github.com/facebook/create-react-app/pull/8364) Downgrade open from 7.0.0 to 6.4.0 ([@vince1995](https://github.com/vince1995))
67+
- [#8163](https://github.com/facebook/create-react-app/pull/8163) Bump pkgUp ([@andriijas](https://github.com/andriijas))
68+
- `babel-plugin-named-asset-import`
69+
- [#8171](https://github.com/facebook/create-react-app/pull/8171) Bump babel-plugin-tester and fix breaking changes ([@andriijas](https://github.com/andriijas))
70+
- `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
71+
- [#8176](https://github.com/facebook/create-react-app/pull/8176) Bump internal dependencies ([@andriijas](https://github.com/andriijas))
72+
- `create-react-app`, `react-dev-utils`, `react-error-overlay`
73+
- [#8164](https://github.com/facebook/create-react-app/pull/8164) Bump chalk ([@andriijas](https://github.com/andriijas))
74+
- `react-error-overlay`, `react-scripts`
75+
- [#8102](https://github.com/facebook/create-react-app/pull/8102) [Security] Update terser webpack plugin ([@RDIL](https://github.com/RDIL))
76+
77+
#### Committers: 29
78+
79+
- Alex Guerra ([@heyimalex](https://github.com/heyimalex))
80+
- Alex James Vukovity ([@alex-vukovity-cko](https://github.com/alex-vukovity-cko))
81+
- Andreas Cederström ([@andriijas](https://github.com/andriijas))
82+
- Boyuan Xu ([@dev-xu](https://github.com/dev-xu))
83+
- Brian Muenzenmeyer ([@bmuenzenmeyer](https://github.com/bmuenzenmeyer))
84+
- Endi ([@endiliey](https://github.com/endiliey))
85+
- Evan Grim ([@egrim](https://github.com/egrim))
86+
- Hu Chen ([@huchenme](https://github.com/huchenme))
87+
- Ian Schmitz ([@ianschmitz](https://github.com/ianschmitz))
88+
- Jerome De Leon ([@JeromeDeLeon](https://github.com/JeromeDeLeon))
89+
- Joshua Pollak ([@pyrogenic](https://github.com/pyrogenic))
90+
- Kai Hao ([@kevin940726](https://github.com/kevin940726))
91+
- Kanitkorn Sujautra ([@lukyth](https://github.com/lukyth))
92+
- Kevin Old ([@kevinold](https://github.com/kevinold))
93+
- Marius Craciunoiu ([@mariusc23](https://github.com/mariusc23))
94+
- Mike Caulley ([@mikecaulley](https://github.com/mikecaulley))
95+
- Peet Goddard ([@peet](https://github.com/peet))
96+
- Rasmus Nørskov ([@rhnorskov](https://github.com/rhnorskov))
97+
- Reece Dunham ([@RDIL](https://github.com/RDIL))
98+
- Sean Zhu ([@szhu](https://github.com/szhu))
99+
- Simon Donaldson ([@sidonaldson](https://github.com/sidonaldson))
100+
- Sony AK ([@sonyarianto](https://github.com/sonyarianto))
101+
- Tom Valorsa ([@tomvalorsa](https://github.com/tomvalorsa))
102+
- Tomoya Fujita ([@tomoyaf](https://github.com/tomoyaf))
103+
- Vadzim ([@vadzim](https://github.com/vadzim))
104+
- Vincent Semrau ([@vince1995](https://github.com/vince1995))
105+
- Wojciech Zieliński ([@Baael](https://github.com/Baael))
106+
- [@Retsam](https://github.com/Retsam)
107+
- [@Trontor](https://github.com/Trontor)
108+
109+
### Migrating from 3.3.0 to 3.3.1
110+
111+
Inside any created project that has not been ejected, run:
112+
113+
```sh
114+
npm install --save --save-exact [email protected]
115+
```
116+
117+
or
118+
119+
```sh
120+
yarn add --exact [email protected]
121+
```
122+
1123
## 3.3.0 (2019-12-04)
2124

3125
v3.3.0 is a minor release that adds new features, including custom templates and support for the new optional chaining and nullish coalescing operators.

docusaurus/docs/adding-images-fonts-and-files.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,15 @@ One way to add SVG files was described in the section above. You can also import
5151

5252
```js
5353
import { ReactComponent as Logo } from './logo.svg';
54-
const App = () => (
55-
<div>
56-
{/* Logo is an actual React component */}
57-
<Logo />
58-
</div>
59-
);
54+
55+
function App() {
56+
return (
57+
<div>
58+
{/* Logo is an actual React component */}
59+
<Logo />
60+
</div>
61+
);
62+
}
6063
```
6164

6265
This is handy if you don't want to load SVG as a separate file. Don't forget the curly braces in the import! The `ReactComponent` import name is significant and tells Create React App that you want a React component that renders an SVG, rather than its filename.

docusaurus/docs/advanced-configuration.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ You can adjust various development and production settings by setting environmen
1414
| HOST | ✅ Used | 🚫 Ignored | By default, the development web server binds to all hostnames on the device (`localhost`, LAN network address, etc.). You may use this variable to specify a different host. |
1515
| PORT | ✅ Used | 🚫 Ignored | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. |
1616
| HTTPS | ✅ Used | 🚫 Ignored | When set to `true`, Create React App will run the development server in `https` mode. |
17-
| PUBLIC_URL | 🚫 Ignored | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. |
17+
| WDS_SOCKET_HOST | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket hostname for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.hostname` for the SockJS hostname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockhost) for more details. |
18+
| WDS_SOCKET_PATH | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket path for hot module reloading. Normally, `webpack-dev-server` defaults to `/sockjs-node` for the SockJS pathname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockpath) for more details. |
19+
| WDS_SOCKET_PORT | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket port for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.port` for the SockJS port. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockport) for more details. |
20+
| PUBLIC_URL | ✅ Used | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. |
1821
| CI | ✅ Used | ✅ Used | When set to `true`, Create React App treats warnings as failures in the build. It also makes the test runner non-watching. Most CIs set this flag by default. |
1922
| REACT_EDITOR | ✅ Used | 🚫 Ignored | When an app crashes in development, you will see an error overlay with clickable stack trace. When you click on it, Create React App will try to determine the editor you are using based on currently running processes, and open the relevant source file. You can [send a pull request to detect your editor of choice](https://github.com/facebook/create-react-app/issues/2636). Setting this environment variable overrides the automatic detection. If you do it, make sure your systems [PATH](<https://en.wikipedia.org/wiki/PATH_(variable)>) environment variable points to your editor’s bin folder. You can also set it to `none` to disable it completely. |
2023
| CHOKIDAR_USEPOLLING | ✅ Used | 🚫 Ignored | When set to `true`, the watcher runs in polling mode, as necessary inside a VM. Use this option if `npm start` isn't detecting changes. |

docusaurus/docs/custom-templates.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,8 @@ You'll notice that Custom Templates are always named in the format `cra-template
1111

1212
Scoped templates are also supported, under the name `@[scope-name]/cra-template` or `@[scope-name]/cra-template-[template-name]`, which can be installed via `@[scope]` and `@[scope]/[template-name]` respectively.
1313

14-
### npm
15-
16-
```sh
17-
npm init react-app my-app --template [template-name]
18-
```
19-
20-
### Yarn
21-
2214
```sh
23-
yarn create react-app my-app --template [template-name]
15+
npx create-react-app my-app --template [template-name]
2416
```
2517

2618
## Finding custom templates
@@ -52,6 +44,14 @@ my-app/
5244
index.js (or index.tsx)
5345
```
5446

47+
### Testing a template
48+
49+
To test a template locally, pass the file path to the directory of your template source using the `file:` prefix.
50+
51+
```sh
52+
npx create-react-app my-app --template file:../path/to/your/template/cra-template-[template-name]
53+
```
54+
5555
### The `template` folder
5656

5757
This folder is copied to the user's app directory as Create React App installs. During this process, the file `gitignore` is renamed to `.gitignore`.

docusaurus/docs/running-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,12 @@ const localStorageMock = {
245245
global.localStorage = localStorageMock;
246246
```
247247

248-
> Note: Keep in mind that if you decide to "eject" before creating `src/setupTests.js`, the resulting `package.json` file won't contain any reference to it, so you should manually create the property `setupTestFrameworkScriptFile` in the configuration for Jest, something like the following:
248+
> Note: Keep in mind that if you decide to "eject" before creating `src/setupTests.js`, the resulting `package.json` file won't contain any reference to it, so you should manually create the property `setupFilesAfterEnv` in the configuration for Jest, something like the following:
249249
250250
> ```js
251251
> "jest": {
252252
> // ...
253-
> "setupTestFrameworkScriptFile": "<rootDir>/src/setupTests.js"
253+
> "setupFilesAfterEnv": ["<rootDir>/src/setupTests.js"]
254254
> }
255255
> ```
256256

0 commit comments

Comments
 (0)