Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

Commit 9ed30b8

Browse files
committed
Merge tag 'v3.3.1'
2 parents addf8a2 + d7c6842 commit 9ed30b8

File tree

26 files changed

+1417
-1191
lines changed

26 files changed

+1417
-1191
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 react-scripts@3.3.1
115+
```
116+
117+
or
118+
119+
```sh
120+
yarn add --exact react-scripts@3.3.1
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/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/setting-up-your-editor.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,6 @@ Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plug
2222

2323
They are not required for linting. You should see the linter output right in your terminal as well as the browser console. If you prefer the lint results to appear right in your editor, please make sure you install an ESLint plugin/extension.
2424

25-
If you're using TypeScript and Visual Studio Code, the [ESLint Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint#overview) currently [doesn't have TypeScript support enabled by default](https://github.com/Microsoft/vscode-eslint/issues/609). To enable TypeScript support in the ESLint extension, add the following to your project's Visual Studio Code settings file, located at `.vscode/settings.json` (you can create this file if it doesn't already exist):
26-
27-
```json
28-
{
29-
"eslint.validate": [
30-
"javascript",
31-
"javascriptreact",
32-
{ "language": "typescript", "autoFix": true },
33-
{ "language": "typescriptreact", "autoFix": true }
34-
]
35-
}
36-
```
37-
38-
Now your editor should report the linting warnings.
39-
4025
Note that even if you customise your ESLint config, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes.
4126

4227
If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules.
@@ -166,8 +151,7 @@ Next we add a 'lint-staged' field to the `package.json`, for example:
166151
},
167152
+ "lint-staged": {
168153
+ "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
169-
+ "prettier --write",
170-
+ "git add"
154+
+ "prettier --write"
171155
+ ]
172156
+ },
173157
"scripts": {

docusaurus/docs/supported-browsers-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ Here is an example `browserslist` that is specified in `package.json`:
5050
}
5151
```
5252

53-
> Note that this does not include polyfills automatically for you. You will still need to polyfill language features (see above) as needed based on the browsers your are supporting.
53+
> Note that this does not include polyfills automatically for you. You will still need to polyfill language features (see above) as needed based on the browsers you are supporting.
5454
5555
> When editing the `browserslist` config, you may notice that your changes don't get picked up right away. This is due to an [issue in babel-loader](https://github.com/babel/babel-loader/issues/690) not detecting the change in your `package.json`. A quick solution is to delete the `node_modules/.cache` folder and try again.

docusaurus/docs/troubleshooting.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ If this doesn’t happen, try one of the following workarounds:
2020

2121
If none of these solutions help please leave a comment [in this thread](https://github.com/facebook/create-react-app/issues/659).
2222

23+
## `npm start` fail due to watch error
24+
25+
If you are using a Linux operating system and see an error similar to: `ENOSPC: System limit for number of file watchers reached`, you can fix the issue by increasing the `fs.inotify.max_user_watches` setting of your operating system.
26+
27+
If you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal:
28+
29+
```sh
30+
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
31+
```
32+
33+
If you are running ArchLinux, run the following command instead:
34+
35+
```sh
36+
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
37+
```
38+
39+
Then paste it in your terminal and press on enter to run it. You could find more information [here](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details).
40+
2341
## `npm test` hangs or crashes on macOS Sierra
2442

2543
If you run `npm test` and the console gets stuck after printing `react-scripts test` to the console there might be a problem with your [Watchman](https://facebook.github.io/watchman/) installation as described in [facebook/create-react-app#713](https://github.com/facebook/create-react-app/issues/713).

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
"tempy": "^0.2.1",
4444
"wait-for-localhost": "^3.1.0"
4545
},
46+
"resolutions": {
47+
"mkdirp": "0.5.1"
48+
},
4649
"husky": {
4750
"hooks": {
4851
"pre-commit": "lint-staged"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-plugin-named-asset-import",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"description": "Babel plugin for named asset imports in Create React App",
55
"repository": {
66
"type": "git",

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

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -117,29 +117,29 @@ module.exports = function(api, opts, env) {
117117
// Experimental macros support. Will be documented after it's had some time
118118
// in the wild.
119119
require('babel-plugin-macros'),
120-
// Necessary to include regardless of the environment because
121-
// in practice some other transforms (such as object-rest-spread)
122-
// don't work without it: https://github.com/babel/babel/issues/7215
123-
[
124-
require('@babel/plugin-transform-destructuring').default,
125-
{
126-
// Use loose mode for performance:
127-
// https://github.com/facebook/create-react-app/issues/5602
128-
loose: false,
129-
selectiveLoose: [
130-
'useState',
131-
'useEffect',
132-
'useContext',
133-
'useReducer',
134-
'useCallback',
135-
'useMemo',
136-
'useRef',
137-
'useImperativeHandle',
138-
'useLayoutEffect',
139-
'useDebugValue',
140-
],
141-
},
142-
],
120+
// Disabled as it's handled automatically by preset-env, and `selectiveLoose` isn't
121+
// yet merged into babel: https://github.com/babel/babel/pull/9486
122+
// Related: https://github.com/facebook/create-react-app/pull/8215
123+
// [
124+
// require('@babel/plugin-transform-destructuring').default,
125+
// {
126+
// // Use loose mode for performance:
127+
// // https://github.com/facebook/create-react-app/issues/5602
128+
// loose: false,
129+
// selectiveLoose: [
130+
// 'useState',
131+
// 'useEffect',
132+
// 'useContext',
133+
// 'useReducer',
134+
// 'useCallback',
135+
// 'useMemo',
136+
// 'useRef',
137+
// 'useImperativeHandle',
138+
// 'useLayoutEffect',
139+
// 'useDebugValue',
140+
// ],
141+
// },
142+
// ],
143143
// Turn on legacy decorators for TypeScript files
144144
isTypeScriptEnabled && [
145145
require('@babel/plugin-proposal-decorators').default,
@@ -156,15 +156,6 @@ module.exports = function(api, opts, env) {
156156
],
157157
// Adds Numeric Separators
158158
require('@babel/plugin-proposal-numeric-separator').default,
159-
// The following two plugins use Object.assign directly, instead of Babel's
160-
// extends helper. Note that this assumes `Object.assign` is available.
161-
// { ...todo, completed: true }
162-
[
163-
require('@babel/plugin-proposal-object-rest-spread').default,
164-
{
165-
useBuiltIns: true,
166-
},
167-
],
168159
// Polyfills the runtime needed for async/await, generators, and friends
169160
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
170161
[
@@ -194,15 +185,6 @@ module.exports = function(api, opts, env) {
194185
removeImport: true,
195186
},
196187
],
197-
// Adds syntax support for import()
198-
require('@babel/plugin-syntax-dynamic-import').default,
199-
// Adds syntax support for optional chaining (?.)
200-
require('@babel/plugin-proposal-optional-chaining').default,
201-
// Adds syntax support for default value using ?? operator
202-
require('@babel/plugin-proposal-nullish-coalescing-operator').default,
203-
isEnvTest &&
204-
// Transform dynamic import to require
205-
require('babel-plugin-dynamic-import-node'),
206188
].filter(Boolean),
207189
overrides: [
208190
isFlowEnabled && {

0 commit comments

Comments
 (0)