Skip to content

Commit bd63ae1

Browse files
authored
Merge pull request #1 from facebook/master
merge original code
2 parents 2030ee1 + 025f273 commit bd63ae1

File tree

171 files changed

+6747
-5549
lines changed

Some content is hidden

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

171 files changed

+6747
-5549
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/ISSUE_TEMPLATE/question.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ about: Get help with Create React App
44
labels: 'needs triage'
55
---
66

7-
If you have a general question about Create React App or about building an app with Create React App we encourage you to post on our Spectrum community instead of this issue tracker. The maintainers and other community members can provide help and answer your questions there: https://spectrum.chat/create-react-app
7+
If you have a general question about Create React App or about building an app with Create React App we encourage you to post in GitHub Discussions instead of this issue tracker. The maintainers and other community members can provide help and answer your questions there: https://github.com/facebook/create-react-app/discussions
88

99
If you're looking for general information on using React, the React docs have a list of resources: https://reactjs.org/community/support.html
1010

.github/stale.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ daysUntilClose: 5
99

1010
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
1111
exemptLabels:
12-
- "contributions: claimed"
13-
- "contributions: up for grabs!"
14-
- "good first issue"
15-
- "issue: announcement"
16-
- "issue: bug"
17-
- "issue: needs investigation"
18-
- "issue: proposal"
19-
- "tag: breaking change"
20-
- "tag: bug fix"
21-
- "tag: documentation"
22-
- "tag: enhancement"
23-
- "tag: internal"
24-
- "tag: new feature"
25-
- "tag: underlying tools"
12+
- 'contributions: claimed'
13+
- 'contributions: up for grabs!'
14+
- 'good first issue'
15+
- 'issue: announcement'
16+
- 'issue: bug'
17+
- 'issue: needs investigation'
18+
- 'issue: proposal'
19+
- 'tag: breaking change'
20+
- 'tag: bug fix'
21+
- 'tag: documentation'
22+
- 'tag: enhancement'
23+
- 'tag: internal'
24+
- 'tag: new feature'
25+
- 'tag: underlying tools'
2626

2727
# Set to true to ignore issues in a project (defaults to false)
2828
exemptProjects: true

.prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"arrowParens": "avoid",
23
"trailingComma": "es5",
34
"singleQuote": true,
45
"semi": true

CHANGELOG-0.x.md

+447-386
Large diffs are not rendered by default.

CHANGELOG.md

+99
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,102 @@
1+
## 3.4.3 (2020-08-12)
2+
3+
v3.4.2 release bumps `terser-webpack-plugin` to a version for which `npm audit` does not report a vulnerability. Note that **this vulnerability did not affect Create React App projects**, so this change is only necessary to satisfy auditing tools.
4+
5+
### Migrating from 3.4.2 to 3.4.3
6+
7+
Inside any created project that has not been ejected, run:
8+
9+
```sh
10+
npm install --save --save-exact react-scripts@3.4.3
11+
```
12+
13+
or
14+
15+
```sh
16+
yarn add --exact react-scripts@3.4.3
17+
```
18+
19+
## 3.4.2 (2020-08-11)
20+
21+
v3.4.2 release bumps `webpack-dev-server` to a version for which `npm audit` does not report a vulnerability. Note that **this vulnerability did not affect Create React App projects**, so this change is only necessary to satisfy auditing tools.
22+
23+
### Migrating from 3.4.1 to 3.4.2
24+
25+
Inside any created project that has not been ejected, run:
26+
27+
```sh
28+
npm install --save --save-exact react-scripts@3.4.2
29+
```
30+
31+
or
32+
33+
```sh
34+
yarn add --exact react-scripts@3.4.2
35+
```
36+
37+
## 3.4.1 (2020-03-20)
38+
39+
v3.4.1 is a maintenance release that includes minor bug fixes and documentation updates including upgrading Babel to fix a bug in the 7.8 release line. This release also brings support for TypeScript 3.8.
40+
41+
#### :bug: Bug Fix
42+
43+
- `react-scripts`
44+
- [#8276](https://github.com/facebook/create-react-app/pull/8276) Use native ESLint behaviour when extending ([@mrmckeb](https://github.com/mrmckeb))
45+
- [#7203](https://github.com/facebook/create-react-app/pull/7203) Closes webpack dev server and exits process on "end" stdin ([@kelseyleftwich](https://github.com/kelseyleftwich))
46+
- `babel-preset-react-app`
47+
- [#8526](https://github.com/facebook/create-react-app/pull/8526) Fix optional chaining and nullish coalescing support ([@ianschmitz](https://github.com/ianschmitz))
48+
- `cra-template`, `eslint-config-react-app`, `react-scripts`
49+
- [#7790](https://github.com/facebook/create-react-app/pull/7790) Widen eslint-config-react-app peer dependency versions ([@lukyth](https://github.com/lukyth))
50+
51+
#### :nail_care: Enhancement
52+
53+
- `cra-template-typescript`, `cra-template`
54+
- [#8558](https://github.com/facebook/create-react-app/pull/8558) Add React.StrictMode to default templates ([@connkat](https://github.com/connkat))
55+
- `react-scripts`
56+
- [#8539](https://github.com/facebook/create-react-app/pull/8539) allow specification of package.main in template.json ([@EvanBoyle](https://github.com/EvanBoyle))
57+
58+
#### :memo: Documentation
59+
60+
- Other
61+
- [#8515](https://github.com/facebook/create-react-app/pull/8515) Fix proxying API request docs ([@hjr3](https://github.com/hjr3))
62+
- [#8561](https://github.com/facebook/create-react-app/pull/8561) Indicate that the file structure is the template's ([@Vinnl](https://github.com/Vinnl))
63+
- `react-scripts`
64+
- [#8276](https://github.com/facebook/create-react-app/pull/8276) Use native ESLint behaviour when extending ([@mrmckeb](https://github.com/mrmckeb))
65+
66+
#### :hammer: Underlying Tools
67+
68+
- `babel-preset-react-app`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
69+
- [#8681](https://github.com/facebook/create-react-app/pull/8681) Update to Babel 7.9 ([@ianschmitz](https://github.com/ianschmitz))
70+
- [#8620](https://github.com/facebook/create-react-app/pull/8620) Bump dependencies ([@ianschmitz](https://github.com/ianschmitz))
71+
- `react-scripts`
72+
- [#8509](https://github.com/facebook/create-react-app/pull/8509) Bumps pnp-webpack-plugin ([@arcanis](https://github.com/arcanis))
73+
74+
#### Committers: 9
75+
76+
- Brody McKee ([@mrmckeb](https://github.com/mrmckeb))
77+
- Evan Boyle ([@EvanBoyle](https://github.com/EvanBoyle))
78+
- Herman J. Radtke III ([@hjr3](https://github.com/hjr3))
79+
- Ian Schmitz ([@ianschmitz](https://github.com/ianschmitz))
80+
- Kanitkorn Sujautra ([@lukyth](https://github.com/lukyth))
81+
- KatCon ([@connkat](https://github.com/connkat))
82+
- Kelsey Leftwich ([@kelseyleftwich](https://github.com/kelseyleftwich))
83+
- Maël Nison ([@arcanis](https://github.com/arcanis))
84+
- Vincent ([@Vinnl](https://github.com/Vinnl))
85+
86+
### Migrating from 3.4.0 to 3.4.1
87+
88+
Inside any created project that has not been ejected, run:
89+
90+
```sh
91+
npm install --save --save-exact react-scripts@3.4.1
92+
```
93+
94+
or
95+
96+
```sh
97+
yarn add --exact react-scripts@3.4.1
98+
```
99+
1100
## 3.4.0 (2020-02-14)
2101

3102
v3.4.0 is a minor release that adds new features, including support for SSL and setting `PUBLIC_URL` in development. It also includes a fix for Hot Module Reloading with CSS Modules as well as other bug fixes.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ All functionality must be retained (and configuration given to the user) if they
9494

9595
2. Run `yarn` in the root `create-react-app` folder.
9696

97-
Once it is done, you can modify any file locally and run `yarn start`, `yarn test` or `yarn build` like you can in a generated project.
97+
Once it is done, you can modify any file locally and run `yarn start`, `yarn test` or `yarn build` like you can in a generated project. It will serve the application from the files located in `packages/cra-template/template`.
9898

9999
If you want to try out the end-to-end flow with the global CLI, you can do this too:
100100

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Create React App [![Build Status](https://dev.azure.com/facebook/create-react-app/_apis/build/status/facebook.create-react-app?branchName=master)](https://dev.azure.com/facebook/create-react-app/_build/latest?definitionId=1&branchName=master) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md)
22

3+
<img alt="Logo" align="right" src="https://create-react-app.dev/img/logo.svg" width="20%" />
4+
35
Create React apps with no build configuration.
46

57
- [Creating an App](#creating-an-app) – How to create a new app.
68
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
79

810
Create React App works on macOS, Windows, and Linux.<br>
911
If something doesn’t work, please [file an issue](https://github.com/facebook/create-react-app/issues/new).<br>
10-
If you have questions or need help, please ask in our [Spectrum](https://spectrum.chat/create-react-app) community.
12+
If you have questions or need help, please ask in [GitHub Discussions](https://github.com/facebook/create-react-app/discussions).
1113

1214
## Quick Overview
1315

@@ -17,7 +19,7 @@ cd my-app
1719
npm start
1820
```
1921

20-
If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that npx always uses the latest version.
22+
If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` or `yarn global remove create-react-app` to ensure that npx always uses the latest version.
2123

2224
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_
2325

@@ -86,6 +88,7 @@ my-app
8688
├── index.js
8789
├── logo.svg
8890
└── serviceWorker.js
91+
└── setupTests.js
8992
```
9093

9194
No configuration or complicated folder structures, only the files you need to build your app.<br>
@@ -174,9 +177,9 @@ Here are a few common cases where you might want to try something else:
174177

175178
- If you need to **publish a React component**, [nwb](https://github.com/insin/nwb) can [also do this](https://github.com/insin/nwb#react-components-and-libraries), as well as [Neutrino's react-components preset](https://neutrino.js.org/packages/react-components/).
176179

177-
- If you want to do **server rendering** with React and Node.js, check out [Next.js](https://github.com/zeit/next.js/) or [Razzle](https://github.com/jaredpalmer/razzle). Create React App is agnostic of the backend, and only produces static HTML/JS/CSS bundles.
180+
- If you want to do **server rendering** with React and Node.js, check out [Next.js](https://nextjs.org/) or [Razzle](https://github.com/jaredpalmer/razzle). Create React App is agnostic of the backend, and only produces static HTML/JS/CSS bundles.
178181

179-
- If your website is **mostly static** (for example, a portfolio or a blog), consider using [Gatsby](https://www.gatsbyjs.org/) instead. Unlike Create React App, it pre-renders the website into HTML at the build time.
182+
- If your website is **mostly static** (for example, a portfolio or a blog), consider using [Gatsby](https://www.gatsbyjs.org/) or [Next.js](https://nextjs.org/). Unlike Create React App, Gatsby pre-renders the website into HTML at build time. Next.js supports both server rendering and pre-rendering.
180183

181184
- Finally, if you need **more customization**, check out [Neutrino](https://neutrino.js.org/) and its [React preset](https://neutrino.js.org/packages/react/).
182185

SECURITY.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reporting Security Issues
2+
3+
If you believe you have found a security vulnerability in Create React App, we encourage you to let us know right away. We will investigate all legitimate reports and do our best to quickly fix the problem.
4+
5+
Please refer to the following page for our responsible disclosure policy, reward guidelines, and those things that should not be reported:
6+
7+
https://www.facebook.com/whitehat

azure-pipelines-test-job.yml

+38-40
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
1-
#
2-
# Azure Pipelines job for building and testing create-react-app on Linux, Windows, and macOS.
3-
#
4-
5-
parameters:
6-
name: ''
7-
testScript: ''
8-
configurations:
9-
LinuxNode8: { vmImage: 'ubuntu-16.04', nodeVersion: 8.x }
10-
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
11-
# WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x }
12-
# WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x }
13-
14-
jobs:
15-
- job: ${{ parameters.name }}
16-
strategy:
17-
matrix:
18-
${{ insert }}: ${{ parameters.configurations }}
19-
pool:
20-
vmImage: $(vmImage)
21-
steps:
22-
- script: |
23-
git config --global core.autocrlf false
24-
git config --global user.name "Create React App"
25-
git config --global user.email "cra@email.com"
26-
displayName: 'Initialize Git config'
27-
28-
- checkout: self
29-
path: create-react-app
30-
31-
- task: NodeTool@0
32-
inputs:
33-
versionSpec: $(nodeVersion)
34-
displayName: 'Install Node.js'
35-
36-
- script: yarn --frozen-lockfile
37-
displayName: 'Run yarn'
38-
39-
- bash: ${{ parameters.testScript }}
40-
displayName: 'Run tests'
1+
#
2+
# Azure Pipelines job for building and testing create-react-app on Linux, Windows, and macOS.
3+
#
4+
5+
parameters:
6+
name: ''
7+
testScript: ''
8+
configurations:
9+
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
10+
LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x }
11+
12+
jobs:
13+
- job: ${{ parameters.name }}
14+
strategy:
15+
matrix:
16+
${{ insert }}: ${{ parameters.configurations }}
17+
pool:
18+
vmImage: $(vmImage)
19+
steps:
20+
- script: |
21+
git config --global core.autocrlf false
22+
git config --global user.name "Create React App"
23+
git config --global user.email "cra@email.com"
24+
displayName: 'Initialize Git config'
25+
26+
- checkout: self
27+
path: create-react-app
28+
29+
- task: NodeTool@0
30+
inputs:
31+
versionSpec: $(nodeVersion)
32+
displayName: 'Install Node.js'
33+
34+
- script: yarn --frozen-lockfile
35+
displayName: 'Run yarn'
36+
37+
- bash: ${{ parameters.testScript }}
38+
displayName: 'Run tests'

0 commit comments

Comments
 (0)