Skip to content

Commit c2e1223

Browse files
committed
Merge tag 'v3.3.0' into modifications
2 parents 747996a + 9a817dd commit c2e1223

File tree

281 files changed

+9891
-5883
lines changed

Some content is hidden

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

281 files changed

+9891
-5883
lines changed

.alexignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
3+
CHANGELOG*
4+
CODE_OF_CONDUCT.md

.alexrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"allow": [
3+
"attacks",
4+
"colors",
5+
"conservative",
6+
"crashes",
7+
"executed",
8+
"executes",
9+
"execution",
10+
"failed",
11+
"hook",
12+
"host-hostess",
13+
"hostesses-hosts",
14+
"invalid",
15+
"remain",
16+
"watchman-watchwoman"
17+
]
18+
}

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
packages/ @bugzpodder @ianschmitz @iansu @mrmckeb @petetnt
1+
packages/ @ianschmitz @iansu @mrmckeb @petetnt
22
docusaurus/ @amyrlam @iansu

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Install
11+
run: yarn --no-progress --non-interactive --no-lockfile
12+
- name: Build
13+
run: yarn build

.github/workflows/lint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Lint
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Install
11+
run: yarn --no-progress --non-interactive --no-lockfile
12+
- name: Alex
13+
run: yarn alex

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ yarn-debug.log*
1212
yarn-error.log*
1313
/.changelog
1414
.npm/
15+
yarn.lock

CHANGELOG-1.x.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,16 +1579,18 @@ After the regular update procedure above, add these line to `<head>` in `public/
15791579
```html
15801580
<meta name="theme-color" content="#000000" />
15811581
<!--
1582-
manifest.json provides metadata used when your web app is added to the
1583-
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
1584-
-->
1582+
manifest.json provides metadata used when your web app is added to the
1583+
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
1584+
-->
15851585
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
15861586
```
15871587

15881588
Add `<noscript>` to `<body>` in `public/index.html`:
15891589

15901590
```html
1591-
<noscript> You need to enable JavaScript to run this app. </noscript>
1591+
<noscript>
1592+
You need to enable JavaScript to run this app.
1593+
</noscript>
15921594
```
15931595

15941596
Then create a file called `public/manifest.json` that looks like this:

CHANGELOG.md

Lines changed: 254 additions & 0 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Loving Create React App and want to get involved? Thanks! There are plenty of ways you can help.
44

5-
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
5+
Please take a moment to review this document in order to make the contribution process straightforward and effective for everyone involved.
66

77
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
88

@@ -15,23 +15,27 @@ Here are a few examples of them in action.
1515

1616
### Convention
1717

18+
<!--alex disable easy-->
19+
1820
Instead of letting the user specify the entry filename, we always assume it to be `src/index.js`. Rather than letting the user specify the output bundle name, we generate it, but make sure to include the content hash in it. Whenever possible, we want to leverage convention to make good choices for the user, especially in cases where it’s easy to misconfigure something.
1921

2022
### Heuristics
2123

2224
Normally, `npm start` runs on port `3000`, and this is not explicitly configurable. However, some environments like cloud IDEs want the programs to run on a specific port to serve their output. We want to play well with different environments, so Create React App reads `PORT` environment variable and prefers it when it is specified. The trick is that we know cloud IDEs already specify it automatically, so there is no need for the user to do anything. Create React App relies on heuristics to do the right thing depending on environment.
2325

26+
<!--alex disable just-->
27+
2428
Another example of this is how `npm test` normally launches the watcher, but if the `CI` environment variable is set, it will run tests once. We know that popular CI environments set this variable, so the user doesn’t need to do anything. It just works.
2529

2630
### Interactivity
2731

28-
We prefer to add interactivity to the command line interface rather than add configuration flags. For example, `npm start` will attempt to run with port `3000` by default, but it may be busy. Many other tools just fail in this case and ask that you pass a different port, but Create React App will display a prompt asking if you’d like to run the app on the next available port.
32+
We prefer to add interactivity to the command line interface rather than add configuration flags. For example, `npm start` will attempt to run with port `3000` by default, but it may be busy. Many other tools fail in this case and ask that you pass a different port, but Create React App will display a prompt asking if you’d like to run the app on the next available port.
2933

3034
Another example of interactivity is `npm test` watcher interface. Instead of asking people to pass command line flags for switching between test runner modes or search patterns, we print a hint with keys that you can press during the test session to instruct watcher what to do. Jest supports both flags and interactive CLI but Create React App prefers long-running sessions to keep user immersed in the flow over short-running sessions with different flags.
3135

3236
### Breaking the Rules
3337

34-
No rules are perfect. Sometimes we may introduce flags or configuration if we believe the value is high enough to justify the mental cost. For example, we know that apps may be hosted paths different from the root, and we need to support this use case. However, we still try to fall back to heuristics when possible. In this example, we ask that you specify `homepage` in `package.json`, and infer the correct path based on it. We also nudge the user to fill out the `homepage` after the build, so the user becomes aware that the feature exists.
38+
No rules are perfect. Sometimes we may introduce flags or configuration if we believe the value is high enough to justify the complexity. For example, we know that apps may be hosted paths different from the root, and we need to support this use case. However, we still try to fall back to heuristics when possible. In this example, we ask that you specify `homepage` in `package.json`, and infer the correct path based on it. We also nudge the user to fill out the `homepage` after the build, so the user becomes aware that the feature exists.
3539

3640
## Submitting a Pull Request
3741

@@ -76,7 +80,7 @@ This package is enabled by default for all `create-react-app` scaffolded applica
7680

7781
#### [react-dev-utils](https://github.com/facebook/create-react-app/tree/master/packages/react-dev-utils)
7882

79-
This package contains utilities used for `react-scripts` and sister packages.<br>
83+
This package contains utilities used for `react-scripts` and sibling packages.<br>
8084
Its main purpose is to conceal code which the user shouldn't be burdened with upon ejecting.
8185

8286
#### [react-scripts](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts)
@@ -90,7 +94,7 @@ All functionality must be retained (and configuration given to the user) if they
9094

9195
2. Run `yarn` in the root `create-react-app` folder.
9296

93-
Once it is done, you can modify any file locally and run `yarn start`, `yarn test` or `yarn build` just like 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.
9498

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

@@ -105,15 +109,15 @@ and then run `yarn start` or `yarn build`.
105109

106110
**TL;DR** use the command `yarn e2e:docker` to run unit and e2e tests.
107111

108-
More detailed information are in the dedicated [README](/packages/react-scripts/fixtures/kitchensink/README.md).
112+
More detailed information are in the dedicated [README](/test/README.md).
109113

110114
### CI testing with private packages
111115

112116
**create-react-app** relies on main registry to fetch all dependencies, but, if you are in the need to usage of custom private packages that need to be fetch while running E2E test you might need a different configuration.
113117

114118
#### Customizing E2E registry configuration
115119

116-
We use [verdaccio](https://github.com/verdaccio/verdaccio) to emulate packages publishing in a registry using a default configuration. You might modify the current behaviour just editing the file `task/verdaccio.yaml`.
120+
We use [verdaccio](https://github.com/verdaccio/verdaccio) to emulate packages publishing in a registry using a default configuration. You might modify the current behaviour by editing the file `task/verdaccio.yaml`.
117121

118122
For more information about the configuration check out the [Verdaccio documentation](https://verdaccio.org/docs/en/configuration).
119123

@@ -148,18 +152,18 @@ By default git would use `CRLF` line endings which would cause the scripts to fa
148152
- Maybe add some newlines here and there. Preview the result on GitHub to get a feel for it. Changelog generator output is a bit too terse for my taste, so try to make it visually pleasing and well grouped.
149153

150154
7. Make sure to include “Migrating from ...” instructions for the previous release. Often you can copy and paste them.
151-
8. Run `npm run publish`. (It has to be `npm run publish` exactly, not just `npm publish` or `yarn publish`.)
155+
8. Run `npm run publish`. (It has to be `npm run publish` exactly, not `npm publish` or `yarn publish`.)
152156
9. Wait for a long time, and it will get published. Don’t worry that it’s stuck. In the end the publish script will prompt for versions before publishing the packages.
153157
10. After publishing, create a GitHub Release with the same text as the changelog entry. See previous Releases for inspiration.
154158

155-
Make sure to test the released version! If you want to be extra careful, you can publish a prerelease by running `npm run publish -- --canary=next --exact --cd-version <major|minor|patch> --npm-tag=next` instead of `npm run publish`.
159+
Make sure to test the released version! If you want to be extra careful, you can publish a prerelease by running `npm run publish -- --canary --exact --preid next --dist-tag=next --force-publish=* minor` instead of `npm run publish`.
156160

157161
## Releasing the Docs
158162

159163
1. Go to the `docusaurus/website` directory
160164
2. Run `yarn build`
161165
3. You'll need an [access token for the GitHub API](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). Save it to this environment variable: `export GITHUB_AUTH="..."`
162-
4. Run `GIT_USER=<GITHUB_USERNAME> CURRENT_BRANCH=master USE_SSH=true yarn run publish-gh-pages`
166+
4. Run `GIT_USER=<GITHUB_USERNAME> CURRENT_BRANCH=master USE_SSH=true yarn deploy`
163167

164168
---
165169

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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/pulls)
1+
# 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

33
[**NOTE:** Checkout the modifications README for differences to facebook's react-scripts.](packages/react-scripts/README.md)
44

@@ -25,19 +25,19 @@ Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
2525
When you’re ready to deploy to production, create a minified bundle with `npm run build`.
2626

2727
<p align='center'>
28-
<img src='https://cdn.rawgit.com/facebook/create-react-app/27b42ac/screencast.svg' width='600' alt='npm start'>
28+
<img src='https://cdn.jsdelivr.net/gh/facebook/create-react-app@27b42ac7efa018f2541153ab30d63180f5fa39e0/screencast.svg' width='600' alt='npm start'>
2929
</p>
3030

3131
### Get Started Immediately
3232

3333
You **don’t** need to install or configure tools like Webpack or Babel.<br>
3434
They are preconfigured and hidden so that you can focus on the code.
3535

36-
Just create a project, and you’re good to go.
36+
Create a project, and you’re good to go.
3737

3838
## Creating an App
3939

40-
**You’ll need to have Node 8.16.0 or Node 10.16.0 or later version on your local development machine** (but it’s not required on the server). 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.
40+
**You’ll need to have Node 8.16.0 or Node 10.16.0 or later version on your local development machine** (but it’s not required on the server). 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 switch Node versions between different projects.
4141

4242
To create a new app, you may choose one of the following methods:
4343

@@ -47,7 +47,7 @@ To create a new app, you may choose one of the following methods:
4747
npx create-react-app my-app
4848
```
4949

50-
_([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))_
50+
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is a package runner tool that comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_
5151

5252
### npm
5353

@@ -88,7 +88,7 @@ my-app
8888
└── serviceWorker.js
8989
```
9090

91-
No configuration or complicated folder structures, just the files you need to build your app.<br>
91+
No configuration or complicated folder structures, only the files you need to build your app.<br>
9292
Once the installation is done, you can open your project folder:
9393

9494
```sh
@@ -106,7 +106,7 @@ The page will automatically reload if you make changes to the code.<br>
106106
You will see the build errors and lint warnings in the console.
107107

108108
<p align='center'>
109-
<img src='https://cdn.rawgit.com/marionebl/create-react-app/9f62826/screencast-error.svg' width='600' alt='Build errors'>
109+
<img src='https://cdn.jsdelivr.net/gh/marionebl/create-react-app@9f6282671c54f0874afd37a72f6689727b562498/screencast-error.svg' width='600' alt='Build errors'>
110110
</p>
111111

112112
### `npm test` or `yarn test`
@@ -135,7 +135,7 @@ Please refer to the [User Guide](https://facebook.github.io/create-react-app/doc
135135

136136
## Philosophy
137137

138-
- **One Dependency:** There is just one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
138+
- **One Dependency:** There is only one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
139139

140140
- **No Configuration Required:** You don't need to configure anything. A reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
141141

@@ -174,7 +174,7 @@ Here are a few common cases where you might want to try something else:
174174

175175
- 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/).
176176

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 just produces static HTML/JS/CSS bundles.
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.
178178

179179
- 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.
180180

@@ -184,14 +184,19 @@ All of the above tools can work with little to no configuration.
184184

185185
If you prefer configuring the build yourself, [follow this guide](https://reactjs.org/docs/add-react-to-an-existing-app.html).
186186

187+
## React Native
188+
189+
Looking for something similar, but for React Native?<br>
190+
Check out [Expo CLI](https://github.com/expo/expo-cli).
191+
187192
## Contributing
188193

189194
We'd love to have your helping hand on `create-react-app`! See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
190195

191-
## React Native
196+
## Credits
192197

193-
Looking for something similar, but for React Native?<br>
194-
Check out [Expo CLI](https://github.com/expo/expo-cli).
198+
This project exists thanks to all the people who [contribute](CONTRIBUTING.md).<br>
199+
<a href="https://github.com/facebook/create-react-app/graphs/contributors"><img src="https://opencollective.com/create-react-app/contributors.svg?width=890&button=false" /></a>
195200

196201
## Acknowledgements
197202

0 commit comments

Comments
 (0)